Beispiel #1
0
        private void Tbx_CR7_TextChanged(object sender, EventArgs e)
        {
            if (Tbx_CR7.Text != "")
            {
                Btn_Calcular.Enabled = true;

                double CR7 = Convert.ToDouble(Tbx_CR7.Text);

                if (CR7 > 4)
                {
                    MessageBox.Show("Favor Introducir valores del 1-4");
                    Tbx_CR7.Clear();
                }
                else
                {
                    if (Tbx_CR7.Text.Length == 1 && Tbx_CR7.Text != "0")
                    {
                        Tbx_Nota7.Focus();
                    }
                }
            }
            else
            {
                Tbx_CR7.Focus();
                Tbx_CR7.Text = "0";
                Tbx_CR7.SelectAll();
            }
        }
Beispiel #2
0
        private void Tbx_Nota6_TextChanged(object sender, EventArgs e)
        {
            if (Tbx_Nota6.Text != "")
            {
                Btn_Calcular.Enabled = true;

                double Nota6 = Convert.ToDouble(Tbx_Nota6.Text);

                if (Nota6 > 100)
                {
                    MessageBox.Show("Favor Introducir valores del 0-100");
                    Tbx_Nota6.Clear();
                }
                else
                {
                    if (Tbx_Nota6.Text.Length == 4 || Tbx_Nota6.Text == "100")
                    {
                        Tbx_CR7.Focus();
                    }
                }
            }
            else
            {
                Tbx_Nota6.Focus();
                Tbx_Nota6.Text = "0";
                Tbx_Nota6.SelectAll();
            }
        }