Beispiel #1
0
        public override bool Validate(System.Windows.Forms.Control input)
        {
            ValidateValueEventArgs e = new ValidateValueEventArgs(input);
            OnValidateValue(e);

            if (this.SuperValidator != null)
                this.SuperValidator.InvokeCustomValidatorValidateValue(this, e);

            this.LastValidationResult = e.IsValid;
            return LastValidationResult;
        }
Beispiel #2
0
 private void customValidator2_ValidateValue(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e)
 {
     if (Proceso != 0)
     {
         if (e.ControlToValidate.Text != "")
         {
             e.IsValid = true;
         }
         else
         {
             e.IsValid = false;
         }
     }
     else
     {
         e.IsValid = true;
     }
 }
Beispiel #3
0
 protected virtual void OnValidateValue(ValidateValueEventArgs e)
 {
     ValidateValueEventHandler h = ValidateValue;
     if (h != null) h(this, e);
 }
Beispiel #4
0
 /// <summary>
 /// Raises the CustomValidatorValidateValue event.
 /// </summary>
 /// <param name="validator">Validator that needs validation.</param>
 /// <param name="e">Control to validate.</param>
 protected virtual void OnCustomValidatorValidateValue(CustomValidator validator, ValidateValueEventArgs e)
 {
     ValidateValueEventHandler h = CustomValidatorValidateValue;
     if (h != null) h(validator, e);
 }
Beispiel #5
0
 internal void InvokeCustomValidatorValidateValue(CustomValidator validator, ValidateValueEventArgs e)
 {
     OnCustomValidatorValidateValue(validator, e);
 }