/// <summary> /// Restores default settings from the settings file for ACAT /// </summary> private void loadDefaultSettings() { if (DialogUtils.Confirm(this, R.GetString("RestoreDefaultSettings"))) { initWidgetSettings(ACATPreferences.LoadDefaultSettings()); _isDirty = true; } }
/// <summary> /// Restore default settings from the preferences file /// </summary> private void loadDefaultSettings() { if (DialogUtils.Confirm(this, "Restore default settings?")) { initWidgetSettings(ACATPreferences.LoadDefaultSettings()); isDirty = true; } }
/// <summary> /// Loads default settings from the preferences file /// </summary> private void loadDefaultSettings() { if (DialogUtils.Confirm(this, R.GetString("RestoreDefaultSettings"))) { // get entire default file and just set those settings that belong to this preferences screen initWidgetSettings(ACATPreferences.LoadDefaultSettings()); _isDirty = true; } }
/// <summary> /// Load default values for all the settings in the /// dialog /// </summary> private void loadDefaultSettings() { if (DialogUtils.Confirm(this, "Restore default settings?")) { Context.AppWordPredictionManager.LoadDefaultSettings(); initWidgetSettings(ACATPreferences.LoadDefaultSettings()); _isDirty = true; } }
/// <summary> /// Loads user settings from the user's profile directory /// </summary> /// <returns>true on success</returns> public static bool LoadUserPreferences() { setPreferencesPaths(); FileUtils.AppPreferencesDir = ProfileManager.CurrentProfileDir; Common.AppPreferences = ACATPreferences.Load(); if (Common.AppPreferences == null) { MessageBox.Show(String.Format(R.GetString("UnableToReadPreferences")), FileUtils.AppPreferencesDir); return(false); } if (!Common.AppPreferences.TransferredPreferencesFromV098) { upgradeFromPreviousVersion(); Common.AppPreferences.TransferredPreferencesFromV098 = true; } if (!Common.AppPreferences.TransferredSettingsFromV099) { if (upgradeFromVersion099()) { Common.AppPreferences.TransferredSettingsFromV099 = true; } } if (!Common.AppPreferences.TransferredSettingsFromV0991) { if (upgradeFromVersion0991()) { Common.AppPreferences.TransferredSettingsFromV0991 = true; } } if (Common.AppPreferences.ShowThemeSelectDialogOnStartup) { if (ShowThemeSelectDialog()) { Common.AppPreferences.ShowThemeSelectDialogOnStartup = false; MessageBox.Show( "You can change the preferred color scheme through \"ACAT Config\" in the Dashboard", Common.AppPreferences.AppName, MessageBoxButtons.OK, MessageBoxIcon.Information); } } Common.AppPreferences.Save(); CoreGlobals.AppPreferences = Common.AppPreferences; CoreGlobals.AppDefaultPreferences = ACATPreferences.LoadDefaultSettings(); ACATPreferences.SaveDefaults <ACATPreferences>(ACATPreferences.DefaultPreferencesFilePath); Common.AppPreferences.DebugAssertOnError = false; ACATPreferences.ApplicationAssembly = Assembly.GetEntryAssembly(); return(true); }