public void buildProjectFolder(FolderTreeNode node) { List<FiledropsFileSystemEntry> entries = node.filter.getAllowedDirectoryContents(node.Entry as FiledropsDirectory, FileSystemEntryType.Folder); // double loop: for sorting the folders as in the list of accepted directories. foreach (string accepted in accepteddirs.Keys) { foreach (FiledropsFileSystemEntry entry in entries) { if (entry.Name == accepted && entry.EntryType == FileSystemEntryType.Folder) { // Filter: show only files with an extension in Filters[i]; show all subdirectories FolderTreeNodeFilter filter = new FolderTreeNodeFilter(new string[] { accepteddirs[entry.Name] }); FolderTreeNode item = node.createFolderNode(entry as FiledropsDirectory, filter); item.Tag = "TopFolder"; item.FontWeight = FontWeights.Normal; node.Items.Add(item); } } } }
public override void buildFolderRoot(FolderTreeNode node) { List<FiledropsFileSystemEntry> entries = (node.Entry as FiledropsDirectory).GetEntries(); SolutionInfo solution = Manager.GetSolutionWithPath((node.Entry as FiledropsDirectory).FullName); if (solution == null) return; foreach (string projectdir in solution.GetProjectNames()) { foreach (FiledropsFileSystemEntry entry in entries) { if (entry.Name == projectdir && entry.EntryType == FileSystemEntryType.Folder) { if (solution.projects[entry.Name] != null) { entry.FileSystem = solution.projects[entry.Name].FileSystem; } // Filter: don't show any files; show only subdirectories in AcceptedDirs FolderTreeNodeFilter filter = new FolderTreeNodeFilter(new string[] { }, accepteddirs.Keys.ToArray()); FolderTreeNode item = node.createFolderNode(entry as FiledropsDirectory, filter, false); //item.Tag = "TopFolder"; item.FontWeight = FontWeights.Normal; buildProjectFolder(item); node.Items.Add(item); } } } }
public override void buildFolderRoot(FolderTreeNode node) { List<FiledropsFileSystemEntry> entries = (node.Entry as FiledropsDirectory).GetEntries(); int i = 0; foreach (string accepted in AcceptedDirs)//this way top folders will be sorted like the accepted list { foreach (FiledropsFileSystemEntry entry in entries) { if (entry.Name == accepted && entry.EntryType == FileSystemEntryType.Folder) { FolderTreeNodeFilter filter = new FolderTreeNodeFilter(new string[] { Filters[i] }, new string[] { }); FolderTreeNode item = node.createFolderNode(entry as FiledropsDirectory, filter); item.Tag = "TopFolder"; item.FontWeight = FontWeights.Normal; if (ShowRoot) node.Items.Add(item); else this.Items.Add(item); } } i++; } }