private void CloseMe() { DataService.Stop(); deskStockCtrl1.RemoveDisplayHandler(); deskStockCtrl1.CloseChildrenForm(); hotkeyHelper.UnregisterHotkeys(); }
private void AskForExit(object sender, FormClosingEventArgs e) { //Core.PauseOrResume(); Stop(); if (MessageBox.Show(LanguageManager.Get("Comfirm_Exit_Text"), LanguageManager.Get("Tip_Text"), MessageBoxButtons.YesNo) == DialogResult.Yes) { Core.MainIsVisible = false; Core.Exit(); _hotkeyHelper.UnregisterHotkeys(); Dispose(); } else { e.Cancel = true; //Core.PauseOrResume(); } }