Пример #1
0
        protected internal virtual void OnItemValidating(object sender, ItemValidatingEventArgs e)
        {
            ItemValidatingEventHandler itemValidating = this.ItemValidating;

            if (itemValidating == null)
            {
                return;
            }
            itemValidating(sender, e);
        }
Пример #2
0
        private void control_Validating(object sender, CancelEventArgs e)
        {
            Control index = sender as Control;

            if (index == null || this.CurrentObject == null)
            {
                return;
            }
            ValidationInfo validationInfo = this.validationInfoForEachEditor[index];

            if (this.ErrorIcon != null)
            {
                validationInfo.ErrorProvider.Icon = this.GetErrorIcon();
            }
            ItemValidatingEventArgs e1 = new ItemValidatingEventArgs(validationInfo.Label, validationInfo.ValidationLabel, validationInfo.ErrorProvider, validationInfo.RangeAttribute);

            this.OnItemValidating((object)index, e1);
            e.Cancel = e1.Cancel;
        }
Пример #3
0
 private void DataEntryElement_ItemValidating(object sender, ItemValidatingEventArgs e)
 {
     this.OnItemValidating(sender, e);
 }