private void SpyMainWindow_FormClosing(object sender, FormClosingEventArgs e)
        {
            //check whether need to save before exit
            SpyWindowHelper.WantToSave(_rootNurseObject);

            SpySettings.SaveUserSettings();
            mruMenu.SaveToRegistry();
            mruMenu.BuildJumpList();
        }
Exemple #2
0
        public static bool Save(TestObjectNurse rootNurseObject)
        {
            bool succeed = ModelFileHandler.SaveToModelFile(rootNurseObject);

            if (succeed)
            {
                AppEnvironment.SetModelChanged(false);
            }

            SpySettings.Persist();
            return(succeed);
        }
Exemple #3
0
        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();
            }
        }
Exemple #4
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     SpySettings.SaveUserSettings();
     Close();
 }