Exemple #1
0
    public FileTree (Panel ParentArg)
    { This = this ;

      Parent = ParentArg ;

      Dock = DockStyle.Fill ;
      BeforeExpand += new TreeViewCancelEventHandler (OnExpand) ; 
      BeforeSelect += new TreeViewCancelEventHandler (OnSelect) ;

      foreach (DriveInfo Drive in DriveInfo.GetDrives())
      { TreeNode Child = new TreeNode();

        Child.Text = Drive.Name;
        Child.Nodes.Add("");

        Nodes.Add (Child);
      }

      Restore () ;
    }
Exemple #2
0
    public FileTree(Panel ParentArg)
    {
        This = this;

        Parent = ParentArg;

        Dock          = DockStyle.Fill;
        BeforeExpand += new TreeViewCancelEventHandler(OnExpand);
        BeforeSelect += new TreeViewCancelEventHandler(OnSelect);

        foreach (DriveInfo Drive in DriveInfo.GetDrives())
        {
            TreeNode Child = new TreeNode();

            Child.Text = Drive.Name;
            Child.Nodes.Add("");

            Nodes.Add(Child);
        }

        Restore();
    }