示例#1
0
        private void New_Click(object sender, RoutedEventArgs e)
        {
            baseTree = new DuplicatesAllowedBaseTree();
            baseTree.AddWord((string)null, "Root");

            tree = new ViewableTree(baseTree);
            nodeList.ItemsSource = tree.Root;
        }
示例#2
0
        public MainWindow()
        {
            InitializeComponent();

            baseTree = new DuplicatesAllowedBaseTree();
            baseTree.AddWord((string)null, "Root");

            tree = new ViewableTree(baseTree);
            nodeList.ItemsSource = tree.Root;
        }
示例#3
0
        private void Load_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.FileName   = "Tree";
            ofd.DefaultExt = ".tree";
            ofd.Filter     = "Tree Files (.tree)|*.tree";

            Nullable <bool> result = ofd.ShowDialog();

            if (result == true)
            {
                string filename = ofd.FileName;
                TreeIO io       = new TreeIO();
                baseTree = io.LoadBaseTree(filename);

                tree = new ViewableTree(baseTree);
                nodeList.ItemsSource = tree.Root;
            }
        }