Пример #1
0
 private void ScanDir(string path)
 {
     LogMethood("Scaning dir: " + path);
     IEnumerable<string> fileNames = Directory.GetFiles(path);
     foreach (string fn in fileNames)
     {
         SrcFile f = new SrcFile(fn);
         this.Files.Add(f);
     }
     IEnumerable<string> dirNames = Directory.GetDirectories(path);
     foreach (string dn in dirNames)
     {
         SrcDir d = new SrcDir(dn, LogMethood);
         this.Directories.Add(d);
     }
 }
Пример #2
0
 private void DrawFile(SrcFile file, TreeNode parentNode)
 {
     string Title = string.Format("{0} - {1}", file.Name, file.LinesCount);
     TreeNode tn = new TreeNode(Title);
     parentNode.Nodes.Add(tn);
 }