Example #1
0
        //=====================================================================

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="node">The node that contains the properties to expose
        /// via the Property Browser.</param>
        public DocumentationSourceNodeProperties(DocumentationSourceNode node) : base(node)
        {
            buildVarMatchEval = new MatchEvaluator(this.OnBuildVarMatch);

            documentationSource = node.DocumentationSource;

            sourceFile = new FilePath(documentationSource.Attribute("sourceFile").Value, this);
            sourceFile.PersistablePathChanging += sourceFile_PersistablePathChanging;
            sourceFile.PersistablePathChanged  += sourceFile_PersistablePathChanged;

            if (documentationSource.Attribute("configuration") != null)
            {
                configuration = documentationSource.Attribute("configuration").Value;
            }

            if (documentationSource.Attribute("platform") != null)
            {
                platform = documentationSource.Attribute("platform").Value;
            }

            if (documentationSource.Attribute("subFolders") != null)
            {
                includeSubFolders = documentationSource.Attribute("subFolders").Value.Equals(
                    "true", StringComparison.OrdinalIgnoreCase);
            }
        }
        /// <summary>
        /// This is overridden to remove the documentation source from the project property
        /// </summary>
        /// <param name="node">The node being removed</param>
        public override void RemoveChild(HierarchyNode node)
        {
            DocumentationSourceNode docSource = node as DocumentationSourceNode;

            if (node != null)
            {
                docSource.DocumentationSource.Remove();
                this.StoreDocumentationSources();
            }

            base.RemoveChild(node);
        }
        //=====================================================================

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="node">The node that contains the properties to expose
        /// via the Property Browser.</param>
        public DocumentationSourceNodeProperties(DocumentationSourceNode node) : base(node)
        {
            buildVarMatchEval = new MatchEvaluator(this.OnBuildVarMatch);

            documentationSource = node.DocumentationSource;

            sourceFile = new FilePath(documentationSource.Attribute("sourceFile").Value, this);
            sourceFile.PersistablePathChanging += sourceFile_PersistablePathChanging;
            sourceFile.PersistablePathChanged += sourceFile_PersistablePathChanged;

            if(documentationSource.Attribute("configuration") != null)
                configuration = documentationSource.Attribute("configuration").Value;

            if(documentationSource.Attribute("platform") != null)
                platform = documentationSource.Attribute("platform").Value;

            if(documentationSource.Attribute("subFolders") != null)
                includeSubFolders = documentationSource.Attribute("subFolders").Value.Equals(
                    "true", StringComparison.OrdinalIgnoreCase);
        }