예제 #1
0
        /// <summary>
        /// Load the reference items
        /// </summary>
        /// <param name="createRoot">True to create the root references node or false to find it and reload it</param>
        /// <returns>The root reference item node</returns>
        private TreeNode LoadReferences(bool createRoot)
        {
            TreeNode source, root = null;
            TreeNode[] matches;

            if(createRoot)
            {
                root = new TreeNode("References");
                root.Tag = new NodeData(BuildAction.ReferenceItem, null);
                root.Name = "*References";
                root.ImageIndex = root.SelectedImageIndex = (int)NodeIcon.ReferenceFolder;

                tvProjectFiles.Nodes[0].Nodes.Add(root);

                projectReferences = new ReferenceItemCollection(currentProject);
                projectReferences.ListChanged += referencesAndFiles_ListChanged;
            }
            else
            {
                matches = tvProjectFiles.Nodes[0].Nodes.Find("*References", false);

                if(matches.Length == 1)
                    root = matches[0];
            }

            if(root != null && projectReferences != null)
            {
                root.Nodes.Clear();

                foreach(ReferenceItem refItem in projectReferences.OrderBy(r => r.Reference))
                {
                    source = new TreeNode(refItem.Reference);
                    source.Name = refItem.Reference;
                    source.Tag = new NodeData(BuildAction.ReferenceItem, refItem);
                    source.ImageIndex = source.SelectedImageIndex = (int)NodeIcon.ReferenceItem;
                    root.Nodes.Add(source);
                }

                root.Expand();
            }

            return root;
        }
예제 #2
0
        //=====================================================================

        /// <summary>
        /// Constructor
        /// </summary>
        /// <overloads>There are five overloads for the constructor</overloads>
        protected SandcastleProject()
        {
            characterMatchEval = new MatchEvaluator(this.OnCharacterMatch);
            buildVarMatchEval = new MatchEvaluator(this.OnBuildVarMatch);

            docSources = new DocumentationSourceCollection(this);
            docSources.ListChanged += docSources_ListChanged;

            namespaceSummaries = new NamespaceSummaryItemCollection(this);
            namespaceSummaries.ListChanged += ItemList_ListChanged;

            references = new ReferenceItemCollection(this);
            references.ListChanged += ItemList_ListChanged;

            componentConfigs = new ComponentConfigurationDictionary(this);
            plugInConfigs = new PlugInConfigurationDictionary(this);

            apiFilter = new ApiFilterCollection(this);
            apiFilter.ListChanged += ItemList_ListChanged;

            helpAttributes = new MSHelpAttrCollection(this);
            helpAttributes.ListChanged += ItemList_ListChanged;

            try
            {
                loadingProperties = removeProjectWhenDisposed = true;

                contentPlacement = ContentPlacement.AboveNamespaces;
                cleanIntermediates = keepLogFile = binaryTOC = includeStopWordList = true;

                this.BuildLogFile = null;

                missingTags = MissingTags.Summary | MissingTags.Parameter | MissingTags.TypeParameter |
                    MissingTags.Returns | MissingTags.AutoDocumentCtors | MissingTags.Namespace |
                    MissingTags.AutoDocumentDispose;

                visibleItems = VisibleItems.InheritedFrameworkMembers | VisibleItems.InheritedMembers |
                    VisibleItems.Protected | VisibleItems.ProtectedInternalAsProtected;

                buildAssemblerVerbosity = BuildAssemblerVerbosity.OnlyWarningsAndErrors;
                helpFileFormat = HelpFileFormats.HtmlHelp1;
                htmlSdkLinkType = websiteSdkLinkType = HtmlSdkLinkType.Msdn;
                help2SdkLinkType = MSHelp2SdkLinkType.Msdn;
                helpViewerSdkLinkType = MSHelpViewerSdkLinkType.Msdn;
                sdkLinkTarget = SdkLinkTarget.Blank;
                presentationStyle = Constants.DefaultPresentationStyle;
                namingMethod = NamingMethod.Guid;
                syntaxFilters = ComponentUtilities.DefaultSyntaxFilter;
                collectionTocStyle = CollectionTocStyle.Hierarchical;
                helpFileVersion = "1.0.0.0";
                tocOrder = -1;
                maximumGroupParts = 2;

                this.OutputPath = null;
                this.HtmlHelp1xCompilerPath = this.HtmlHelp2xCompilerPath = this.WorkingPath =
                    this.ComponentPath = null;

                this.HelpTitle = this.HtmlHelpName = this.CopyrightHref = this.CopyrightText =
                    this.FeedbackEMailAddress = this.FeedbackEMailLinkText = this.HeaderText = this.FooterText =
                    this.ProjectSummary = this.RootNamespaceTitle = this.PlugInNamespaces = this.TopicVersion =
                    this.TocParentId = this.TocParentVersion = this.CatalogProductId = this.CatalogVersion =
                    this.CatalogName = null;
                this.FrameworkVersion = null;

                language = new CultureInfo("en-US");
            }
            finally
            {
                loadingProperties = false;
            }
        }