示例#1
0
        public void ToggleHidden(Project project, string[] paths)
        {
            foreach (string path in paths)
            {
                bool isHidden = project.IsPathHidden(path);
                project.SetPathHidden(path, !isHidden);
            }
            project.Save();

            OnProjectModified(null);
        }
示例#2
0
        bool IsFileExcluded(string path, Project project)
        {
            if (path == project.ProjectPath) return true;

            return !project.ShowHiddenPaths && (project.IsPathHidden(path) || path.IndexOf("\\.") >= 0 || ProjectTreeView.IsFileTypeHidden(path));
        }
示例#3
0
        private void PopulateChildNodes(bool recursive, Project project)
        {
            dirty = false;

            // nuke the placeholder
            if (Nodes.Count == 1 && Nodes[0] is PlaceholderNode)
                Nodes.RemoveAt(0);

            // do a nice stateful update against the filesystem
            GenericNodeList nodesToDie = new GenericNodeList();

            // don't remove project output node if it exists - it's annoying when it
            // disappears during a build
            foreach (GenericNode node in Nodes)
            {
                if (node is ProjectOutputNode && !project.IsPathHidden((node as ProjectOutputNode).BackingPath))
                    (node as ProjectOutputNode).Refresh(recursive);
                else
                    nodesToDie.Add(node);

                // add any mapped nodes
                if (node is FileNode && !(node is SwfFileNode))
                    nodesToDie.AddRange(node.Nodes);
            }

            if (Directory.Exists(BackingPath))
            {
                PopulateDirectories(nodesToDie, recursive, project);
                PopulateFiles(nodesToDie, recursive, project);
            }

            foreach (GenericNode node in nodesToDie)
            {
                node.Dispose();
                Nodes.Remove(node);
            }
        }
示例#4
0
        bool IsDirectoryExcluded(string path, Project project)
        {
            string dirName = Path.GetFileName(path);
            foreach (string excludedDir in PluginMain.Settings.ExcludedDirectories)
                if (dirName.Equals(excludedDir, StringComparison.OrdinalIgnoreCase))
                    return true;

            return !project.ShowHiddenPaths && project.IsPathHidden(path);
        }