private void New_Click(object sender, RoutedEventArgs e) { baseTree = new DuplicatesAllowedBaseTree(); baseTree.AddWord((string)null, "Root"); tree = new ViewableTree(baseTree); nodeList.ItemsSource = tree.Root; }
public MainWindow() { InitializeComponent(); baseTree = new DuplicatesAllowedBaseTree(); baseTree.AddWord((string)null, "Root"); tree = new ViewableTree(baseTree); nodeList.ItemsSource = tree.Root; }
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; } }