Beispiel #1
0
 private void MainWindowClosed(object sender, EventArgs e)
 {
     if (_notifyIconWrapper != null)
     {
         _notifyIconWrapper.Dispose();
         _notifyIconWrapper = null;
     }
     SaveWindowSettings();
 }
Beispiel #2
0
 private void MainWindowStateChanged(object sender, EventArgs e)
 {
     if (WindowState == WindowState.Minimized)
     {
         _notifyIconWrapper = new NotifyIconWrapper(this, _showStateForNotifyIcon);
         UpdateIcon();
         ShowInTaskbar = false;
     }
     else
     {
         if (_notifyIconWrapper != null)
         {
             ShowInTaskbar = true;
             _notifyIconWrapper.Dispose();
             _notifyIconWrapper = null;
         }
         else
         {
             _showStateForNotifyIcon = WindowState;
         }
     }
 }
Beispiel #3
0
 private void MainWindowStateChanged(object sender, EventArgs e)
 {
     if (WindowState == WindowState.Minimized)
     {
         _notifyIconWrapper = new NotifyIconWrapper(this, _showStateForNotifyIcon);
         UpdateIcon();
         ShowInTaskbar = false;
     }
     else
     {
         if (_notifyIconWrapper != null)
         {
             ShowInTaskbar = true;
             _notifyIconWrapper.Dispose();
             _notifyIconWrapper = null;
         }
         else
         {
             _showStateForNotifyIcon = WindowState;
         }
     }
 }