public void Load(string directoryPath) { if (Directory.Exists(directoryPath) == false) { throw new DirectoryNotFoundException("Directory Not Found"); } _systemIcons.Clear(); _imageList.Images.Clear(); Nodes.Clear(); Icon folderIcon = new Icon(typeof(FileSystemTreeView), "icons.folder.ico"); _imageList.Images.Add(folderIcon); _systemIcons.Add(FileSystemTreeView.Folder, 0); DirectoryNode node = new DirectoryNode(this, new DirectoryInfo(directoryPath)); node.Expand(); }
public void Load( string directoryPath ) { if( Directory.Exists( directoryPath ) == false ) throw new DirectoryNotFoundException( "Directory Not Found" ); _systemIcons.Clear(); _imageList.Images.Clear(); Nodes.Clear(); Icon folderIcon = new Icon("icons/folder.ico"); _imageList.Images.Add( folderIcon ); _systemIcons.Add( FileSystemTreeView.Folder, 0 ); DirectoryNode node = new DirectoryNode( this, new DirectoryInfo( directoryPath ) ); node.Expand(); }