public override bool ApplyToSelf(ISupportsEditing editableObject, SupportedEditingActions actions) { if (base.ApplyToSelf(editableObject, actions)) { XmlConfigurationCategory category = editableObject as XmlConfigurationCategory; if (category != null) { if (_options != null) { _options.ApplyToSelf((ISupportsEditing)category.Options, actions); } if (_categories != null) { _categories.ApplyToSelf((ISupportsEditing)category.Categories, actions); } } return(true); } return(false); }
public bool ApplyToSelf(ISupportsEditing editableObject, SupportedEditingActions actions) { XmlConfigurationOptionCollection options = editableObject as XmlConfigurationOptionCollection; if (options != null) { foreach (XmlConfigurationOption option in options) { XmlConfigurationOption myOption = this[option.ElementName]; if (myOption != null) { try { myOption.ApplyToSelf((ISupportsEditing)option, actions); } catch (Exception ex) { Debug.WriteLine(ex); } } } } return(true); }
public bool ApplyToSelf(ISupportsEditing editableObject, SupportedEditingActions actions) { XmlConfigurationCategoryCollection categories = editableObject as XmlConfigurationCategoryCollection; if (categories != null) { foreach (XmlConfigurationCategory category in categories) { XmlConfigurationCategory myCategory = this[category.ElementName]; if (myCategory != null) { try { myCategory.ApplyToSelf((ISupportsEditing)category, actions); } catch (System.Exception systemException) { System.Diagnostics.Trace.WriteLine(systemException); } } } } return(true); }
public bool ApplyToSelf(ISupportsEditing editableObject, SupportedEditingActions actions) { XmlConfigurationOptionCollection options = editableObject as XmlConfigurationOptionCollection; if (options != null) { foreach (XmlConfigurationOption option in options) { XmlConfigurationOption myOption = this[option.ElementName]; if (myOption != null) { try { myOption.ApplyToSelf((ISupportsEditing)option, actions); } catch (System.Exception systemException) { System.Diagnostics.Trace.WriteLine(systemException); } } } } return(true); }
public virtual bool ApplyToSelf(ISupportsEditing editableObject, SupportedEditingActions actions) { XmlConfigurationElement element = editableObject as XmlConfigurationElement; if (element != null) { // if this fullpath matches the element's full path, then these may apply to each other if (string.Compare(this.Fullpath, element.Fullpath, true) == 0) { if (element.HasChanges) { this.ElementName = element.ElementName; this.Description = element.Description; this.Category = element.Category; this.DisplayName = element.DisplayName; this.Hidden = element.Hidden; this.Readonly = element.Readonly; this.Persistent = element.Persistent; } return(true); } } return(false); }
public bool ApplyToSelf(ISupportsEditing editableObject, SupportedEditingActions actions) { XmlConfigurationOptionCollection options = editableObject as XmlConfigurationOptionCollection; if (options != null) { foreach(XmlConfigurationOption option in options) { XmlConfigurationOption myOption = this[option.ElementName]; if (myOption != null) { try { myOption.ApplyToSelf((ISupportsEditing)option, actions); } catch(Exception ex) { Debug.WriteLine(ex); } } } } return true; }
public override bool ApplyToSelf(ISupportsEditing editableObject, SupportedEditingActions actions) { if (base.ApplyToSelf(editableObject, actions)) { XmlConfigurationOption option = editableObject as XmlConfigurationOption; if (option != null) { if (option.HasChanges) { this.Value = option.Value; this.ValueAssemblyQualifiedName = option.ValueAssemblyQualifiedName; this.EditorAssemblyQualifiedName = option.EditorAssemblyQualifiedName; } } return true; } return false; }
public bool ApplyToSelf(ISupportsEditing editableObject, SupportedEditingActions actions) { XmlConfigurationOptionCollection options = editableObject as XmlConfigurationOptionCollection; if (options != null) { foreach(XmlConfigurationOption option in options) { XmlConfigurationOption myOption = this[option.ElementName]; if (myOption != null) { try { myOption.ApplyToSelf((ISupportsEditing)option, actions); } catch(System.Exception systemException) { System.Diagnostics.Trace.WriteLine(systemException); } } } } return true; }
public override bool ApplyToSelf(ISupportsEditing editableObject, SupportedEditingActions actions) { if (base.ApplyToSelf(editableObject, actions)) { XmlConfigurationCategory category = editableObject as XmlConfigurationCategory; if (category != null) { if (_options != null) _options.ApplyToSelf((ISupportsEditing)category.Options, actions); if (_categories != null) _categories.ApplyToSelf((ISupportsEditing)category.Categories, actions); } return true; } return false; }
public virtual bool ApplyToSelf(ISupportsEditing editableObject, SupportedEditingActions actions) { XmlConfigurationElement element = editableObject as XmlConfigurationElement; if (element != null) { // if this fullpath matches the element's full path, then these may apply to each other if (string.Compare(this.Fullpath, element.Fullpath, true) == 0) { if (element.HasChanges) { this.ElementName = element.ElementName; this.Description = element.Description; this.Category = element.Category; this.DisplayName = element.DisplayName; this.Hidden = element.Hidden; this.Readonly = element.Readonly; this.Persistent = element.Persistent; } return true; } } return false; }
public bool ApplyToSelf(ISupportsEditing editableObject, SupportedEditingActions actions) { XmlConfigurationCategoryCollection categories = editableObject as XmlConfigurationCategoryCollection; if (categories != null) { foreach(XmlConfigurationCategory category in categories) { XmlConfigurationCategory myCategory = this[category.ElementName]; if (myCategory != null) { try { myCategory.ApplyToSelf((ISupportsEditing)category, actions); } catch(Exception ex) { Debug.WriteLine(ex); } } } } return true; }
public override bool ApplyToSelf(ISupportsEditing editableObject, SupportedEditingActions actions) { if (base.ApplyToSelf(editableObject, actions)) { XmlConfiguration configuration = editableObject as XmlConfiguration; if (configuration != null) { if (_categories != null) _categories.ApplyToSelf((ISupportsEditing)configuration.Categories, actions); } return true; } this.ItIsNowTimeToSave(); return false; }
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; }