diff --git a/EnvyUpdate/MainWindow.xaml b/EnvyUpdate/MainWindow.xaml
index a650bcb..4074828 100644
--- a/EnvyUpdate/MainWindow.xaml
+++ b/EnvyUpdate/MainWindow.xaml
@@ -7,7 +7,7 @@
xmlns:p="clr-namespace:EnvyUpdate.Properties"
xmlns:tb="http://www.hardcodet.net/taskbar"
mc:Ignorable="d"
- Title="EnvyUpdate" Height="270" Width="300" Icon="icon.ico" StateChanged="Window_StateChanged" Closing="Window_Closing" ResizeMode="CanMinimize">
+ Title="EnvyUpdate" Height="270" Width="389" Icon="icon.ico" StateChanged="Window_StateChanged" Closing="Window_Closing" ResizeMode="CanMinimize">
@@ -23,8 +23,9 @@
-
+
+
diff --git a/EnvyUpdate/MainWindow.xaml.cs b/EnvyUpdate/MainWindow.xaml.cs
index 24086ca..40a018a 100644
--- a/EnvyUpdate/MainWindow.xaml.cs
+++ b/EnvyUpdate/MainWindow.xaml.cs
@@ -20,6 +20,7 @@ namespace EnvyUpdate
private string gpuURL = null;
private string[] arguments = null;
private bool isDebug = false;
+ private string skippedVer = null;
public MainWindow()
{
@@ -122,6 +123,11 @@ namespace EnvyUpdate
if (File.Exists(GlobalVars.exepath + "sd.envy"))
radioSD.IsChecked = true;
+ else
+ radioGRD.IsChecked = true;
+
+ if (File.Exists(GlobalVars.exepath + "skip.envy"))
+ skippedVer = File.ReadLines(GlobalVars.exepath + "skip.envy").First();
// This little bool check is necessary for debug mode on systems without an Nvidia GPU.
if (!isDebug)
@@ -172,24 +178,53 @@ namespace EnvyUpdate
{
textblockOnline.Foreground = Brushes.Red;
buttonDL.IsEnabled = true;
- Notify.ShowDrivUpdatePopup();
+ if (skippedVer == null)
+ {
+ buttonSkip.Content = Properties.Resources.ui_skipversion;
+ buttonSkip.IsEnabled = true;
+ }
+ else
+ buttonSkip.Content = Properties.Resources.ui_skipped;
+ if (skippedVer != onlineDriv)
+ Notify.ShowDrivUpdatePopup();
}
else
+ {
+ buttonSkip.IsEnabled = false;
textblockOnline.Foreground = Brushes.Green;
+ }
}
catch (FormatException)
{
- //Thank you locales. Some languages need , instead of .
+ //Thank you locales. Some languages need , instead of . for proper parsing
string cLocalDriv = localDriv.Replace('.', ',');
string cOnlineDriv = onlineDriv.Replace('.', ',');
if (float.Parse(cLocalDriv) < float.Parse(cOnlineDriv))
{
textblockOnline.Foreground = Brushes.Red;
buttonDL.IsEnabled = true;
- Notify.ShowDrivUpdatePopup();
+ if (skippedVer == null)
+ buttonSkip.IsEnabled = true;
+ else
+ buttonSkip.Content = Properties.Resources.ui_skipped;
+ if (skippedVer != onlineDriv)
+ Notify.ShowDrivUpdatePopup();
}
else
+ {
+ buttonSkip.IsEnabled = false;
textblockOnline.Foreground = Brushes.Green;
+ }
+ }
+
+ //Check for different version than skipped version
+ if (skippedVer != onlineDriv)
+ {
+ skippedVer = null;
+ if (File.Exists(GlobalVars.exepath + "skip.envy"))
+ File.Delete(GlobalVars.exepath + "skip.envy");
+ buttonSkip.Content = Properties.Resources.ui_skipversion;
+ buttonSkip.IsEnabled = true;
}
}
@@ -270,5 +305,14 @@ namespace EnvyUpdate
Util.CreateShortcut("EnvyUpdate", Environment.GetFolderPath(Environment.SpecialFolder.Startup), GlobalVars.exeloc, "NVidia Update Checker", "/minimize");
}
}
+
+ private void buttonSkip_Click(object sender, RoutedEventArgs e)
+ {
+ skippedVer = onlineDriv;
+ File.WriteAllText(GlobalVars.exepath + "skip.envy", onlineDriv);
+ buttonSkip.IsEnabled = false;
+ buttonSkip.Content = Properties.Resources.ui_skipped;
+ MessageBox.Show(Properties.Resources.skip_confirm);
+ }
}
}
\ No newline at end of file
diff --git a/EnvyUpdate/Properties/AssemblyInfo.cs b/EnvyUpdate/Properties/AssemblyInfo.cs
index 576ddb8..a6fa859 100644
--- a/EnvyUpdate/Properties/AssemblyInfo.cs
+++ b/EnvyUpdate/Properties/AssemblyInfo.cs
@@ -49,5 +49,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.12")]
-[assembly: AssemblyFileVersion("2.12")]
+[assembly: AssemblyVersion("2.13")]
+[assembly: AssemblyFileVersion("2.13")]
diff --git a/EnvyUpdate/Properties/Resources.Designer.cs b/EnvyUpdate/Properties/Resources.Designer.cs
index 9235b05..e7f0cc3 100644
--- a/EnvyUpdate/Properties/Resources.Designer.cs
+++ b/EnvyUpdate/Properties/Resources.Designer.cs
@@ -19,7 +19,7 @@ namespace EnvyUpdate.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
@@ -123,6 +123,15 @@ namespace EnvyUpdate.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Version was skipped. Update popups will be disabled until a new version releases..
+ ///
+ public static string skip_confirm {
+ get {
+ return ResourceManager.GetString("skip_confirm", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Run at Windows startup.
///
@@ -195,6 +204,24 @@ namespace EnvyUpdate.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Version skipped.
+ ///
+ public static string ui_skipped {
+ get {
+ return ResourceManager.GetString("ui_skipped", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Skip this version.
+ ///
+ public static string ui_skipversion {
+ get {
+ return ResourceManager.GetString("ui_skipversion", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Are you sure you want to uninstall EnvyUpdate?.
///
diff --git a/EnvyUpdate/Properties/Resources.de.resx b/EnvyUpdate/Properties/Resources.de.resx
index a5c5945..171c831 100644
--- a/EnvyUpdate/Properties/Resources.de.resx
+++ b/EnvyUpdate/Properties/Resources.de.resx
@@ -138,6 +138,9 @@
Keine NVIDIA GPU gefunden. EnvyUpdate wird sich nun schließen.
+
+ Version übersprungen. Aktualisierungsbenachrichtigungen werden bis zur nächsten Version deaktiviert.
+
Beim Start von Windows ausführen
@@ -162,6 +165,12 @@
Online Treiberversion:
+
+ Version übersprungen
+
+
+ Diese Version überspringen
+
Sind Sie sich sicher, dass Sie EnvyUpdate deinstallieren wollen?
diff --git a/EnvyUpdate/Properties/Resources.resx b/EnvyUpdate/Properties/Resources.resx
index f16f450..6036388 100644
--- a/EnvyUpdate/Properties/Resources.resx
+++ b/EnvyUpdate/Properties/Resources.resx
@@ -138,6 +138,9 @@
No NVIDIA GPU found. Application will exit.
+
+ Version was skipped. Update popups will be disabled until a new version releases.
+
Run at Windows startup
@@ -162,6 +165,12 @@
Online driver version:
+
+ Version skipped
+
+
+ Skip this version
+
Are you sure you want to uninstall EnvyUpdate?