private void ExitApplication() { _isExit = true; mainwindow.Close(); _notifyIcon.Dispose(); _notifyIcon = null; Settings_.Save(mainwindow.config, SettingsFolderPath); }
private void MainWindow_Closing(object sender, CancelEventArgs e) { if (!_isExit) { e.Cancel = true; mainwindow.Hide(); Settings_.Save(mainwindow.config, SettingsFolderPath); } }