void v_MouseRightButtonUp(object sender, MouseButtonEventArgs e) { if (parentWindow == null) { VisualNode cur = (VisualNode)sender; node <string> curNode = (node <string>)cur.node; Treap <string> first = new Treap <string>(), second = new Treap <string>(); tr.split(ref first, ref second, curNode.key); MainWindow firstMainWindow = new MainWindow(); firstMainWindow.tr = first; firstMainWindow.printTreap(); MainWindow secondMainWindow = new MainWindow(); secondMainWindow.tr = second; secondMainWindow.printTreap(); firstMainWindow.Show(); secondMainWindow.Show(); this.Close(); } }
private void doneBtn_Click(object sender, RoutedEventArgs e) { parentWindow.tr.join(tr); parentWindow.printTreap(); this.Close(); }