示例#1
0
文件: FileTree.CS 项目: kcb146/editor
    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 () ;
    }
示例#2
0
文件: FileTree.CS 项目: HumMod/editor
    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();
    }