Пример #1
0
        protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
        {
            //clean up notifyicon (would otherwise stay open until application finishes)
            MyNotifyIcon.Dispose();

            base.OnClosing(e);
        }
 private void Window_Closing(object sender, CancelEventArgs e)
 {
     _timer.Enabled = false;
     if (MainWindow.keeperSettings.SaveOnClose == true)
     {
         forceSave();
     }
     MyNotifyIcon.Dispose();
 }
Пример #3
0
        protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
        {
            //clean up notifyicon (would otherwise stay open until application finishes)
            MyNotifyIcon.Dispose();

            if (!tcpServerStopped)
            {
                serverStateButton_Click(null, null);
            }

            base.OnClosing(e);
        }
Пример #4
0
        protected override void OnClosing(CancelEventArgs e)
        {
            if (_isClose)
            {
                //clean up notifyicon (would otherwise stay open until application finishes)
                MyNotifyIcon.Dispose();

                _dispatcherTimer.Stop();
                _dispatcherTimer = null;

                base.OnClosing(e);
            }
            else
            {
                ShowInTaskbar = false;
                Visibility    = Visibility.Hidden;
                e.Cancel      = true;
            }
        }
Пример #5
0
 /// <summary>
 /// Dispose clipboard monitor, notify icon and other things
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void DisposeSomethings(object sender, RoutedEventArgs e)
 {
     try
     {
         // unset clipboard text changed event handler
         _clipboardMonitor.ClipboardTextChanged -= ClipboardEnviroment.ClipboardTextChanged;
         // unset clipboard image changed event handler
         _clipboardMonitor.ClipboardImageChanged -= ClipboardEnviroment.ClipboardImageChanged;
         // diposing monitor
         _clipboardMonitor.Dispose();
     }
     catch (Exception exp)
     {
         MessageBox.Show(exp.ToString(), "Klavye - Fare Dinleyici Hata", MessageBoxButton.OK, MessageBoxImage.Error);
     }
     finally
     {
         MyNotifyIcon.Dispose();
     }
 }
Пример #6
0
 protected override void OnClosing(CancelEventArgs e)
 {
     MyNotifyIcon.Dispose();
     base.OnClosing(e);
 }
Пример #7
0
        protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
        {
            MyNotifyIcon.Dispose();

            base.OnClosing(e);
        }
Пример #8
0
 private void MetroWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     MyNotifyIcon.Dispose();
     SaveSettings();
     Save();
 }