Skip to content

Commit f89e698

Browse files
committed
StatusWindow update
1 parent e742ab5 commit f89e698

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Source/NETworkManager/MainWindow.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ private void InitNotifyIcon()
10231023
}
10241024

10251025
_notifyIcon.Text = Title;
1026-
// DISABLED IN RELEASE _notifyIcon.Click += NotifyIcon_Click;
1026+
_notifyIcon.Click += NotifyIcon_Click;
10271027
_notifyIcon.MouseDown += NotifyIcon_MouseDown;
10281028
_notifyIcon.Visible = SettingsManager.Current.TrayIcon_AlwaysShowIcon;
10291029
}
@@ -1034,6 +1034,7 @@ private void NotifyIcon_MouseDown(object sender, System.Windows.Forms.MouseEvent
10341034
return;
10351035

10361036
var trayMenu = (ContextMenu)FindResource("ContextMenuNotifyIcon");
1037+
10371038
trayMenu.IsOpen = true;
10381039
}
10391040

Source/NETworkManager/StatusWindow.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
<TextBlock Text="{x:Static localization:Strings.DetectingNetworkDots}" Style="{StaticResource MessageTextBlock}" />
6060
</StackPanel>
6161
<StackPanel Grid.Row="2" Visibility="{Binding IsRefreshing, Converter={StaticResource BooleanReverseToVisibilityCollapsedConverter}}" Margin="0,0,0,10">
62+
<TextBlock Text="Closing in x seconds..." Foreground="{DynamicResource GrayBrush5}" Style="{StaticResource DefaultTextBlock}" Margin="0,0,0,10"/>
6263
<mahAppsControls:MetroProgressBar Value="{Binding CountdownValue}" Minimum="0" Maximum="10" Foreground="{DynamicResource AccentColorBrush}" />
6364
</StackPanel>
6465
<Button Grid.Row="3" Content="{x:Static localization:Strings.Open}" Command="{Binding OpenMainWindowCommand}" Style="{StaticResource DefaultButton}" />

Source/NETworkManager/StatusWindow.xaml.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ public StatusWindow(MainWindow mainWindow)
9292

9393
private void OpenMainWindowAction()
9494
{
95+
// Stop timer if running
96+
_timer.Stop();
97+
9598
HideWindow();
9699

97100
if (_mainWindow.ShowWindowCommand.CanExecute(null))
@@ -170,7 +173,7 @@ private void StartCountdownToClose()
170173
_timer.Start();
171174
}
172175

173-
private void CountdownToCloseTimer_Tick(object sender, System.EventArgs e)
176+
private void CountdownToCloseTimer_Tick(object sender, EventArgs e)
174177
{
175178
CountdownValue--;
176179

@@ -192,10 +195,7 @@ public void ShowFromExternal()
192195
}
193196

194197
private void ShowWindow()
195-
{
196-
// Stop timer if running
197-
_timer.Stop();
198-
198+
{
199199
// Show on primary screen in left/bottom corner
200200
// ToDo: User setting...
201201
Left = Screen.PrimaryScreen.WorkingArea.Right - Width - 10;

0 commit comments

Comments
 (0)