protected virtual void OnValidatingControl(ValidatingControlEventArgs e)
 {
     EventHandler<ValidatingControlEventArgs> handler = base.Events[EventValidatingControl] as EventHandler<ValidatingControlEventArgs>;
     if (handler != null)
     {
         handler(this, e);
     }
 }
 private void Validator_ValidatingControl(object sender, ValidatingControlEventArgs e)
 {
     if (base.IsHandleCreated)
     {
         base.BeginInvoke(new MethodInvoker(this.UpdateButtons));
     }
 }
 private void Control_Validate_Validating(object sender, CancelEventArgs e)
 {
     Control control = (Control) sender;
     ValidatingControlEventArgs args = new ValidatingControlEventArgs(control, e.Cancel);
     this.OnValidatingControl(args);
     e.Cancel = args.Cancel;
     if (this.InvalidControlSet == null)
     {
         this.InvalidControlSet = new HashSet<Control>();
     }
     this.InvalidControlSet.Add((Control) sender);
     if (((this.OwnerFormValidate == FormValidate.DisableAcceptButton) && (this.FOwner != null)) && this.FOwner.IsHandleCreated)
     {
         this.FOwner.BeginInvoke(new MethodInvoker(this.EnableAcceptButton));
     }
 }