Пример #1
0
 internal override void Update(TreeNodeData tnd, bool allowUnsafeChanges, MainForm mf)
 {
     this.mf = mf;
     this.allowUnsafeChanges = allowUnsafeChanges;
     currentWindow           = ((WindowData)tnd).Window;
     UpdateControls();
 }
Пример #2
0
 private void removeFromExistingNodes(TreeNode n, TreeNodeData nd)
 {
     existingNodes.Remove(nd);
     foreach (TreeNode tn in n.Nodes)
     {
         if (tn.Tag is TreeNodeData)
         {
             removeFromExistingNodes(tn, (TreeNodeData)tn.Tag);
         }
     }
 }
Пример #3
0
 private void tree_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (tree.SelectedNode == null)
     {
         selectedChild = NoneControl.Instance;
     }
     else
     {
         TreeNodeData tnd = (TreeNodeData)tree.SelectedNode.Tag;
         selectedChild = tnd.Details;
         selectedChild.Update(tnd, allowChanges.Checked, this);
     }
     UpdateChildControl();
 }
Пример #4
0
        private void refreshNode(WindowCache wc, TreeNode node, bool forceChildren)
        {
            TreeNodeData tnd = (TreeNodeData)node.Tag;

            node.ImageIndex = node.SelectedImageIndex = tnd.Icon;
            node.Text       = tnd.Name;
            if (node.Nodes.Count == 1 && node.Nodes[0].Tag is string)
            {
                return;
            }
            if (node.Nodes.Count == 0 && tnd.HasChildren(wc, visibleObjectsOnlyToolStripMenuItem.Checked) && !node.IsExpanded && !forceChildren)
            {
                node.Nodes.Add("");
                node.Nodes[0].Tag = "";
                return;
            }
            IList <TreeNodeData> children = tnd.GetChildren(wc, visibleObjectsOnlyToolStripMenuItem.Checked);

            bool[] found = new bool[children.Count];
            for (int i = 0; i < node.Nodes.Count; i++)
            {
                TreeNode     n   = node.Nodes[i];
                TreeNodeData nd  = (TreeNodeData)n.Tag;
                int          pos = children.IndexOf(nd);
                if (pos == -1)
                {
                    node.Nodes.RemoveAt(i);
                    removeFromExistingNodes(n, nd);
                    i--;
                }
                else
                {
                    found[pos] = true;
                    refreshNode(wc, n, false);
                }
            }
            for (int i = 0; i < children.Count; i++)
            {
                if (!found[i] && !existingNodes.ContainsKey(children[i]))
                {
                    TreeNode newnode = new TreeNode();
                    newnode.Tag = children[i];
                    node.Nodes.Add(newnode);
                    existingNodes.Add(children[i], newnode);
                    refreshNode(wc, newnode, false);
                }
            }
        }
Пример #5
0
        internal void AddPossibleResult(TreeNodeData data, string text)
        {
            if (!text.StartsWith(prefix))
            {
                return;
            }
            if (regex != null && !regex.IsMatch(text))
            {
                return;
            }
            if (!categoryNodes.ContainsKey(text))
            {
                categoryNodes[text] = new TreeNode(text, 6, 6);
            }
            TreeNode tn = new TreeNode(data.Name, data.Icon, data.Icon);

            tn.Tag = data;
            categoryNodes[text].Nodes.Add(tn);
        }
Пример #6
0
 internal override void Update(TreeNodeData tnd, bool allowUnsafeChanges, MainForm mf)
 {
     currentThread = ((ThreadData)tnd).Thread;
     UpdateControls();
 }
 internal override void Update(TreeNodeData tnd, bool allowUnsafeChanges, MainForm mf)
 {
     this.allowUnsafeChanges = allowUnsafeChanges;
     currentProcess          = ((ProcessData)tnd).Process;
     UpdateControls();
 }
Пример #8
0
 protected override bool EqualsInternal(TreeNodeData tnd)
 {
     return(((AccessibilityData)tnd).accobj.Equals(this.accobj));
 }
Пример #9
0
 protected abstract bool EqualsInternal(TreeNodeData tnd);
Пример #10
0
 protected override bool EqualsInternal(TreeNodeData tnd)
 {
     return(((WindowData)tnd).sw.HWnd == sw.HWnd);
 }
Пример #11
0
 protected override bool EqualsInternal(TreeNodeData tnd)
 {
     return(((ThreadData)tnd).thread.Id.Equals(thread.Id));
 }
Пример #12
0
 protected override bool EqualsInternal(TreeNodeData tnd)
 {
     return(((ProcessData)tnd).process.Id == process.Id);
 }
Пример #13
0
 protected override bool EqualsInternal(TreeNodeData tnd)
 {
     return(true);
 }
Пример #14
0
 internal virtual void Update(TreeNodeData tnd, bool allowUnsafeChanges, MainForm mf)
 {
 }
Пример #15
0
 internal override void Update(TreeNodeData tnd, bool allowUnsafeChanges, MainForm mf)
 {
     currentAccObj = ((AccessibilityData)tnd).AccObj;
     UpdateControls();
 }