Example #1
0
        protected virtual void OnValidate()
        {
            // Raises the Validate change event;
            WValidate_EventArgs oArg = new WValidate_EventArgs(this.Name, this.Text);

            if (this.Validate != null)
            {
                this.Validate(this, oArg);
            }

            //---- If validation failed ----//
            if (!oArg.IsValid)
            {
                if (oArg.FlashControl)
                {
                    this.FlashControl();
                }

                if (!oArg.AllowMoveFocus)
                {
                    this.Focus();
                }
            }
            //------------------------------//
        }
Example #2
0
		protected virtual void OnValidate() 
		{	
			// Raises the Validate change event; 	
			WValidate_EventArgs oArg = new WValidate_EventArgs(this.Name,this.Text);

			if(this.Validate != null){
				this.Validate(this, oArg);
			}
			
			//---- If validation failed ----//
			if(!oArg.IsValid){
				if(oArg.FlashControl){
					this.FlashControl();
				}

				if(!oArg.AllowMoveFocus){
					this.Focus();
				}
			}
			//------------------------------//
		}