/// <summary> Automatic save off. </summary> /// /// <param name="param"> The parameter (optional) </param> /// /// <returns> A MCamReturn. </returns> public MCamReturn AutoSaveOff(int param) { try { if (!this._autoSave.Enabled) { return(MCamReturn.NoErrors); } PromptManager.WriteString(ApplicationStrings.LockFileAutoSaveDisabled); this._autoSave.Stop(); this._autoSave.Enabled = false; MastercamFileService.Instance.LogInformation(ApplicationStrings.LockFileAutoSaveDisabled); DialogManager.OK(ApplicationStrings.LockFileAutoSaveDisabled, ApplicationStrings.Title); } finally { PromptManager.Clear(); } return(MCamReturn.NoErrors); }
/// <summary> Automatic save on. </summary> /// /// <param name="param"> The parameter (optional) </param> /// /// <returns> A MCamReturn. </returns> public MCamReturn AutoSaveOn(int param) { try { if (this._autoSave.Enabled) { DialogManager.OK(ApplicationStrings.AutoSaveIsEnabled, ApplicationStrings.Title); return(MCamReturn.NoErrors); } PromptManager.WriteString(ApplicationStrings.LockFileAutoSaveEnabled); this._autoSave.Interval = Properties.Settings.Default.Interval * 60000; this._autoSave.Enabled = true; this._autoSave.Start(); MastercamFileService.Instance.LogInformation(ApplicationStrings.LockFileAutoSaveEnabled); DialogManager.OK(ApplicationStrings.LockFileAutoSaveEnabled, ApplicationStrings.Title); } finally { PromptManager.Clear(); } return(MCamReturn.NoErrors); }