diff --git a/DellMonitorControl/DellMonitorControl.csproj b/DellMonitorControl/DellMonitorControl.csproj
index 3f3c428..76c7305 100644
--- a/DellMonitorControl/DellMonitorControl.csproj
+++ b/DellMonitorControl/DellMonitorControl.csproj
@@ -15,9 +15,9 @@
- 1.1.4
- 1.1.4.0
- 1.1.4.0
+ 1.1.5
+ 1.1.5.0
+ 1.1.5.0
diff --git a/DellMonitorControl/MainWindow.xaml b/DellMonitorControl/MainWindow.xaml
index 1e5c224..9bdd6ac 100644
--- a/DellMonitorControl/MainWindow.xaml
+++ b/DellMonitorControl/MainWindow.xaml
@@ -187,13 +187,26 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DellMonitorControl/MainWindow.xaml.cs b/DellMonitorControl/MainWindow.xaml.cs
index dad9b4c..258948d 100644
--- a/DellMonitorControl/MainWindow.xaml.cs
+++ b/DellMonitorControl/MainWindow.xaml.cs
@@ -18,6 +18,8 @@ public partial class MainWindow : Window
private List<(XMonitor Monitor, List Options)> _loadedMonitors = new();
private Storyboard? _spinnerStoryboard;
private DispatcherTimer? _showLogButtonTimer;
+ private UpdateInfo? _pendingUpdate;
+ private DateTime _lastUpdateCheck = DateTime.MinValue;
public MainWindow()
{
@@ -53,12 +55,50 @@ public partial class MainWindow : Window
};
_showLogButtonTimer.Start();
+ // Check for updates in background (max once per hour)
+ if ((DateTime.Now - _lastUpdateCheck).TotalMinutes > 60)
+ {
+ _lastUpdateCheck = DateTime.Now;
+ _ = CheckForUpdatesAsync();
+ }
+
Dispatcher.BeginInvoke(new Action(() =>
{
Top = workArea.Bottom - ActualHeight - 10;
}), DispatcherPriority.Loaded);
}
+ private async Task CheckForUpdatesAsync()
+ {
+ try
+ {
+ var update = await UpdateChecker.CheckForUpdateAsync();
+ if (update != null)
+ {
+ _pendingUpdate = update;
+ await Dispatcher.InvokeAsync(() => ShowUpdateBanner(update));
+ }
+ }
+ catch
+ {
+ // Silently ignore update check failures
+ }
+ }
+
+ private void ShowUpdateBanner(UpdateInfo update)
+ {
+ updateBanner.Visibility = Visibility.Visible;
+ updateText.Text = $"v{update.LatestVersion} available - Click to update";
+ }
+
+ private void UpdateBanner_Click(object sender, System.Windows.Input.MouseButtonEventArgs e)
+ {
+ if (_pendingUpdate != null && !string.IsNullOrEmpty(_pendingUpdate.DownloadUrl))
+ {
+ UpdateChecker.OpenDownloadPage(_pendingUpdate.DownloadUrl);
+ }
+ }
+
private void Window_Deactivated(object sender, EventArgs e)
{
Hide();
diff --git a/DellMonitorControl/MonitorControl.iss b/DellMonitorControl/MonitorControl.iss
index a71487e..bb28c58 100644
--- a/DellMonitorControl/MonitorControl.iss
+++ b/DellMonitorControl/MonitorControl.iss
@@ -1,5 +1,5 @@
#define MyAppName "Monitor Control"
-#define MyAppVersion "1.1.4"
+#define MyAppVersion "1.1.5"
#define MyAppPublisher "MarketAlly"
#define MyAppExeName "DellMonitorControl.exe"
#define MyAppIcon "MonitorIcon.ico"