private void AssemblyTreeView_BeforeExpand(object sender, TreeViewCancelEventArgs e) { AssemblyTreeFolder folder = e.Node as AssemblyTreeFolder; if (folder != null) { folder.Refresh(); return; } AssemblyTreeFile file = e.Node as AssemblyTreeFile; if (file != null) { file.Refresh(); return; } }
// adds only root folder content public void RefreshNodes() { this.BeginUpdate(); // add root TreeNode[] nodes = rootFolder.Refresh(); Nodes.Clear(); foreach (TreeNode n in nodes) { Nodes.Add(n); } this.EndUpdate(); //this.Refresh(); RefreshSelectedNode(true); }