示例#1
0
        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();
            }
        }
示例#2
0
 private void doneBtn_Click(object sender, RoutedEventArgs e)
 {
     parentWindow.tr.join(tr);
     parentWindow.printTreap();
     this.Close();
 }