예제 #1
0
 ///<summary>
 /// Constructor for <see cref="DateTimePickerWin"/>
 ///</summary>
 ///<param name="controlFactory"></param>
 public DateTimePickerWin(IControlFactory controlFactory)
 {
     DateTimePickerManager.ValueGetter <DateTime> valueGetter = () => base.Value;
     DateTimePickerManager.ValueSetter <DateTime> valueSetter = delegate(DateTime value)
     {
         base.Value = value;
     };
     _manager = new DateTimePickerManager(controlFactory, this, valueGetter, valueSetter);
     _manager.ValueChanged += (sender, args) => base.OnValueChanged(args);
     _manager.NullDisplayBoxCustomizationDelegate += NullDisplayBoxCustomization;
     this.SetGlobalDefaultFormat();
     this.ObserveGlobalUIHints();
 }
예제 #2
0
#pragma warning disable 1911
        ///<summary>
        /// Constructs the <see cref="DateTimePickerVWG"/>
        ///</summary>
        ///<param name="controlFactory"></param>
        public DateTimePickerVWG(IControlFactory controlFactory)
        {
            DateTimePickerManager.ValueGetter <DateTime> valueGetter = () => base.Value;

            DateTimePickerManager.ValueSetter <DateTime> valueSetter = delegate(DateTime value)
            {
                base.Value = value;
            };
            _manager = new DateTimePickerManager(controlFactory, this, valueGetter, valueSetter);
            //Note: by default the Checkbox is shown because the VWG DateTimePicker does not support representing the null state visually without it.
            this.ShowCheckBox = true;
            _manager.ChangeToNullMode();
            this.SetGlobalDefaultFormat();
            this.ObserveGlobalUIHints();
        }