示例#1
0
		public WinRangeValidator(string id, Control controlToValidate, string errorMessage,WindowsErrorProvider parent)
		{
			this.id = id;
			this.controlToValidate = controlToValidate;
			this.errorMessage = errorMessage;
			this.parent = parent;
			AddEvents();
		}
示例#2
0
		public WinRangeValidator(string id, Control controlToValidate,WindowsErrorProvider parent)
		{
			this.id = id;
			this.controlToValidate = controlToValidate;
			this.errorMessage = controlToValidate.Name + " value is not within the range " + minValue.ToString() + " and " + maxValue.ToString();
			this.parent = parent;
			AddEvents();
		}
		public WinRequiredFieldValidator(string id, Control controlToValidate,WindowsErrorProvider parent)
		{
			this.id = id;
			this.controlToValidate = controlToValidate;
			this.errorMessage = controlToValidate.Name + " è obbligatorio.";
			this.parent = parent;
			AddEvents();
		}
示例#4
0
		public WinCustomValidator(string id, Control controlToValidate, WindowsErrorProvider parent)
		{
			this.id = id;
			this.controlToValidate = controlToValidate;
			this.errorMessage = "Trail Version - Invalid!.";
			this.parent = parent;
			AddEvents();
		}
示例#5
0
		public WinCompareValidator(string id, Control controlToValidate,DataType dataType ,WindowsErrorProvider parent)
		{
			this.id = id;
			this.controlToValidate = controlToValidate;
			this.dataType = dataType;
			this.errorMessage = "Invalid!.";
			this.parent = parent;
			AddEvents();
		}
示例#6
0
		public WinCompareValidator(string id, Control controlToValidate,object valueToCompare,WindowsErrorProvider parent)
		{
			this.id = id;
			this.controlToValidate = controlToValidate;
			this.valueToCompare = valueToCompare;
			this.errorMessage = "Invalid!.";
			this.parent = parent;
			AddEvents();
		}
示例#7
0
//
//		public override string ErrorMessage
//		{
//			set
//			{
//				this.errorMessage =  "Trail Version " + value;
//			}
//			get
//			{
//				return this.errorMessage;
//			}
//		}
	
		#region Constructors
		
		public WinCustomValidator(string id, Control controlToValidate, string errorMessage, WindowsErrorProvider parent)
		{
			this.id = id;
			this.controlToValidate = controlToValidate;
			this.errorMessage =  errorMessage;
			this.parent = parent;
			if(errorMessage != string.Empty)
				base.bValid = false;
			AddEvents();
		}
		public WinRegularExpressionValidator(string id, Control controlToValidate,string validationExpression,WindowsErrorProvider parent)
		{
			this.id = id;
			this.controlToValidate = controlToValidate;
			this.validation = Validations.UserDefined;
			this.validationExpression = validationExpression;
			this.errorMessage = "Invalid!.";
			this.parent = parent;
			AddEvents();
		}
		public WinRegularExpressionValidator(string id, Control controlToValidate,Validations validation , string errorMessage,WindowsErrorProvider parent)
		{
			this.id = id;
			this.controlToValidate = controlToValidate;
			this.errorMessage = errorMessage;
			this.validationExpression = "";
			this.validation = validation;
			this.parent = parent;
			AddEvents();
		}
示例#10
0
		public WinRangeValidator(string id, Control controlToValidate,string errorMessage,object minValue,object maxValue,DataType dataType, WindowsErrorProvider parent)
		{
			this.id = id;
			this.dataType = dataType;
			this.controlToValidate = controlToValidate;
			this.maxValue = maxValue;
			this.minValue = minValue;
			this.errorMessage = errorMessage;
			this.parent = parent;
			AddEvents();
		}
		public void Add(string id, Control controlToValidate,Validations validation , string errorMessage,WindowsErrorProvider parent)
		{
			if(!list.ContainsKey(id))
			{
				WinRegularExpressionValidator validator = new WinRegularExpressionValidator(id,controlToValidate,validation,errorMessage,this.parent);
				list.Add(id,validator);
			}
			else
			{
				throw new Exception("Item already exists in the collection.");
			}
		}
示例#12
0
		public WinRangeValidators(WindowsErrorProvider parent)
		{
			this.parent = parent;
			list = new Hashtable();	
		}
		public WinRequiredFieldValidators(WindowsErrorProvider parent)
		{
			this.parent = parent;
			list = new Hashtable();	
		}
		public WinRegularExpressionValidators(WindowsErrorProvider parent)
		{
			this.parent = parent;
			list = new Hashtable();	
		}