void treeViewAdv1_Expanding(object sender, TreeViewAdvEventArgs e) { if (_client.State != XdebugClientState.Break) { MessageBox.Show( "This property is no longer available. Close the Property window and try running the script again.", "Property invalidated", MessageBoxButtons.OK ); return; } DebugNode node = e.Node.Tag as DebugNode; if (node != null && !node.Property.isComplete) { this.treeViewAdv1.BeginUpdate(); Property p = _client.GetPropertyValue(node.Property.FullName); /* We don't want 'p' itself. It will be a copy of the node that * was marked as inComplete. */ foreach (Property child in p.ChildProperties) { DebugNode newNode = this.BuildDebugNode(child, node); node.Nodes.Add(newNode); } node.Property.isComplete = true; this.treeViewAdv1.EndUpdate(); } }
void nodeTextBox1_DrawText(object sender, Aga.Controls.Tree.NodeControls.DrawEventArgs e) { DebugNode node = e.Node.Tag as DebugNode; if (node.Changed) { e.TextColor = Color.Red; } }
private void fillDataMap(Collection <Node> nodes) { foreach (Node node in nodes) { DebugNode dnode = node as DebugNode; if (dnode != null && dnode.Property != null) { dataMap[dnode.Property.FullName] = dnode.Property.Type + dnode.Property.Value; } fillDataMap(node.Nodes); } }
public void LoadPropertyList(List <Property> list) { this.treeViewAdv1.BeginUpdate(); // todo, save old expand states, scroll?, changed fillDataMap(_Model.Nodes); _Model.Nodes.Clear(); foreach (Property p in list) { DebugNode node = this.BuildDebugNode(p, null); _Model.Nodes.Add(node); } this.treeViewAdv1.EndUpdate(); }
public DebugNode BuildDebugNode(Property p, DebugNode Parent) { DebugNode newNode = new DebugNode(p); if (dataMap.ContainsKey(p.FullName) && dataMap[p.FullName] != p.Type + p.Value) newNode.Changed = true; if (Parent != null && Parent is DebugNode) { newNode.Parent = Parent; } foreach (Property Child in p.ChildProperties) { DebugNode tmpNode = this.BuildDebugNode(Child, newNode); } return newNode; }
public DebugNode BuildDebugNode(Property p, DebugNode Parent) { DebugNode newNode = new DebugNode(p); if (dataMap.ContainsKey(p.FullName) && dataMap[p.FullName] != p.Type + p.Value) { newNode.Changed = true; } if (Parent != null && Parent is DebugNode) { newNode.Parent = Parent; } foreach (Property Child in p.ChildProperties) { DebugNode tmpNode = this.BuildDebugNode(Child, newNode); } return(newNode); }