private void ANO_Click(object sender, EventArgs e) { if (String.IsNullOrWhiteSpace(ANO.Text) || String.IsNullOrEmpty(ANO.Text)) { ANO.Select(0, 0); } }
public override void Validar() { _CampoObrigatorio("ANO", ANO); _CampoObrigatorio("Nome do Comandante", NomeComandante); if (ANO != null && ANO.Any(c => !char.IsDigit(c))) { _RegrasQuabradas.Append($"O campo ANO deve conter somente números.{Environment.NewLine}"); } if (ANO != null && (ANO.Length > 4 || ANO.Length < 4)) { _RegrasQuabradas.Append($"O campo ANO deve conter 4 caracteres númericos.{Environment.NewLine}"); } base.Validar(); }
// // ADD // public void Add(T value) { this.ListOfObservations.Add(value); ANO.Add(value.ToString()); if (isNumeric) { if (Comp.Smaller(value, Min)) { Min = value; } if (Comp.Greater(value, Max)) { Max = value; } ArithmeticMean = AMOA(value); //Console.WriteLine("{0}: {1}", Name, ArithmeticMean); } }