예제 #1
0
        public DirectoryNode( DirectoryNode parent, DirectoryInfo directoryInfo )
            : base(directoryInfo.Name)
        {
            this._directoryInfo = directoryInfo;

             this.ImageIndex = FileSystemTreeView.Folder;
             this.SelectedImageIndex = this.ImageIndex;

             parent.Nodes.Add( this );

             Virtualize();
        }
예제 #2
0
        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();
        }
예제 #3
0
        public FileNode( DirectoryNode directoryNode, FileInfo fileInfo )
            : base(fileInfo.Name)
        {
            this._directoryNode = directoryNode;
             this._fileInfo = fileInfo;

             this.ImageIndex = ((FileSystemTreeView)_directoryNode.TreeView).GetIconImageIndex( _fileInfo.FullName );
             this.SelectedImageIndex = this.ImageIndex;

             _directoryNode.Nodes.Add( this );
        }