Пример #1
0
 private void LoadTree(FolderNode folder)
 {
     string[] dirs = Directory.GetDirectories(folder.FolderPath);
     foreach (string dir in dirs)
     {
         FolderNode tmpfolder = new FolderNode(dir);
         folder.Nodes.Add(tmpfolder);
         LoadTree(tmpfolder);
     }
     if (_showFiles)
     {
         string[] files = Directory.GetFiles(folder.FolderPath);
         foreach (string file in files)
         {
             FileNode fnode = new FileNode(file);
             folder.Nodes.Add(fnode);
         }
     }
 }