예제 #1
0
 private void ANO_Click(object sender, EventArgs e)
 {
     if (String.IsNullOrWhiteSpace(ANO.Text) || String.IsNullOrEmpty(ANO.Text))
     {
         ANO.Select(0, 0);
     }
 }
예제 #2
0
파일: Turma.cs 프로젝트: cryptum/USTG_MG
        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();
        }
예제 #3
0
        //
        // 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);
            }
        }