Пример #1
0
        private void Tbx_Nota2_TextChanged(object sender, EventArgs e)
        {
            if (Tbx_Nota2.Text != "")
            {
                Btn_Calcular.Enabled = true;

                double Nota2 = Convert.ToDouble(Tbx_Nota2.Text);

                if (Nota2 > 100)
                {
                    MessageBox.Show("Favor Introducir valores del 0-100");
                    Tbx_Nota2.Clear();
                }
                else
                {
                    if (Tbx_Nota2.Text.Length == 4 || Tbx_Nota2.Text == "100")
                    {
                        Tbx_CR3.Focus();
                    }
                }
            }
            else
            {
                Tbx_Nota2.Focus();
                Tbx_Nota2.Text = "0";
                Tbx_Nota2.SelectAll();
            }
        }
Пример #2
0
        private void Tbx_CR3_TextChanged(object sender, EventArgs e)
        {
            if (Tbx_CR3.Text != "")
            {
                Btn_Calcular.Enabled = true;

                double CR3 = Convert.ToDouble(Tbx_CR3.Text);

                if (CR3 > 4)
                {
                    MessageBox.Show("Favor Introducir valores del 1-4");
                    Tbx_CR3.Clear();
                }
                else
                {
                    if (Tbx_CR3.Text.Length == 1 && Tbx_CR3.Text != "0")
                    {
                        Tbx_Nota3.Focus();
                    }
                }
            }
            else
            {
                Tbx_CR3.Focus();
                Tbx_CR3.Text = "0";
                Tbx_CR3.SelectAll();
            }
        }