Пример #1
0
 void generateChildnodes(bool recurse)
 {
     foreach (DirectoryInfo subdir in FileSystemPath.GetDirectories())
     {
         DH_Node newNode = new DH_Node(subdir, Path + "/" + Name, FolderEngine, this, recurse);
         this.Children.Add(newNode);
         thisTreeNode.Nodes.Add(newNode.thisTreeNode);
     }
 }
Пример #2
0
 public void generateTree(bool recursive = true)
 {
     rootNode = new DH_Node(new DirectoryInfo(folderPath), "", this, null, recursive);
 }
Пример #3
0
            public DH_Node(DirectoryInfo _path, string _relativePath, DH_FolderEngine _folderEngine, DH_Node _parent, bool recurse)
            {
                Name = _path.Name;
                FileSystemPath = _path;
                Path = _relativePath;
                Children = new List<DH_Node>();
                Parent = _parent; // this is null if we're the rootnode.
                FolderEngine = _folderEngine;
                thisTreeNode = new System.Windows.Forms.TreeNode(Name);

                if (recurse)
                {
                    generateChildnodes(recurse);
                }
                refreshAttachments();
            }