private void btnSiguiente_Click(object sender, EventArgs e) { if (NumeroPregunta < 10) { //PreguntasDelCuestionaro Pregunta = (PreguntasDelCuestionaro)Preguntas[Aleatorio[NumeroPregunta]]; PreguntasDelCuestionaro Pregunta = (PreguntasDelCuestionaro)Preguntas[Numeros[NumeroPregunta]]; //Aumenta el puntaje obtenido por el usuario. if (radboA.Checked) { if (Pregunta.R1 == Pregunta.rCorrecta) { puntaje++; } } else if (radboB.Checked) { if (Pregunta.R2 == Pregunta.rCorrecta) { puntaje++; } } else if (radboC.Checked) { if (Pregunta.R1 == Pregunta.rCorrecta) { puntaje++; } } //Verifica que por lo menos un RadioButton está seleccionado para cambiar de pregunta. if (radboA.Checked || radboB.Checked || radboC.Checked) { lbPregunta.Text = (++NumeroPregunta).ToString() + "-. " + Pregunta.Pregunta; radboA.Text = "A) " + Pregunta.R1; radboB.Text = "B) " + Pregunta.R2; radboC.Text = "C) " + Pregunta.R3; } else { MessageBox.Show("No puedes pasar a la siguiente pregunta hasta que hayas seleccionado una opción."); } } else { TiempoCuestionario.Stop(); lbPregunta.Text = "Tuviste " + puntaje.ToString() + "respuestas correctas"; radboA.Hide(); radboB.Hide(); radboC.Hide(); Minutos.Hide(); Segundos.Hide(); label3.Hide(); btnSiguiente.Hide(); } }
public string Extenso() { string extenso = string.Empty; string horas = AcrescentaZero(Horas.ToString()); string minutos = AcrescentaZero(Minutos.ToString()); string segundos = AcrescentaZero(Segundos.ToString()); string frames = AcrescentaZero(Frames.ToString()); extenso = horas + ":" + minutos + ":" + segundos + ";" + frames; return(extenso); }
private void TiempoCuestionario_Tick(object sender, EventArgs e) { if (MinutosRestantes >= 0) { if (SegundosRestantes >= 0) { SegundosRestantes = SegundosRestantes - 1; if (SegundosRestantes < 10) { Segundos.Text = "0" + SegundosRestantes.ToString(); } else { Segundos.Text = SegundosRestantes.ToString(); } } else { SegundosRestantes = 60; MinutosRestantes = MinutosRestantes - 1; if (MinutosRestantes < 10) { Minutos.Text = "0" + MinutosRestantes.ToString(); } else { Minutos.Text = MinutosRestantes.ToString(); } } } else { TiempoCuestionario.Stop(); lbPregunta.Hide(); radboA.Hide(); radboB.Hide(); radboC.Hide(); Minutos.Hide(); Segundos.Hide(); label3.Hide(); btnSiguiente.Hide(); } }
private void TiempoGeneral_Tick(object sender, EventArgs e) { Segundos++; EstadoTb.Text = Estado; string SHoras = Hora.ToString(), SMinutos = Minutos.ToString(), SSegundos = Segundos.ToString(); if (Segundos < 10) { SSegundos = "0" + Segundos; } if (Minutos < 10) { SMinutos = "0" + Minutos; } if (Hora < 10) { SHoras = "0" + Hora; } TiempoTb.Text = SHoras + " : " + SMinutos + " : " + SSegundos; if (Segundos == 60) { Minutos++; Segundos = 0; } if (Minutos == 5) { Hora++; Minutos = 0; } if (Hora % 5 == 0) { PaquetePb.Visible = true; LlegadaPaquete.Start(); } }
public override string ToString() { return(Graus.ToString("00") + "º " + Minutos.ToString("00") + "' " + Segundos.ToString("00") + "'' " + Valor.ToString()); }