File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,13 @@ Partial Public Class MainViewModel
3434 Private Sub InitialiseNotificationTray()
3535 ClosingCommand = New RelayCommand( Of CancelEventArgs)( AddressOf Closing)
3636 NotifyCommand = New RelayCommand( Sub () Notify( "Hello" , "World" ))
37- NotifyIconOpenCommand = New RelayCommand( Sub () WindowState = WindowState.Normal)
37+ NotifyIconOpenCommand = New RelayCommand( Sub ()
38+ Application.Current.MainWindow.Show()
39+ WindowState = WindowState.Normal
40+ Application.Current.MainWindow.Topmost = True
41+ Application.Current.MainWindow.Activate()
42+ Application.Current.MainWindow.Topmost = False
43+ End Sub )
3844 NotifyIconExitCommand = New RelayCommand( AddressOf NotifyExit)
3945 End Sub
4046
@@ -71,6 +77,7 @@ Partial Public Class MainViewModel
7177 If Watcher.WatchedFolders.Count <> 0 Then
7278 e.Cancel = True
7379 WindowState = WindowState.Minimized
80+ Application.Current.MainWindow.Hide()
7481 End If
7582
7683 End Sub
You can’t perform that action at this time.
0 commit comments