private void MainWindow_Closing(object sender, CancelEventArgs e) { if (!already_exiting && !suppress_exit_warning) { if (ConfigurationManager.Instance.ConfigurationRecord.GUI_AskOnExit) { LogoutWindow logout_window = new LogoutWindow(); if (false == logout_window.ShowDialog()) { e.Cancel = true; Logging.Info("User has requested not to quit Qiqqa on window close"); return; } } } if (ConfigurationManager.Instance.ConfigurationRecord.GUI_RestoreWindowsAtStartup) { RestoreDesktopManager.SaveDesktop(); } // Close all windows DockingManager.CloseAllContent(); MainEntry.SignalShutdown(); // If we get this far, they want out already_exiting = true; }