コード例 #1
0
 private void btnAceptar_Click(object sender, RoutedEventArgs e)
 {
     if (txtNombreJugador.Text == "")
     {
         MessageBox.Show("Ingrese el nombre del Jugador");
     }
     else
     {
         partida.agregarJugador(new Jugador(txtNombreJugador.Text));
         if (cantidadRestante > 1)
         {
             cantidadRestante--;
             winNombreJugador nombreJugador = new winNombreJugador(cantidadRestante, cantidadJugadores);
             nombreJugador.Show();
             this.Close();
         }
         else
         {
             winActiveBusiness juego = new winActiveBusiness();
             partida.ventanas.Add(juego);
             juego.Show();
             this.Close();
         }
     }
 }
コード例 #2
0
 private void btnAceptar_Click(object sender, RoutedEventArgs e)
 {
     if ((rdbDos.IsChecked == false) && (rdbTres.IsChecked == false) && (rdbCuatro.IsChecked == false))
     {
         MessageBox.Show("Selecciona la cantidad de jugadores!");
     }
     else
     {
         winNombreJugador nombreJugador = new winNombreJugador(cantidadJugadores, cantidadJugadores);
         nombreJugador.Show();
         this.Close();
     }
 }