Ejemplo n.º 1
0
        public DateTimePickerEx()
        {
            InitializeComponent();
            dateTimeValue = DateTime.Now;
            ud = new UCDataSelector();

            ud.OnDateSelected += new DateRangeEventHandler(ud_OnDateSelected);
            popUpControl = new PopupControlHost(ud);
        }
Ejemplo n.º 2
0
        public DateTimePickerEx()
        {
            InitializeComponent();
            dateTimeValue = DateTime.Now;
            ud            = new UCDataSelector();

            ud.OnDateSelected += new DateRangeEventHandler(ud_OnDateSelected);
            popUpControl       = new PopupControlHost(ud);
        }
Ejemplo n.º 3
0
 public DateTimePickerEx_sms()
 {
     InitializeComponent();
     #region 修改时间可为空
     //dateTimeValue = DateTime.Now;
     dateTimeText = "";
     #endregion
     ud = new UCDataSelector_sms();
     ud.OnDateSelected += new DateRangeEventHandler(ud_OnDateSelected);
     ud.OnDateClear    += new DateRangeEventHandler(ud_OnDateClear);
     popUpControl       = new PopupControlHost(ud);
 }
Ejemplo n.º 4
0
        public UCDataSelector()
        {
            InitializeComponent();
            ucTimeSelector = new UCTimeSelector();
            ucTimeSelector.OnTimeValueChanged += new DataGridViewCellEventHandler(ucTimeSelector_OnTimeValueChanged);
            popUpControl = new PopupControlHost(ucTimeSelector);

            OperatingSystem os = Environment.OSVersion;
            if (os.Version.Major < 6) 
            {
                this.Width = 270;
            }
        }
Ejemplo n.º 5
0
        public UCDataSelector_sms()
        {
            InitializeComponent();
            ucTimeSelector = new UCTimeSelector();
            ucTimeSelector.OnTimeValueChanged += new DataGridViewCellEventHandler(ucTimeSelector_OnTimeValueChanged);
            popUpControl = new PopupControlHost(ucTimeSelector);

            OperatingSystem os = Environment.OSVersion;

            if (os.Version.Major < 6)
            {
                this.Width = 270;
            }
        }
Ejemplo n.º 6
0
 private void SetOwnerItem(Control control)
 {
     if (control == null)
     {
         return;
     }
     if (control is PopupControlHost)
     {
         PopupControlHost popupControl = control as PopupControlHost;
         _ownerPopup             = popupControl;
         _ownerPopup._childPopup = this;
         OwnerItem = popupControl.Items[0];
         return;
     }
     if (control.Parent != null)
     {
         SetOwnerItem(control.Parent);
     }
 }
Ejemplo n.º 7
0
 public DateTimePickerEx_sms()
 {
     InitializeComponent();
     #region 修改时间可为空
     //dateTimeValue = DateTime.Now;
     dateTimeText = "";
     #endregion
     ud = new UCDataSelector_sms();
     ud.OnDateSelected += new DateRangeEventHandler(ud_OnDateSelected);
     ud.OnDateClear += new DateRangeEventHandler(ud_OnDateClear);
     popUpControl = new PopupControlHost(ud);
 }
Ejemplo n.º 8
0
 private void SetOwnerItem(Control control)
 {
     if (control == null)
     {
         return;
     }
     if (control is PopupControlHost)
     {
         PopupControlHost popupControl = control as PopupControlHost;
         _ownerPopup = popupControl;
         _ownerPopup._childPopup = this;
         OwnerItem = popupControl.Items[0];
         return;
     }
     if (control.Parent != null)
     {
         SetOwnerItem(control.Parent);
     }
 }