示例#1
0
文件: MFolder.cs 项目: afonsof/nes-hd
        public void FindMFolders()
        {
            var dirs = Directory.GetDirectories(Path);

            foreach (var dir in dirs)
            {
                var fol = new MFolder();
                fol.Path = dir;
                fol.Name = System.IO.Path.GetFileName(dir);
                fol.FindMFolders();
                MFolders.Add(fol);
            }
        }
示例#2
0
 private void AddFolder()
 {
     if (treeView1.SelectedNode == null)
         return;
     var fo = new FolderBrowserDialog();
     fo.Description = "Add roms folder";
     fo.ShowNewFolderButton = true;
     if (fo.ShowDialog(this) == DialogResult.OK)
     {
         var folderr = new MFolder();
         folderr.Path = fo.SelectedPath;
         folderr.Name = Path.GetFileName(fo.SelectedPath);
         folderr.FindMFolders();
         ((TreeNodeFolder) treeView1.SelectedNode).Folder.MFolders.Add(folderr);
         ((TreeNodeFolder) treeView1.SelectedNode).FindFolders();
         treeView1.SelectedNode.Expand();
     }
 }
示例#3
0
 private void AddRootFolder()
 {
     var fo = new FolderBrowserDialog();
     fo.Description = "Add roms folder";
     fo.ShowNewFolderButton = true;
     if (fo.ShowDialog(this) == DialogResult.OK)
     {
         var folderr = new MFolder();
         folderr.Path = fo.SelectedPath;
         folderr.Name = Path.GetFileName(fo.SelectedPath);
         folderr.FindMFolders();
         Program.Settings.Folders.Add(folderr);
         RefreshFolders();
     }
 }
示例#4
0
文件: MFolder.cs 项目: afonsof/nes-hd
 public void FindMFolders()
 {
     var dirs = Directory.GetDirectories(Path);
     foreach (var dir in dirs)
     {
         var fol = new MFolder();
         fol.Path = dir;
         fol.Name = System.IO.Path.GetFileName(dir);
         fol.FindMFolders();
         MFolders.Add(fol);
     }
 }