private void AddIEnumerableNodes(object[] items) { for (int i = 0; i < items.Length; i += 100) { int offset = i; int count = offset + 100 > items.Length ? items.Length - offset : 100; IEnumerableNode ienode = new IEnumerableNode("(items [" + offset + "-" + (offset + count) + "])", "", items.GetType()) { List = items, Offset = offset, Count = count }; ienode.HasChildren = true; ienode.ImageId = (int)IconEnum.PublicField; Nodes.Add(ienode); } }
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(); } } }