public DateTimePickerEx() { InitializeComponent(); dateTimeValue = DateTime.Now; ud = new UCDataSelector(); ud.OnDateSelected += new DateRangeEventHandler(ud_OnDateSelected); popUpControl = new PopupControlHost(ud); }
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); }
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; } }
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; } }
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); } }