public void Inspect(string name, Object o, bool autoExpand, Type t) { var insertPosition = Math.Min(2, InspectedObjects.Count); foreach (var currentObject in InspectedObjects) { var currentNode = currentObject; if (currentNode.Name == name) { if (currentNode.Type != t) { InspectedObjects.Remove(currentNode); currentNode = new InspectorNode(o, name, autoExpand); InspectedObjects.Add(currentNode); } else { currentNode.RootTarget = o; } // This might be null if the window has not oppened yet. if (currentNode.UIContainer != null) { currentNode.UIContainer.IsSelected = true; currentNode.UIContainer.BringIntoView(); } return; } } var root = new InspectorNode(o, name, autoExpand); InspectedObjects.Insert(insertPosition, root); }
public override void Watch(InspectorNode node) { if (_inspectorUI == null) { return; } _inspectorUI.Watch(node); }
public void Watch(InspectorNode node) { if (node == null) { return; } WatchedNodes.Add(node); }
void UpdateFilterRecursively(InspectorNode node) { if (node.ChildrenView != null) { foreach (var child in node.Children) { UpdateFilterRecursively(child); } node.ChildrenView.View.Refresh(); if (node.UserModified && node.UIContainer != null) { node.UIContainer.IsExpanded = true; } } }
public void RemoveInspect(Object o) { InspectorNode container = null; foreach (var node in InspectedObjects) { if (node.Target == o) { container = node; break; } } if (container != null) { InspectedObjects.Remove(container); } }
public virtual void Watch(InspectorNode node) { }
public override void Watch(InspectorNode node) { }