Exemplo n.º 1
0
        internal static void AddNonMemberItems(XProjectNode project)
        {
            IList <string> files   = new List <string>();
            IList <string> folders = new List <string>();

            // obtain the list of files and folders under the project folder.
            XProjectMembers.GetRelativeFileSystemEntries(project.ProjectFolder, null, files, folders);

            // exclude the items which are the part of the build.
            XProjectMembers.ExcludeProjectBuildItems(project, files, folders);
            ThreadHelper.ThrowIfNotOnUIThread();

            XProjectMembers.AddNonMemberFolderItems(project, folders);
            XProjectMembers.AddNonMemberFileItems(project, files);
        }
Exemplo n.º 2
0
        protected internal int ToggleShowAllFiles()
        {
            if (this.ProjectMgr == null || this.ProjectMgr.IsClosed)
            {
                return((int)OleConstants.OLECMDERR_E_NOTSUPPORTED);
            }

            using (XHelperMethods.NewWaitCursor())
            {
                ThreadHelper.ThrowIfNotOnUIThread();
                this.showAllFilesEnabled = !this.showAllFilesEnabled; // toggle the flag

                if (this.showAllFilesEnabled)
                {
                    XProjectMembers.AddNonMemberItems(this);
                }
                else
                {
                    XProjectMembers.RemoveNonMemberItems(this);
                }
            }

            return(VSConstants.S_OK);
        }