Exemplo n.º 1
0
 private void DrillTree(TreeNodeCollection tnc, string path, ref bool folderFound)
 {
     foreach (TreeNode tn in tnc)
     {
         if (!folderFound)
         {
             this.SelectedNode = tn;
             string tnPath = ShellOperations.GetFilePath(tn).ToUpper(cultureInfo);
             if (path == tnPath && !folderFound)
             {
                 this.SelectedNode = tn;
                 tn.EnsureVisible();
                 folderFound = true;
                 break;
             }
             else if (path.IndexOf(tnPath) > -1 && !folderFound)
             {
                 tn.Expand();
                 DrillTree(tn.Nodes, path, ref folderFound);
             }
         }
     }
 }
Exemplo n.º 2
0
 public string GetSelectedNodePath()
 {
     return(ShellOperations.GetFilePath(SelectedNode));
 }