private void EditGroup(ComboBox cmb, GroupType groupType, GroupBase group) { RenameGroupForm renameGroupForm = new RenameGroupForm(); renameGroupForm.GroupType = groupType; renameGroupForm.Group = group; if (renameGroupForm.ShowDialog() == DialogResult.OK) { cmb.Items.Clear(); cmb.Items.AddRange(group.Items.ToArray()); if (shop != null) { cmb.Text = ""; cmb.SelectedIndex = -1; } } }
private void CreateGroup(ComboBox cmb, GroupType groupType, GroupBase group) { CreateGroupForm defineGroupForm = new CreateGroupForm(); defineGroupForm.GroupType = groupType; defineGroupForm.Group = group; if (defineGroupForm.ShowDialog() == DialogResult.OK) { cmb.Items.Clear(); cmb.Items.AddRange(group.Items.ToArray()); if (shop != null) { cmb.Text = ""; cmb.SelectedIndex = -1; } } }