private void EditOrAddItem(CustomPropertySchemaItem schemaItem) { bool isNewItem = false; if (schemaItem == null) { schemaItem = new CustomPropertySchemaItem(); schemaItem.Type = CustomPropertyType.Boolean; isNewItem = true; } CustomPropertySchemaItemEditor itemEditor = new CustomPropertySchemaItemEditor(schemaItem, isNewItem); if (itemEditor.ShowDialog() == DialogResult.OK) { if (isNewItem) { if (!IsThereACustomPropertyWithThisName(schemaItem.Name.ToLower())) { _schema.PropertyDefinitions.Add(schemaItem); } } RepopulateListView(); } itemEditor.Dispose(); }
private void EditOrAddItem(CustomPropertySchemaItem schemaItem) { bool isNewItem = false; if (schemaItem == null) { schemaItem = new CustomPropertySchemaItem(); schemaItem.Type = CustomPropertyType.Boolean; isNewItem = true; } CustomPropertySchemaItemEditor itemEditor = new CustomPropertySchemaItemEditor(schemaItem, isNewItem); if (itemEditor.ShowDialog() == DialogResult.OK) { if (isNewItem) { if (!IsThereACustomPropertyWithThisName(schemaItem.Name.ToLower())) { _schema.PropertyDefinitions.Add(schemaItem); } } RepopulateListView(); } itemEditor.Dispose(); }