Example #1
0
        private void refreshToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SizeNode sn = (SizeNode)contextMenuNode.Tag;

            contextMenuNode.Nodes.Clear();
            sn.PrepareRefresh(contextMenuNode.IsExpanded);
            contextMenuNode.Collapse();
            updateTreeNode(contextMenuNode, sn);
            FolderInfo f = sn.FolderInfo.Parent;

            while (f != null)
            {
                lock (f)
                {
                    f.State = ScanState.SCANNING;
                }
                if (nodeMap.ContainsKey(f))
                {
                    SizeNode s = nodeMap[f];
                    s.Update();
                    TreeNode t = s.treeNode;
                    updateTreeNode(t, s);
                }
                f = f.Parent;
            }
            BuildChildren(contextMenuNode);
            fqueue.AddFolder(sn.FolderInfo, fqueue.Generation);
        }
Example #2
0
        private void UpdateFolder00(TreeNode n)
        {
            SizeNode sn = (SizeNode)n.Tag;

            sn.Update();
            updateTreeNode(n, sn);
            for (int i = 0; i < n.Nodes.Count; i++)
            {
                TreeNode nn  = n.Nodes[i];
                SizeNode ssn = (SizeNode)nn.Tag;
                if (ssn.DummyNode == ssn && sn.DummyNode == null)
                {
                    n.Nodes.RemoveAt(i);
                }
                else
                {
                    updateTreeNode(nn, ssn);
                }
            }
            SortNodes((SizeNode)n.Tag, n);
        }
Example #3
0
 private void FillInChildren(SizeNode snParent, TreeNode n)
 {
     if (snParent.ChildrenVisible)
     {
         return;
     }
     this.Cursor = Cursors.WaitCursor;
     snParent.LoadChildren();
     foreach (SizeNode sn in snParent.Directories)
     {
         TreeNode tn = BuildTreeNode(sn);
         nodeMap[sn.FolderInfo] = sn;
         n.Nodes.Add(tn);
         UpdateFolder0(tn);
     }
     foreach (SizeNode sn in filesByExtensionToolStripMenuItem.Checked ? snParent.FileTypeSummaries : snParent.FileSummaries)
     {
         TreeNode tn = BuildTreeNode(sn);
         n.Nodes.Add(tn);
     }
     snParent.Update();
     UpdateFolder0(n);
     this.Cursor = null;
 }
Example #4
0
 private void FillInChildren(SizeNode snParent, TreeNode n)
 {
     if (snParent.ChildrenVisible)
     {
         return;
     }
     this.Cursor = Cursors.WaitCursor;
     snParent.LoadChildren();
     foreach (SizeNode sn in snParent.Directories)
     {
         TreeNode tn = BuildTreeNode(sn);
         nodeMap[sn.FolderInfo] = sn;
         n.Nodes.Add(tn);
         UpdateFolder0(tn);
     }
     foreach (SizeNode sn in filesByExtensionToolStripMenuItem.Checked ? snParent.FileTypeSummaries : snParent.FileSummaries)
     {
         TreeNode tn = BuildTreeNode(sn);
         n.Nodes.Add(tn);
     }
     snParent.Update();
     UpdateFolder0(n);
     this.Cursor = null;
 }