public FormAutoCorrect() { InitializeComponent(); this.DialogResult = DialogResult.None; ComboBoxHandler.ComboBoxPopulateClear(comboBoxAlbum, Properties.Settings.Default.AutoCorrectFormAlbum, ""); ComboBoxHandler.ComboBoxPopulateClear(comboBoxAuthor, Properties.Settings.Default.AutoCorrectFormAuthor, ""); ComboBoxHandler.ComboBoxPopulateClear(comboBoxComments, Properties.Settings.Default.AutoCorrectFormComments, ""); ComboBoxHandler.ComboBoxPopulateClear(comboBoxDescription, Properties.Settings.Default.AutoCorrectFormDescription, ""); ComboBoxHandler.ComboBoxPopulateClear(comboBoxTitle, Properties.Settings.Default.AutoCorrectFormTitle, ""); checkBoxAlbum.Checked = Properties.Settings.Default.UseAutoCorrectFormAlbum; checkBoxAuthor.Checked = Properties.Settings.Default.UseAutoCorrectFormAuthor; checkBoxComments.Checked = Properties.Settings.Default.UseAutoCorrectFormComments; checkBoxDescription.Checked = Properties.Settings.Default.UseAutoCorrectFormDescription; checkBoxTitle.Checked = Properties.Settings.Default.UseAutoCorrectFormTitle; textBoxKeywords.Text = ""; AutoCorrect autoCorrect = AutoCorrect.ConvertConfigValue(Properties.Settings.Default.AutoCorrect); if (autoCorrect.UpdateDescription) { checkBoxDescription.Enabled = false; comboBoxDescription.Enabled = false; kryptonLabelDescriptionBecomesAlbum.Text = "Album values will overwrite Descriptions values, as setup in Config"; } }
private void buttonAutoCorrect_Click(object sender, EventArgs e) { Properties.Settings.Default.UseAutoCorrectFormAlbum = checkBoxAlbum.Checked; Properties.Settings.Default.UseAutoCorrectFormAuthor = checkBoxAuthor.Checked; Properties.Settings.Default.UseAutoCorrectFormComments = checkBoxComments.Checked; Properties.Settings.Default.UseAutoCorrectFormDescription = checkBoxDescription.Checked; Properties.Settings.Default.UseAutoCorrectFormTitle = checkBoxTitle.Checked; ComboBoxHandler.ComboBoxAddLastTextFirstInList(comboBoxAlbum); ComboBoxHandler.ComboBoxAddLastTextFirstInList(comboBoxAuthor); ComboBoxHandler.ComboBoxAddLastTextFirstInList(comboBoxComments); ComboBoxHandler.ComboBoxAddLastTextFirstInList(comboBoxDescription); ComboBoxHandler.ComboBoxAddLastTextFirstInList(comboBoxTitle); Properties.Settings.Default.AutoCorrectFormAlbum = ComboBoxHandler.ComboBoxStringCollection(comboBoxAlbum); Properties.Settings.Default.AutoCorrectFormAuthor = ComboBoxHandler.ComboBoxStringCollection(comboBoxAuthor); Properties.Settings.Default.AutoCorrectFormComments = ComboBoxHandler.ComboBoxStringCollection(comboBoxComments); Properties.Settings.Default.AutoCorrectFormDescription = ComboBoxHandler.ComboBoxStringCollection(comboBoxDescription); Properties.Settings.Default.AutoCorrectFormTitle = ComboBoxHandler.ComboBoxStringCollection(comboBoxTitle); this.DialogResult = DialogResult.OK; }