protected void AddNode(TLNode parentNode, MemberNode n, bool showControls, bool showFields, bool showProperties) { bool add = true; if (!showControls && typeof(Control).IsAssignableFrom(n.Member.GetReturnType())) { // don't add add = false; } if (!showFields && n.Member is FieldInfo) { // don't add add = false; } if (!showProperties && n.Member is PropertyInfo) { // don't add add = false; } if (add) { parentNode.Nodes.Add(n); } }
private void ExpandMembersOfNode(TLNode node) { if (node is MemberNode) { MemberNode n = (MemberNode)node; if (n.Nodes.Count == 0) { n.ExpandMembers(btnShowControls.Checked, btnShowFields.Checked, btnShowProperties.Checked); } } else if (node is IEnumerableNode) { IEnumerableNode n = (IEnumerableNode)node; if (n.Nodes.Count == 0) { n.ExpandMembers(); } } }
public bool IsTrue(TLNode node) { return(condition(node)); }
void tree_NotifyBeforeExpand(TLNode node, bool isExpanding) { ExpandMembersOfNode(node); }