// the user wishes to save the theme.. private void mnuSaveThemeAs_Click(object sender, EventArgs e) { if (sdXmlTheme.ShowDialog() == DialogResult.OK) { ThemeSettings.Save(sdXmlTheme.FileName); } }
/// <summary> /// Saves the theme settings. /// </summary> /// <param name="showConfirmationDialogue">if set to <c>true</c> [show confirmation dialogue].</param> public void SaveThemeSettings(bool showConfirmationDialogue = true) { if (showConfirmationDialogue) { DialogResult result = KryptonMessageBox.Show("Do you want to save the current values?", "Save Current Settings", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); if (result == DialogResult.Yes) { _themeSettings.Save(); } } else { _themeSettings.Save(); } }
/// <summary> /// Saves the XML file application updater settings. /// </summary> /// <param name="alwaysUsePrompt">if set to <c>true</c> [always use prompt].</param> public void SaveThemeSettings(bool alwaysUsePrompt = false) { if (alwaysUsePrompt) { if (KryptonMessageBox.Show("You have changed a setting value. Do you want to save these changes?", "Setting Values Changed", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { _themeSettings.Save(); SetSettingsModified(false); } } else { _themeSettings.Save(); SetSettingsModified(false); } }
// saves the current theme as the default theme, same as the OK button press.. private void mnuSaveAsDefaultTheme_Click(object sender, EventArgs e) { ThemeSettings.Save(ThemeSettings.DefaultFileName); }