private void SmartExpandNodes(int minChildCount)
        {
            TreeListNodeIterator nodeIterator = new TreeListNodeIterator(treeListView1.Nodes, true);

            while (nodeIterator.MoveNext())
            {
                nodeIterator.Current.IsExpanded = nodeIterator.Current.Nodes.Count >= minChildCount;
            }
        }
        protected void AttachItems(TreeListNodeCollection nodes)
        {
            TreeListNodeIterator iterator = new TreeListNodeIterator(nodes);

            while (iterator.MoveNext())
            {
                this.SubscribeObject(iterator.Current.Content);
                if (iterator.Current.HasChildren)
                {
                    this.AttachItems(iterator.Current.Nodes);
                }
            }
        }
        protected TreeListNode FindNodeByValue(object obj, TreeListNodeCollection nodes)
        {
            TreeListNode         result   = null;
            TreeListNodeIterator iterator = new TreeListNodeIterator(nodes);

            while (iterator.MoveNext() && result == null)
            {
                if (iterator.Current.Content == obj)
                {
                    result = iterator.Current;
                }
                if (result == null && iterator.Current.HasChildren)
                {
                    result = this.FindNodeByValue(obj, iterator.Current.Nodes);
                }
            }

            return(result);
        }