예제 #1
0
 private void btnAgregar_Click(object sender, RoutedEventArgs e)
 {
     Input IP = new Input();
     IP.ShowDialog();
     Ar.Insertar(IP.Resultado);
     Canvas.Children.Clear();
     DibujarNodo(Ar.Raiz, Top, Left);
 }
예제 #2
0
 private void btnEliminar_Click(object sender, RoutedEventArgs e)
 {
     Input IP = new Input();
     IP.ShowDialog();
     if (Ar.Eliminar(IP.Resultado))
     {
         Canvas.Children.Clear();
         this.DibujarNodo(Ar.Raiz, Top, Left);
     }
     else
     {
         MessageBox.Show("No se ha eliminado el dato.\nPuede que el dato en cuestion no exista\no sea la raiz.", "Advertencia", MessageBoxButton.OK, MessageBoxImage.Exclamation);
     }
 }