Exemplo n.º 1
0
        private void cmdMundoResta_Click(object sender, EventArgs e)
        {// llamo al mundo de la resta
            Niveles_RESTA cargarNxRTB = new Niveles_RESTA();

            this.Hide();
            cargarNxRTB.ShowDialog();
            this.Show();
        }
Exemplo n.º 2
0
        private void timerN1R_Tick(object sender, EventArgs e)
        {
            int puntemin1R1 = 50000, limiinfe1R1 = 0, limeinfe2R1 = 0, A1R1 = 0,
                limiinfe3R1 = 0, limesupe1R1 = 0, limesupe2R1 = 0, limisupe3R1 = 0;

            A1R1 = (punteomaxR1 - puntemin1R1) / 3;

            limiinfe1R1 = puntemin1R1;
            limeinfe2R1 = puntemin1R1 + A1R1;
            limiinfe3R1 = puntemin1R1 + (2 * A1R1);
            limesupe1R1 = (puntemin1R1 + A1R1) - 1;
            limesupe2R1 = ((puntemin1R1 + (2 * A1R1)) - 1);
            limisupe3R1 = punteomaxR1;

            tiempoR1--;
            lblpunteoN1R.Text = cargarclaseN1R.punteosN1R();

            if ((Convert.ToInt32(lblpunteoN1R.Text) >= limiinfe1R1) && (Convert.ToInt32(lblpunteoN1R.Text) <= limesupe1R1))
            {
                picestreR1.Image = imglisR.Images[1];
            }
            else
            {
                picestreR1.Image = imglisR.Images[0];
            }
            if ((Convert.ToInt32(lblpunteoN1R.Text) >= limeinfe2R1) && (Convert.ToInt32(lblpunteoN1R.Text) <= limesupe2R1))
            {
                picestreR1.Image = imglisR.Images[2];
            }
            if ((Convert.ToInt32(lblpunteoN1R.Text) >= limiinfe3R1) && (Convert.ToInt32(lblpunteoN1R.Text) <= limisupe3R1))
            {
                picestreR1.Image = imglisR.Images[3];
            }

            if ((tiempoR1 >= 0) && (Convert.ToInt32(lblpunteoN1R.Text) > 0) && (Convert.ToInt32(lblpunteoN1R.Text) >= puntemin1R1))
            {
                lbltiempoN1R.Text = tiempoR1.ToString();
            }
            else
            {
                timerN1R.Stop();
                lblpunteoN1R.Text = "0";                                     // el punteo baja a 0
                picestreR1.Image  = imglisR.Images[0];                       // no se muestra imagen
                MessageBox.Show("Lo siento ha perdido, vuela a intentarlo"); // mostrar mensaje de volver a intentarlo
                Niveles_RESTA perdiste1R = new Niveles_RESTA();              // reinicir la tab
                this.Hide();
                perdiste1R.ShowDialog();
                this.Close();
            }
        }
Exemplo n.º 3
0
        private void timerN3R_Tick(object sender, EventArgs e)
        {
            int puntemin1R3 = 60000, limiinfe1R3 = 0, limeinfe2R3 = 0, A1R3 = 0,
                limiinfe3R3 = 0, limesupe1R3 = 0, limesupe2R3 = 0, limisupe3R3 = 0;

            A1R3 = (punteomaxR3 - puntemin1R3) / 3;

            limiinfe1R3 = puntemin1R3;
            limeinfe2R3 = puntemin1R3 + A1R3;
            limiinfe3R3 = puntemin1R3 + (2 * A1R3);
            limesupe1R3 = (puntemin1R3 + A1R3) - 1;
            limesupe2R3 = ((puntemin1R3 + (2 * A1R3)) - 1);
            limisupe3R3 = punteomaxR3;

            if ((Convert.ToInt32(lblpunteosN3R.Text) >= limiinfe1R3) && (Convert.ToInt32(lblpunteosN3R.Text) <= limesupe1R3))
            {
                picestreR3.Image = imglisR.Images[1];
            }
            else
            {
                picestreR3.Image = imglisR.Images[0];
            }
            if ((Convert.ToInt32(lblpunteosN3R.Text) >= limeinfe2R3) && (Convert.ToInt32(lblpunteosN3R.Text) <= limesupe2R3))
            {
                picestreR3.Image = imglisR.Images[2];
            }
            if ((Convert.ToInt32(lblpunteosN3R.Text) >= limiinfe3R3) && (Convert.ToInt32(lblpunteosN3R.Text) <= limisupe3R3))
            {
                picestreR3.Image = imglisR.Images[3];
            }

            tiempoR3--;
            lblpunteosN3R.Text = cargarLvl3Res.quitapunteos_segundosN3R();
            if ((tiempoR3 >= 0) && (Convert.ToInt32(lblpunteosN3R.Text) > 0) && (Convert.ToInt32(lblpunteosN3R.Text) >= puntemin1R3))
            {
                lbltiempoN3R.Text = tiempoR3.ToString();
            }
            else
            {
                timerN3R.Stop();
                lblpunteoN2R.Text = "0";
                picestreR3.Image  = imglisR.Images[0];
                MessageBox.Show("Lo siento ha perdido, vuela a intentarlo"); // mostrar mensaje de volver a intentarlo
                Niveles_RESTA perdiste3R = new Niveles_RESTA();              // reinicir la tab
                this.Hide();
                perdiste3R.ShowDialog();
                this.Close();
            }
        }
Exemplo n.º 4
0
        private void timerN5R_Tick(object sender, EventArgs e)
        {
            int puntemin1R5 = 65000, limiinfe1R5 = 0, limeinfe2R5 = 0, A1R5 = 0,
                limiinfe3R5 = 0, limesupe1R5 = 0, limesupe2R5 = 0, limisupe3R5 = 0;

            A1R5 = (punteomax5R - puntemin1R5) / 3;

            limiinfe1R5 = puntemin1R5;
            limeinfe2R5 = puntemin1R5 + A1R5;
            limiinfe3R5 = puntemin1R5 + (2 * A1R5);
            limesupe1R5 = (puntemin1R5 + A1R5) - 1;
            limesupe2R5 = ((puntemin1R5 + (2 * A1R5)) - 1);
            limisupe3R5 = punteomax5R;

            if ((Convert.ToInt32(lblpunteoN5R.Text) >= limiinfe1R5) && (Convert.ToInt32(lblpunteoN5R.Text) <= limesupe1R5))
            {
                picestreR5.Image = imglisR.Images[1];
            }
            else
            {
                picestreR5.Image = imglisR.Images[0];
            }
            if ((Convert.ToInt32(lblpunteoN5R.Text) >= limeinfe2R5) && (Convert.ToInt32(lblpunteoN5R.Text) <= limesupe2R5))
            {
                picestreR5.Image = imglisR.Images[2];
            }
            if ((Convert.ToInt32(lblpunteoN5R.Text) >= limiinfe3R5) && (Convert.ToInt32(lblpunteoN5R.Text) <= limisupe3R5))
            {
                picestreR5.Image = imglisR.Images[3];
            }
            tiempo5R--;
            lblpunteoN5R.Text = llamarclalvlR5.quitapunteos_segundosNR5();
            if ((tiempo5R >= 0) && (Convert.ToInt32(lblpunteoN5R.Text) > 0) && (Convert.ToInt32(lblpunteoN5R.Text) >= puntemin1R5))
            {
                lbltiempoN5R.Text = tiempoR2.ToString();
            }
            else
            {
                timerN5R.Stop();
                lblpunteoN5R.Text = "0";
                picestreR5.Image  = imglisR.Images[0];
                MessageBox.Show("Lo siento ha perdido, vuela a intentarlo"); // mostrar mensaje de volver a intentarlo
                Niveles_RESTA perdiste5R = new Niveles_RESTA();              // reinicir la tab
                this.Hide();
                perdiste5R.ShowDialog();
                this.Close();
            }
        }