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

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

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

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