コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }