Esempio n. 1
0
        private TxTree Create(int i)
        {
            TxTree tree = new TxTree(i);

            if (i > 0)
            {
                tree.Add(Create(i - 1));
            }
            return(tree);
        }
Esempio n. 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            tree.Items.Clear();

            {// Test ok
             //string value = DateTime.Now.ToString();
             //Tree.Add(value);
             //var t = new TxTree("1");
             //t.Add("2");
             //t.Add(new TxTree("3"));
             //Tree.Add(t);
            }

            {// Test ok
                Tree.Add(Create(10));
            }

            {// Test ok
             //Tree.GetChilds[0].Add("temp");
            }

            {// Test ok
             //Tree.GetChilds[0].GetChilds[0].Remove();
            }

            {// Test ok
             //foreach(var node in Tree.GetChilds)
             //{
             //    node.Remove();
             //    break;
             //}
            }

            {
            }

            tree.Items.Add(TxTree.ToTreeViewItem(Tree));
        }