Beispiel #1
0
        private void CreateTreeView(DirectoryTree rootNode)
        {
            TreeNode root = CreateNode(rootNode);

            foreach (DirectoryTree directory in rootNode.Directories)
            {
                TreeNode node = CreateNode(directory);
                foreach (FileLeaf file in directory.Files)
                {
                    TreeNode leaf = CreateNode(file);

                    node.Nodes.Add(leaf);
                }

                root.Nodes.Add(node);
            }

            foreach (FileLeaf file in rootNode.Files)
            {
                TreeNode leaf = CreateNode(file);

                root.Nodes.Add(leaf);
            }

            projectList.Nodes.Add(root);
        }
Beispiel #2
0
 private TreeNode CreateNode(DirectoryTree directory)
 {
     TreeNode node = new TreeNode(directory.Name);
     node.ImageIndex = node.SelectedImageIndex = 0;
     node.ToolTipText = directory.Location;
     node.Tag = new ActiveCodeFile(directory.Location);
     return node;
 }
Beispiel #3
0
 private void PopulateDirectories()
 {
     Directories = new List<DirectoryTree>();
     foreach (string f in Directory.GetDirectories(Location))
     {
         DirectoryTree t = new DirectoryTree();
         t.Name = DirectoryTreePopulator.GetName(f);
         t.Location = f;
         t.PopulateTree();
         Directories.Add(t);
     }
 }