internal override void Update(TreeNodeData tnd, bool allowUnsafeChanges, MainForm mf) { this.mf = mf; this.allowUnsafeChanges = allowUnsafeChanges; currentWindow = ((WindowData)tnd).Window; UpdateControls(); }
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); } } }
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(); }
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); } } }
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); }
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(); }
protected override bool EqualsInternal(TreeNodeData tnd) { return(((AccessibilityData)tnd).accobj.Equals(this.accobj)); }
protected abstract bool EqualsInternal(TreeNodeData tnd);
protected override bool EqualsInternal(TreeNodeData tnd) { return(((WindowData)tnd).sw.HWnd == sw.HWnd); }
protected override bool EqualsInternal(TreeNodeData tnd) { return(((ThreadData)tnd).thread.Id.Equals(thread.Id)); }
protected override bool EqualsInternal(TreeNodeData tnd) { return(((ProcessData)tnd).process.Id == process.Id); }
protected override bool EqualsInternal(TreeNodeData tnd) { return(true); }
internal virtual void Update(TreeNodeData tnd, bool allowUnsafeChanges, MainForm mf) { }
internal override void Update(TreeNodeData tnd, bool allowUnsafeChanges, MainForm mf) { currentAccObj = ((AccessibilityData)tnd).AccObj; UpdateControls(); }