From 525f059ecc0a5eab2e1f13b5718faa8ce082c790 Mon Sep 17 00:00:00 2001 From: Sean McArdle Date: Tue, 15 Nov 2016 19:01:21 -0800 Subject: [PATCH] Added context menu item for showing status/settings window. --- WifiSitterGui/TrayIconControl.xaml | 3 +++ WifiSitterGui/TrayIconControl.xaml.cs | 26 ++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/WifiSitterGui/TrayIconControl.xaml b/WifiSitterGui/TrayIconControl.xaml index ac53200..60da05b 100644 --- a/WifiSitterGui/TrayIconControl.xaml +++ b/WifiSitterGui/TrayIconControl.xaml @@ -23,6 +23,9 @@ + { + this.Dispatcher.Invoke(new Action(() => { _statusGui = null; })); + }; + _statusGui.Show(); + } + #endregion // methods #region eventhandlers + + private void ContextMenu_StatusSettings(object sender, RoutedEventArgs e) { + if (_statusGui == null) { + ShowStatusSettingsWindow(); + } + else { + _statusGui.WindowState = WindowState.Normal; + _statusGui.Activate(); + } + } + private void ContextMenu_Quit(object sender, RoutedEventArgs e) { _statusGui?.Close();