예제 #1
0
        private void probar_Click(object sender, EventArgs e)
        {
            if (int.Parse(aciertos.Text) == 5)
            {
                MessageBox.Show("Felicitaciones. Has completado la actividad");
                jugador.GetDesempeño()[0].SetDesempeño(int.Parse(aciertos.Text), int.Parse(errores.Text));
                menuActividades.Visible = true;
                menuActividades.JuegoTerminado(1);

                this.Dispose();
            }
            intentos.Text = (int.Parse(intentos.Text) + 1).ToString();
            bool acierto = describeImagenController.compararRespuesta(indice, respuesta.Text);

            if (acierto == true)
            {
                imagen.BackgroundImage = Proyecto_Escuela.Properties.Resources.felicitaciones;
                imagenAux.SetDescripcion(respuesta.Text);
                imagenAux.SetPosicion(1);
                respuesta.Enabled  = false;
                reintentar.Enabled = false;
                aciertos.Text      = (int.Parse(aciertos.Text) + 1).ToString();
            }
            else
            {
                imagen.BackgroundImage = Proyecto_Escuela.Properties.Resources.equivocacion;
                reintentar.Enabled     = true;
                errores.Text           = (int.Parse(errores.Text) + 1).ToString();
            }
            probar.Enabled = false;
        }
예제 #2
0
 private void terminar_Click(object sender, EventArgs e)
 {
     menuActividades.Visible = true;
     this.Dispose();
     if (int.Parse(aciertos.Text) == describeImagenModel.GetImagenes().Count)
     {
         menuActividades.JuegoTerminado(1);
     }
 }