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 () ; }
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(); }