public void SetDate(DateTime datStart, DateTime datEnd, SelectStyle selectStyle) { this.m_selectStyle = selectStyle; this.m_datStart = datStart; this.m_datEnd = datEnd; this.m_mthAdjustDat(); this.m_mthAdjustRad(); this.m_mthAdjustDtp(); this.m_mthAdjustText(); }
private void m_cmdConfirm_Click(object sender, EventArgs e) { if (this.m_radMonth.Checked) { this.m_selectStyle = SelectStyle.MonthStyle; this.m_datStart = this.m_dtp1.Value; this.m_datEnd = this.m_dtp1.Value; } else if (this.m_radMonthSect.Checked) { if (this.m_dtp2.Value > this.m_dtp3.Value) { return; } this.m_selectStyle = SelectStyle.MonthSectStyle; this.m_datStart = this.m_dtp2.Value; this.m_datEnd = this.m_dtp3.Value; } else { if (this.m_dtp4.Value > this.m_dtp5.Value) { return; } this.m_selectStyle = SelectStyle.DateSectStyle; this.m_datStart = this.m_dtp4.Value; this.m_datEnd = this.m_dtp5.Value; } this.m_mthAdjustDat(); this.m_mthAdjustRad(); this.m_mthAdjustDtp(); this.m_mthAdjustText(); frm.Close(); if (this.ValueChanged != null) { ValueChanged(this, null); } }
public ctlDateSelector() { InitializeComponent(); frm = new Form(); frm.FormBorderStyle = FormBorderStyle.FixedDialog; frm.Size = new Size(228, 156); frm.Controls.Add(this.m_pnlFrm); frm.MinimizeBox = false; frm.MaximizeBox = false; frm.StartPosition = FormStartPosition.Manual; frm.CancelButton = this.m_cmdCancel; //frm.AcceptButton = this.m_cmdConfirm; this.m_pnlFrm.Visible = true; this.m_pnlFrm.Dock = DockStyle.Fill; this.m_datStart = DateTime.Now; this.m_datEnd = DateTime.Now; this.m_selectStyle = SelectStyle.MonthStyle; this.m_mthAdjustDat(); this.m_mthAdjustRad(); this.m_mthAdjustDtp(); this.m_mthAdjustText(); }
/// <summary> /// Set the selection style for end user interaction with the table. /// </summary> /// <param name="style"></param> /// <returns></returns> public SelectBuilder Style(SelectStyle style) { this.select.Style = style; return(this); }