Ejemplo n.º 1
0
 internal override void Update(TreeNodeData tnd, bool allowUnsafeChanges, MainForm mf)
 {
     this.mf = mf;
     this.allowUnsafeChanges = allowUnsafeChanges;
     currentWindow           = ((WindowData)tnd).Window;
     UpdateControls();
 }
Ejemplo n.º 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);
         }
     }
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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);
                }
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 6
0
 internal override void Update(TreeNodeData tnd, bool allowUnsafeChanges, MainForm mf)
 {
     currentThread = ((ThreadData)tnd).Thread;
     UpdateControls();
 }
Ejemplo n.º 7
0
 internal override void Update(TreeNodeData tnd, bool allowUnsafeChanges, MainForm mf)
 {
     this.allowUnsafeChanges = allowUnsafeChanges;
     currentProcess          = ((ProcessData)tnd).Process;
     UpdateControls();
 }
Ejemplo n.º 8
0
 protected override bool EqualsInternal(TreeNodeData tnd)
 {
     return(((AccessibilityData)tnd).accobj.Equals(this.accobj));
 }
Ejemplo n.º 9
0
 protected abstract bool EqualsInternal(TreeNodeData tnd);
Ejemplo n.º 10
0
 protected override bool EqualsInternal(TreeNodeData tnd)
 {
     return(((WindowData)tnd).sw.HWnd == sw.HWnd);
 }
Ejemplo n.º 11
0
 protected override bool EqualsInternal(TreeNodeData tnd)
 {
     return(((ThreadData)tnd).thread.Id.Equals(thread.Id));
 }
Ejemplo n.º 12
0
 protected override bool EqualsInternal(TreeNodeData tnd)
 {
     return(((ProcessData)tnd).process.Id == process.Id);
 }
Ejemplo n.º 13
0
 protected override bool EqualsInternal(TreeNodeData tnd)
 {
     return(true);
 }
Ejemplo n.º 14
0
 internal virtual void Update(TreeNodeData tnd, bool allowUnsafeChanges, MainForm mf)
 {
 }
Ejemplo n.º 15
0
 internal override void Update(TreeNodeData tnd, bool allowUnsafeChanges, MainForm mf)
 {
     currentAccObj = ((AccessibilityData)tnd).AccObj;
     UpdateControls();
 }