/// <summary> /// Constructor to initialise a new instance of the class /// </summary> /// <param name="picker">The DateTimePicker control to which the property is mapped</param> /// <param name="propName">The property name</param> /// <param name="isReadOnly">Whether this control is read only</param> /// <param name="factory">The control factory to be used when creating the controlMapperStrategy</param> public DateTimePickerMapper(IDateTimePicker picker, string propName, bool isReadOnly, IControlFactory factory) : base(picker, propName, isReadOnly, factory) { _picker = picker; PropertyName = propName; _dateTimePickerMapperStrategy = factory.CreateDateTimePickerMapperStrategy(); if (_dateTimePickerMapperStrategy == null) return; _dateTimePickerMapperStrategy.AddUpdateBoPropOnValueChangedHandler(this); }
/// <summary> /// Constructor to initialise a new instance of the class /// </summary> /// <param name="picker">The DateTimePicker control to which the property is mapped</param> /// <param name="propName">The property name</param> /// <param name="isReadOnly">Whether this control is read only</param> /// <param name="factory">The control factory to be used when creating the controlMapperStrategy</param> public DateTimePickerMapper(IDateTimePicker picker, string propName, bool isReadOnly, IControlFactory factory) : base(picker, propName, isReadOnly, factory) { _picker = picker; PropertyName = propName; _dateTimePickerMapperStrategy = factory.CreateDateTimePickerMapperStrategy(); if (_dateTimePickerMapperStrategy == null) { return; } _dateTimePickerMapperStrategy.AddUpdateBoPropOnValueChangedHandler(this); }