private void addGroupButton_Click(object sender, EventArgs e) { log.Debug("addGroupButton_Click"); using (InputBox dlg = new InputBox("Change group name", "Enter group name:")) { ColorHighlightGroup item = new ColorHighlightGroup(); item.InitDefaultValues(); dlg.Value = item.GroupName; if (dlg.ShowDialog(this) == DialogResult.OK) { item.GroupName = dlg.Value; this.colorHighlightManager.HighlightGroups.Add(item); this.groupsComboBox.Items.Add(item); this.groupsComboBox.SelectedItem = item; this.groupsComboBox.Focus(); } } }