Esempio n. 1
0
 private void MainWindowClosed(object sender, EventArgs e)
 {
     if (_notifyIconWrapper != null)
     {
         _notifyIconWrapper.Dispose();
         _notifyIconWrapper = null;
     }
     SaveWindowSettings();
 }
Esempio n. 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;
         }
     }
 }
Esempio n. 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;
         }
     }
 }