public DynamicTime(DynamicTimeXml xml) { _textBox = new TextBox(); _textBox.CausesValidation = false; _mskEditExtender = new MaskedEditExtender(); _mskEditExtender.Mask = xml.Mask; _mskEditExtender.MaskType = xml.MaskedType; _mskEditExtender.InputDirection = xml.InputDirection; //_mskEditExtender.AcceptAMPM = false; //_mskEditExtender.UserTimeFormat = MaskedEditUserTimeFormat.TwentyFourHour; //_mskEditExtender.AutoComplete = true; _mskEditValidator = new MaskedEditValidator(); _mskEditValidator.IsValidEmpty = xml.IsValidEmpty; _mskEditValidator.EnableClientScript = true; _mskEditValidator.Display = ValidatorDisplay.Dynamic; _mskEditValidator.InvalidValueBlurredMessage = "*"; _mskEditValidator.InvalidValueMessage = xml.InvalidValueMessage; _mskEditValidator.EmptyValueMessage = xml.EmptyValueMessage; _mskEditValidator.EmptyValueBlurredText = "*"; this.ValidationGroup = xml.ValidationGroup; this.Visible = xml.Visible; this.ID = xml.Name; this.Controls.Add(_textBox); this.Controls.Add(_mskEditExtender); this.Controls.Add(_mskEditValidator); this._timePickerXml = xml; _textBox.Text = xml.Text; }
public DynamicTime() { _textBox = new TextBox(); _textBox.CausesValidation = false; _mskEditExtender = new MaskedEditExtender(); _mskEditExtender.TargetControlID = _textBox.ID; _mskEditExtender.Mask = "99:99"; _mskEditExtender.MaskType = MaskedEditType.Time; _mskEditExtender.AcceptAMPM = false; _mskEditExtender.UserTimeFormat = MaskedEditUserTimeFormat.TwentyFourHour; _mskEditExtender.AutoComplete = true; _mskEditValidator = new MaskedEditValidator(); _mskEditValidator.ControlExtender = _mskEditExtender.ID; _mskEditValidator.ControlToValidate = _textBox.ID; _mskEditValidator.EnableClientScript = true; _mskEditValidator.Display = ValidatorDisplay.Dynamic; _mskEditValidator.InvalidValueBlurredMessage = "*"; _mskEditValidator.InvalidValueMessage = "invalid value message"; _mskEditValidator.EmptyValueMessage = "empty value message"; _mskEditValidator.EmptyValueBlurredText = "*"; this.Controls.Add(_textBox); this.Controls.Add(_mskEditExtender); this.Controls.Add(_mskEditValidator); this._timePickerXml = new DynamicTimeXml(); }