private void BtnAdd_Click(object sender, EventArgs e) { var dialog = new SpecifyOptionSetDialog(CallingControl, false); if (dialog.ShowDialog() == DialogResult.OK) { ChkListBoxOptionSets.Items.Add(dialog.AttributeSchemaName, false); } }
protected virtual void OpenAddDialog() { var dialog = new SpecifyOptionSetDialog(CallingControl, true, "Specify Attribute"); if (dialog.ShowDialog() == DialogResult.OK) { var values = dialog.AttributeSchemaName.Split(new [] { '.' }, StringSplitOptions.RemoveEmptyEntries); if (values.Length == 2) { AddRow(values[0], values[1]); } } }