public void FillTree() { //FillTreeView tree.FillOneLevelTree(treeView1); ImageList imgList = new ImageList(); imgList.ColorDepth = ColorDepth.Depth32Bit; imgList.Images.Add(new Icon(@"D:\Working\ALLinONE_Manager\Coding\ALLinONE_Manager\AIOIcon\folder3.ico")); imgList.Images.Add(new Icon(@"D:\Working\ALLinONE_Manager\Coding\ALLinONE_Manager\AIOIcon\file1.ico")); imgList.Images.Add(new Icon(@"D:\Working\ALLinONE_Manager\Coding\ALLinONE_Manager\AIOIcon\folder2_green.ico")); treeView1.ImageList = imgList; treeView1.SelectedImageIndex = 2; treeView1.Nodes[0].Expand(); treeView1.SelectedNode = treeView1.Nodes[0]; treeView1.Refresh(); //FillListView listView1.SmallImageList = imgList; listView1.LargeImageList = imgList; timer.Stop(); lblTotal.Text = "Folders: " + tree.FoldersCount + " Files: " + tree.FilesCount + " List: " + lstDirectory.Items.Count + " Elapsed: " + timer.Duration + " (s)"; }
public void SetTree(AIOFolderTree tree2) { this.tree = tree2; //RegisterEvent tree.UpdateLogicalExplorer += new AIOCommon.AIOFolderTree.UpdateLogicalExplorerDele(tree_UpdateLogicalExplorer); tree.FillOneLevelTree(treeView1); treeView1.SelectedNode = treeView1.Nodes[0]; UpdateListView(); }