private void TxtValor_TextChanged(object sender, EventArgs e)
 {
     validarNumero = new ValidarNumero();
     try
     {
         TxtNota.Text = validarNumero.Validar(TxtNota.Text);
         TxtNota.Select(TxtNota.Text.Length, 0);
         if (TxtNota.Text != "")
         {
             decimal valor = decimal.Parse(TxtNota.Text);
             if (valor > 100)
             {
                 TxtNota.Text = "";
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 2
0
 private void TxtValor_TextChanged(object sender, EventArgs e)
 {
     validarNumero = new ValidarNumero();
     TxtValor.Text = validarNumero.Validar(TxtValor.Text);
     TxtValor.Select(TxtValor.Text.Length, 0);
 }