void DetailLunnar_Btn(object sender, EventArgs e) { DisplayChangeDate displayDate = sender as DisplayChangeDate; PanelDisplay.Controls.Clear(); ActivateButton(ButtonDate, RGBColors.color1); DisplayDate displaydate = new DisplayDate(displayDate.Lunar); PanelDisplay.Controls.Add(displaydate); }
void DateDisplay_MonthBtn(object sender, EventArgs e) { DisplayDate displayDate = sender as DisplayDate; DateTime date = displayDate.Date; PanelDisplay.Controls.Clear(); ActivateButton(ButtonCalendar, RGBColors.color2); DisplayLunnar displayLunnar = new DisplayLunnar(date); PanelDisplay.Controls.Add(displayLunnar); displayLunnar.Dock = DockStyle.Fill; }
private void AddDisplayDateCondition(DateTime date) { DisplayDate displayDate = new DisplayDate(date); displayDate.Size = new Size(1009, 620); displayDate.Location = new Point(0, 0); PanelDisplay.Controls.Add(displayDate); displayDate.MonthBtn += DateDisplay_MonthBtn; displayDate.Nextbtn += DateDisplay_NextBtn; displayDate.Prebtn += DateDisplay_PreBtn; displayDate.TDbtn += DateDisplay_TDBtn; }
private void ButtonDate_Click(object sender, EventArgs e) { ActivateButton(sender, RGBColors.color1); DisplayDate display = new DisplayDate(dtpk.Value); display.Size = new Size(1009, 620); display.Location = new Point(0, 0); PanelDisplay.Controls.Clear(); PanelDisplay.Controls.Add(display); display.MonthBtn += DateDisplay_MonthBtn; display.Nextbtn += DateDisplay_NextBtn; display.Prebtn += DateDisplay_PreBtn; display.TDbtn += DateDisplay_TDBtn; }
private void hiệnLịchNgàyToolStripMenuItem_Click(object sender, EventArgs e) { PanelDisplay.Controls.Clear(); dtpk.Value = DateTime.Now; var displayDate = new DisplayDate(dtpk.Value) { Size = new Size(1009, 620), Location = new Point(0, 0), Dock = DockStyle.Fill, }; displayDate.MonthBtn += DateDisplay_MonthBtn; displayDate.Nextbtn += DateDisplay_NextBtn; displayDate.Prebtn += DateDisplay_PreBtn; displayDate.TDbtn += DateDisplay_TDBtn; ActivateButton(ButtonDate, RGBColors.color1); PanelDisplay.Controls.Add(displayDate); this.Show(); NotifyIcon1.ShowBalloonTip(100, "Số việc trong ngày", "Hôm nay có " + CountSchedule + " công việc và còn " + CountDeadline + " Deadline", ToolTipIcon.Info); }
void DateDisplay_NextBtn(object sender, EventArgs e) { DisplayDate displayDate = sender as DisplayDate; dtpk.Value = dtpk.Value.AddDays(1); }
void DateDisplay_TDBtn(object sender, EventArgs e) { DisplayDate displayDate = sender as DisplayDate; dtpk.Value = DateTime.Now; }