remove unnecessary debug and fix locale issues
This commit is contained in:
parent
e41b348acb
commit
051c4df2b6
4 changed files with 25 additions and 14 deletions
|
@ -2,8 +2,7 @@
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:EnvyUpdate"
|
xmlns:local="clr-namespace:EnvyUpdate"
|
||||||
StartupUri="MainWindow.xaml"
|
StartupUri="MainWindow.xaml">
|
||||||
DispatcherUnhandledException="Application_DispatcherUnhandledException">
|
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
|
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
|
|
|
@ -14,10 +14,5 @@ namespace EnvyUpdate
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
public bool DoHandle { get; set; }
|
|
||||||
private void Application_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
|
|
||||||
{
|
|
||||||
MessageBox.Show(e.Exception.ToString());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,14 +152,31 @@ namespace EnvyUpdate
|
||||||
textblockOnline.Text = onlineDriv;
|
textblockOnline.Text = onlineDriv;
|
||||||
c.Dispose();
|
c.Dispose();
|
||||||
|
|
||||||
if (float.Parse(localDriv) < float.Parse(onlineDriv))
|
try
|
||||||
{
|
{
|
||||||
textblockOnline.Foreground = Brushes.Red;
|
if (float.Parse(localDriv) < float.Parse(onlineDriv))
|
||||||
buttonDL.IsEnabled = true;
|
{
|
||||||
Notify.ShowDrivUpdatePopup();
|
textblockOnline.Foreground = Brushes.Red;
|
||||||
|
buttonDL.IsEnabled = true;
|
||||||
|
Notify.ShowDrivUpdatePopup();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
textblockOnline.Foreground = Brushes.Green;
|
||||||
|
}
|
||||||
|
catch (FormatException)
|
||||||
|
{
|
||||||
|
//Thank you locales. Some languages need , instead of .
|
||||||
|
string cLocalDriv = localDriv.Replace('.', ',');
|
||||||
|
string cOnlineDriv = onlineDriv.Replace('.', ',');
|
||||||
|
if (float.Parse(cLocalDriv) < float.Parse(cOnlineDriv))
|
||||||
|
{
|
||||||
|
textblockOnline.Foreground = Brushes.Red;
|
||||||
|
buttonDL.IsEnabled = true;
|
||||||
|
Notify.ShowDrivUpdatePopup();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
textblockOnline.Foreground = Brushes.Green;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
textblockOnline.Foreground = Brushes.Green;
|
|
||||||
|
|
||||||
if (GlobalVars.exepath == GlobalVars.appdata)
|
if (GlobalVars.exepath == GlobalVars.appdata)
|
||||||
{
|
{
|
||||||
|
|
|
@ -295,7 +295,7 @@ namespace EnvyUpdate
|
||||||
{
|
{
|
||||||
GPUName = obj["VideoProcessor"].ToString().ToLower();
|
GPUName = obj["VideoProcessor"].ToString().ToLower();
|
||||||
// Remove any 3GB, 6GB or similar from name. We don't need to know the VRAM to get results.
|
// Remove any 3GB, 6GB or similar from name. We don't need to know the VRAM to get results.
|
||||||
GPUName = Regex.Replace(GPUName, "\\d+GB", "");
|
GPUName = Regex.Replace(GPUName, " \\d+gb", "");
|
||||||
GPUName = Regex.Replace(GPUName, "nvidia ", "");
|
GPUName = Regex.Replace(GPUName, "nvidia ", "");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Reference in a new issue