Exemplo n.º 1
0
 protected override void Dispose(bool disposing)
 {
     if (control != null)
     {
         control.ValueChanged -= control_ValueChanged;
         control = null;
     }
     base.Dispose(disposing);
 }
Exemplo n.º 2
0
        protected override object CreateControlCore()
        {
            control = new TralusDateControl();
            control.ValueChanged += control_ValueChanged;
            var tralusDateTime = MemberInfo.GetValue(CurrentObject) as TralusDateTime;

            if (tralusDateTime != null)
            {
                control.CurrentObjectLocalDateTimeZone = tralusDateTime.LocalTimeZone;
            }

            var defaultCalendarAndTimeZone = this.Model as ITralusDateTimeDefaultCalendarAndTimeZone;

            if (defaultCalendarAndTimeZone != null)
            {
                control.DefaultCalendar = defaultCalendarAndTimeZone.DefaultCalendar;
            }

            control.Initialize();
            this.ControlBindingProperty = "SelectedTralusDate";
            return(control);
        }