示例#1
0
文件: FolderTree.cs 项目: zilo312/aa
 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);
         }
     }
 }