private void SpyMainWindow_FormClosing(object sender, FormClosingEventArgs e) { //check whether need to save before exit SpyWindowHelper.WantToSave(_rootNurseObject); SpySettings.SaveUserSettings(); mruMenu.SaveToRegistry(); mruMenu.BuildJumpList(); }
public static bool Save(TestObjectNurse rootNurseObject) { bool succeed = ModelFileHandler.SaveToModelFile(rootNurseObject); if (succeed) { AppEnvironment.SetModelChanged(false); } SpySettings.Persist(); return(succeed); }
public static void SwitchLanguage(AppLanguageEnum language, Action action) { //"Need to restart application to take effect, restart now?" DialogResult result = MessageBox.Show(StringResources.LPSpy_SpyMainWindow_RetartToTakeEffect, "Confirm", MessageBoxButtons.YesNo); if (result == System.Windows.Forms.DialogResult.Yes) { SpySettings.Language = language; SpySettings.SaveUserSettings(); action(); RestartApp(); } }
private void btnOk_Click(object sender, EventArgs e) { SpySettings.SaveUserSettings(); Close(); }