private void kbtnResetColourStringSettings_Click(object sender, EventArgs e) { _colourStringSettingsManager.ResetColourStringSettings(kchkAskForConfirmation.Checked); _colourStringSettingsManager.SaveColourStringSettings(kchkAskForConfirmation.Checked); kbtnResetColourStringSettings.Enabled = false; }
public static void SaveSettings(SettingTypes settingType) { #region Variables ColourSettingsManager colourSettingsManager = new ColourSettingsManager(); ColourStringSettingsManager colourStringSettingsManager = new ColourStringSettingsManager(); ColourIntegerSettingsManager colourIntegerSettingsManager = new ColourIntegerSettingsManager(); GlobalBooleanSettingsManager globalBooleanSettingsManager = new GlobalBooleanSettingsManager(); GlobalStringSettingsManager globalStringSettingsManager = new GlobalStringSettingsManager(); #endregion try { switch (settingType) { case SettingTypes.BOOLEAN: globalBooleanSettingsManager.SaveBooleanSettings(); break; case SettingTypes.COLOUR: colourSettingsManager.SaveColourSettings(); break; case SettingTypes.COLOURSTRING: colourStringSettingsManager.SaveColourStringSettings(); break; case SettingTypes.COLOURINTEGER: colourIntegerSettingsManager.SaveColourIntegerSettings(); break; case SettingTypes.STRING: globalStringSettingsManager.SaveStringSettings(); break; case SettingTypes.INTEGER: colourIntegerSettingsManager.SaveColourIntegerSettings(); break; default: break; } } catch (Exception exc) { ExceptionHandler.CaptureException(exc); } }