Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 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();
         }
     }
 }
Ejemplo n.º 3
0
 public bool IsTrue(TLNode node)
 {
     return(condition(node));
 }
Ejemplo n.º 4
0
 void tree_NotifyBeforeExpand(TLNode node, bool isExpanding)
 {
     ExpandMembersOfNode(node);
 }