Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 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();
     }
 }
Exemplo n.º 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();
     }
 }
Exemplo n.º 4
0
 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);
     }
 }