Пример #1
0
 private void ClearButton_Click(object sender, EventArgs e)
 {
     AddBox.Clear();
     stringsToCheck.Clear();
     stringsCount.Clear();
     richTextBox1.Clear();
     richTextBox2.Clear();
     count = 1;
 }
Пример #2
0
 private void Button_Click2(object sender, RoutedEventArgs e)
 {
     size   = 40;
     width  = 435;
     dx     = width;
     dy     = 80;
     height = 10;
     try
     {
         int test = Convert.ToInt32(AddBox.Text);
         AddBox.Clear();
         bin.FindNode(bin.root, test);
     }
     catch (Exception ex)
     {
         MessageBox.Show("Введите корректное значение!");
     }
 }
Пример #3
0
 private void Button_Click3(object sender, RoutedEventArgs e)
 {
     try {
         int node = Convert.ToInt32(AddBox.Text);
         if (int.TryParse(AddBox.Text, out node))
         {
             size   = 40;
             width  = 435;
             dx     = width;
             dy     = 80;
             height = 10;
             AddBox.Clear();
             canva2.Children.Clear();
             bin.DeleteNode(bin.root, node);
             bin.Print(bin.root);
             for (int h = 0; h < nodes.Count(); h++)
             {
                 size   = 40;
                 width  = 435;
                 dx     = width;
                 dy     = 80;
                 height = 10;
                 bin_copy.Add(nodes[h]);
             }
             nodes.Clear();
             bin_copy.root = null;
         }
         else
         {
             MessageBox.Show("Введите значение!");
         }
     }
     catch (Exception ex)
     {
     }
 }