diff --git a/Application/NotificationIcon.cs b/Application/NotificationIcon.cs index 9288bb5..9648632 100644 --- a/Application/NotificationIcon.cs +++ b/Application/NotificationIcon.cs @@ -21,6 +21,7 @@ internal static class NotificationIcon // Setup the menu var contextMenu = new ContextMenu(); + contextMenu.Opened += HandleContextMenuOpened; _lockMenuItem = new MenuItem() { @@ -46,6 +47,11 @@ internal static class NotificationIcon _notificationIcon.ForceCreate(false); } + private static void HandleContextMenuOpened(object sender, System.Windows.RoutedEventArgs e) + { + _lockMenuItem.IsChecked = Settings.Default.WindowLocked; + } + private static void HandleNotificationIconDoubleClick(object sender, System.EventArgs e) { // Bring the main form to the front