Ejemplo n.º 1
0
        public override void Add(TreeNode <T> tree)
        {
            LinkedTree <T> gtree = (LinkedTree <T>)tree;

            if (gtree.Parent != null)
            {
                gtree.Remove();
            }
            gtree.parent = this;
            if (gtree.depth + 1 > depth)
            {
                depth = gtree.depth + 1;
                BubbleDepth();
            }
            gtree.level = level + 1;
            gtree.UpdateLevel();
            childrenList.AddLast(gtree);
            count += tree.Count;
            BubbleCount(tree.Count);
        }