/// <summary> /// Loads the configuration /// </summary> static void loadConfiguration() { _options = null; try { _options = ProgramOptionsManager.LoadSettings(); } catch (OptionsException) { showErrorAndCloseApplicationIn10Seconds(Translation.Current[476]); } if (_options.DontNeedScheduler) { showErrorAndCloseApplicationIn10Seconds(Translation.Current[585]); } //TODO: // if there's no scheduling if (!_options.BackupTasks["default"].EnableScheduling) { // we're exiting to free system resources showErrorAndCloseApplicationIn10Seconds(Translation.Current[588]); } }
private void LoadSettings() { try { _options = ProgramOptionsManager.LoadSettings(); } catch (OptionsException e) { ShowErrorAndQuit(e); } }
public void LoadSettings() { if (File.Exists(Files.ProfileFile)) { try { _profileOptions = ProgramOptionsManager.LoadSettings(); } catch (OptionsException noOptions) { MessageBox.Show(string.Format(CultureInfo.InvariantCulture, NoProfileOptions, Files.ProfileFile, noOptions.Message), Error, MessageBoxButtons.OK, MessageBoxIcon.Error); _profileOptions = ProgramOptionsManager.Default; } } else { _profileOptions = ProgramOptionsManager.Default; } }