示例#1
0
		public void Add(WinRangeValidator value)
		{
			if(!list.ContainsKey( value.Id))
			{
				value.Parent = this.parent;
				list.Add(value.Id,value);
			}
			else
			{
				throw new Exception("Item already exists in the collection.");
			}
		}
示例#2
0
		public void Add(string id, Control controlToValidate)
		{
			if(!list.ContainsKey(id))
			{
				WinRangeValidator validator = new WinRangeValidator(id,controlToValidate,this.parent);
				list.Add(id,validator);
			}
			else
			{
				throw new Exception("Item already exists in the collection.");
			}
		}
示例#3
0
		public void Add(string id, Control controlToValidate,string errorMessage,object minValue,object maxValue,DataType dataType)
		{
			if(!list.ContainsKey(id))
			{
				WinRangeValidator validator = new WinRangeValidator(id,controlToValidate,errorMessage,minValue,maxValue,dataType,this.parent);
				list.Add(id,validator);
			}
			else
			{
				throw new Exception("Item already exists in the collection.");
			}
		}