public override bool ApplyChanges(ISupportsEditing editableObject, SupportedEditingActions actions) { if (base.ApplyChanges(editableObject, actions)) { XmlConfiguration configuration = editableObject as XmlConfiguration; if (configuration != null) { if (_isBeingEdited) { this.BeginInit(); } if (_categories != null) { _categories.ApplyChanges((ISupportsEditing)configuration.Categories, actions); } if (_isBeingEdited) { this.EndInit(); } } return(true); } return(false); }
// protected override XmlConfigurationElement GetElementToEdit() // { // XmlConfigurationCategory category = (XmlConfigurationCategory)this.Clone(); // category.Parent = this.Parent; // return (XmlConfigurationElement)category; // } public override bool ApplyChanges(ISupportsEditing editableObject, SupportedEditingActions actions) { if (base.ApplyChanges(editableObject, actions)) { XmlConfigurationCategory category = editableObject as XmlConfigurationCategory; if (category != null) { if (_categories != null) { _categories.ApplyChanges((ISupportsEditing)category.Categories, actions); } } return(true); } return(false); }