More crash dump report for mé !

This commit is contained in:
Mael-fixe 2018-08-30 01:16:42 +02:00
parent 0f68abd8b0
commit bc75172dc6
7 changed files with 38 additions and 14 deletions

View file

@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>

View file

@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>

View file

@ -253,6 +253,8 @@ namespace NaturalLauncher
} }
private void Setting_Click(object sender, RoutedEventArgs e) private void Setting_Click(object sender, RoutedEventArgs e)
{
try
{ {
if (sw == null) if (sw == null)
{ {
@ -261,6 +263,11 @@ namespace NaturalLauncher
sw.SetMainWindowRef(this); sw.SetMainWindowRef(this);
sw.Show(); sw.Show();
} }
catch(Exception exception)
{
App.SendReport(exception, "Could Not Open Setting window");
}
}
private void Verify_Click(object sender, RoutedEventArgs e) private void Verify_Click(object sender, RoutedEventArgs e)
{ {

View file

@ -45,6 +45,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>

View file

@ -49,5 +49,5 @@ using System.Windows;
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut // Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
// en utilisant '*', comme indiqué ci-dessous : // en utilisant '*', comme indiqué ci-dessous :
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.1.0")]

View file

@ -277,7 +277,8 @@ namespace NaturalLauncher
if (publicKey == null) if (publicKey == null)
{ {
throw new ArgumentNullException("publicKey"); MessageBoxResult AlertBox = MessageBox.Show("Your launcher is missing the public crypto key", "Error!", MessageBoxButton.OK, MessageBoxImage.Error);
throw new ArgumentNullException("MissingKeyFile");
} }
if (signature == null) if (signature == null)
@ -293,7 +294,10 @@ namespace NaturalLauncher
public static X509Certificate2 LoadPublicKey(string PublicKeyPath) public static X509Certificate2 LoadPublicKey(string PublicKeyPath)
{ {
if(File.Exists(PublicKeyPath))
return new X509Certificate2(PublicKeyPath); return new X509Certificate2(PublicKeyPath);
else
throw new ArgumentNullException("MissingKeyFile");
} }
public static byte[] StringToByte(string str) public static byte[] StringToByte(string str)

View file

@ -59,12 +59,18 @@ namespace NaturalLauncher
break; break;
} }
try
{
XmlBuilder.ReadConfigXml(out string uno, out bool dos, out string discordStatus, out bool keepAlive); XmlBuilder.ReadConfigXml(out string uno, out bool dos, out string discordStatus, out bool keepAlive);
Launcher.keepLauncherAlive = keepAlive; Launcher.keepLauncherAlive = keepAlive;
DiscordTxtbox.Text = discordStatus; DiscordTxtbox.Text = discordStatus;
KeepAliveChecker.IsChecked = keepAlive; KeepAliveChecker.IsChecked = keepAlive;
windowfullyopen = true; windowfullyopen = true;
}
catch(Exception exception)
{
App.SendReport(exception, "Could Not Read ConfigXml");
}
} }
@ -200,6 +206,10 @@ namespace NaturalLauncher
Launcher.HLFolder = folderPath; Launcher.HLFolder = folderPath;
Launcher.NSFolder = folderPath + System.IO.Path.DirectorySeparatorChar + "ns"; Launcher.NSFolder = folderPath + System.IO.Path.DirectorySeparatorChar + "ns";
} }
else
{
// throw new FileNotFoundException("Could not find HL folder"); // no need to crash the launcher for this
}
MainWindowReference.CallUpdateGame(); MainWindowReference.CallUpdateGame();
} }