private void Tbx_CR2_TextChanged(object sender, EventArgs e) { if (Tbx_CR2.Text != "") { Btn_Calcular.Enabled = true; Tbx_CR2.Focus(); Tbx_CR2.SelectAll(); double CR2 = Convert.ToDouble(Tbx_CR2.Text); if (CR2 > 4) { MessageBox.Show("Favor Introducir valores del 1-4"); Tbx_CR2.Clear(); } else { if (Tbx_CR2.Text.Length == 1 && Tbx_CR2.Text != "0") { Tbx_Nota2.Focus(); } } } else { Tbx_CR2.Text = "0"; Tbx_CR2.Focus(); Tbx_CR2.SelectAll(); } }
private void Tbx_Nota1_TextChanged(object sender, EventArgs e) { if (Tbx_Nota1.Text != "") { Btn_Calcular.Enabled = true; double Nota1 = Convert.ToDouble(Tbx_Nota1.Text); if (Nota1 > 100) { MessageBox.Show("Favor Introducir valores del 0-100"); Tbx_Nota1.Clear(); } else { if (Tbx_Nota1.Text.Length == 4 || Tbx_Nota1.Text == "100") { Tbx_CR2.Focus(); } } } else { Tbx_Nota1.Focus(); Tbx_Nota1.Text = "0"; Tbx_Nota1.SelectAll(); } }
private void Limpiar_Formulario() { Tbx_Nombre.Clear(); Tbx_Apellido.Clear(); Tbx_CR1.Clear(); Tbx_CR2.Clear(); Tbx_CR3.Clear(); Tbx_CR4.Clear(); Tbx_CR5.Clear(); Tbx_CR6.Clear(); Tbx_CR7.Clear(); Tbx_CR_Total.Clear(); Tbx_Nota1.Clear(); Tbx_Nota2.Clear(); Tbx_Nota3.Clear(); Tbx_Nota4.Clear(); Tbx_Nota5.Clear(); Tbx_Nota6.Clear(); Tbx_Nota7.Clear(); Tbx_CR_Nota1.Clear(); Tbx_CR_Nota2.Clear(); Tbx_CR_Nota3.Clear(); Tbx_CR_Nota4.Clear(); Tbx_CR_Nota5.Clear(); Tbx_CR_Nota6.Clear(); Tbx_CR_Nota7.Clear(); Tbx_CR_Nota_Total.Clear(); Tbx_Base100.Clear(); Tbx_Base4.Clear(); Tbx_Matricula.Focus(); Tbx_Matricula.SelectAll(); }