diff --git a/EnvyUpdate/DashboardPage.xaml.cs b/EnvyUpdate/DashboardPage.xaml.cs
index 5148583..a676e4d 100644
--- a/EnvyUpdate/DashboardPage.xaml.cs
+++ b/EnvyUpdate/DashboardPage.xaml.cs
@@ -21,6 +21,7 @@ namespace EnvyUpdate
private string onlineDriv = null;
private string gpuURL = null;
private string skippedVer = null;
+ private DateTime lastFileChanged = DateTime.MinValue;
public DashboardPage()
{
@@ -302,13 +303,17 @@ namespace EnvyUpdate
void DriverFileChanged(object sender, FileSystemEventArgs e)
{
- Debug.LogToFile("INFO Watched driver file changed! Reloading data.");
- System.Threading.Thread.Sleep(10000);
- Application.Current.Dispatcher.Invoke(delegate
+ if (!GlobalVars.isInstalling && (DateTime.UtcNow.Subtract(lastFileChanged).TotalMinutes > 1))
{
- UpdateLocalVer();
- Load();
- });
+ Debug.LogToFile("INFO Watched driver file changed! Reloading data.");
+ System.Threading.Thread.Sleep(10000);
+ lastFileChanged = DateTime.UtcNow;
+ Application.Current.Dispatcher.Invoke(delegate
+ {
+ UpdateLocalVer();
+ Load();
+ });
+ }
}
private void CardOnline_Click(object sender, RoutedEventArgs e)
@@ -396,6 +401,7 @@ namespace EnvyUpdate
private void buttonInstall_Click(object sender, RoutedEventArgs e)
{
buttonInstall.IsEnabled = false;
+ GlobalVars.isInstalling = true;
string sevenZipPath = Util.GetSevenZip();
ShowSnackbar(Wpf.Ui.Common.ControlAppearance.Info, Wpf.Ui.Common.SymbolRegular.FolderZip24, Properties.Resources.info_extracting, Properties.Resources.info_extracting_title);
@@ -463,6 +469,12 @@ namespace EnvyUpdate
File.Delete(Path.Combine(GlobalVars.exedirectory, onlineDriv + "-nvidia-installer.exe"));
Directory.Delete(Path.Combine(GlobalVars.exedirectory, onlineDriv + "-extracted"), true);
+ GlobalVars.isInstalling = false;
+ Application.Current.Dispatcher.Invoke(delegate
+ {
+ UpdateLocalVer();
+ Load();
+ });
}
private void ShowSnackbar(Wpf.Ui.Common.ControlAppearance appearance, Wpf.Ui.Common.SymbolRegular icon, string message = "", string title = "")
diff --git a/EnvyUpdate/GlobalVars.cs b/EnvyUpdate/GlobalVars.cs
index 9b5b943..e9dfd32 100644
--- a/EnvyUpdate/GlobalVars.cs
+++ b/EnvyUpdate/GlobalVars.cs
@@ -13,6 +13,7 @@ namespace EnvyUpdate
public static readonly string startup = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
public static bool monitoringInstall = false;
public static bool startMinimized = false;
+ public static bool isInstalling = false;
public static readonly string useragent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Firefox/115.0";
}
}
diff --git a/EnvyUpdate/MainWindow.xaml b/EnvyUpdate/MainWindow.xaml
index c5a545b..af4f6a7 100644
--- a/EnvyUpdate/MainWindow.xaml
+++ b/EnvyUpdate/MainWindow.xaml
@@ -25,10 +25,11 @@
Icon="/icon.ico">
+ TooltipText="EnvyUpdate">
+
diff --git a/EnvyUpdate/MainWindow.xaml.cs b/EnvyUpdate/MainWindow.xaml.cs
index c9b0119..44b8a6d 100644
--- a/EnvyUpdate/MainWindow.xaml.cs
+++ b/EnvyUpdate/MainWindow.xaml.cs
@@ -113,5 +113,10 @@ namespace EnvyUpdate
else
Wpf.Ui.Appearance.Theme.Apply(Wpf.Ui.Appearance.ThemeType.Light, Wpf.Ui.Appearance.BackgroundType.Mica);
}
+
+ private void NotifyIcon_LeftClick(Wpf.Ui.Controls.NotifyIcon sender, RoutedEventArgs e)
+ {
+ Util.ShowMain();
+ }
}
}
\ No newline at end of file
diff --git a/EnvyUpdate/Util.cs b/EnvyUpdate/Util.cs
index 63b3a16..ced5548 100644
--- a/EnvyUpdate/Util.cs
+++ b/EnvyUpdate/Util.cs
@@ -122,6 +122,7 @@ namespace EnvyUpdate
{
Application.Current.MainWindow.Show();
Application.Current.MainWindow.WindowState = WindowState.Normal;
+ Application.Current.MainWindow.Activate();
}
///