private void ScheduleControl_Load(object sender, EventArgs e) { day1 = TimeControl.FirstDayOfWeek(DateTime.Today); day2 = TimeControl.FirstDayOfWeek(DateTime.Today).AddDays(1); day3 = TimeControl.FirstDayOfWeek(DateTime.Today).AddDays(2); day4 = TimeControl.FirstDayOfWeek(DateTime.Today).AddDays(3); day5 = TimeControl.FirstDayOfWeek(DateTime.Today).AddDays(4); day6 = TimeControl.FirstDayOfWeek(DateTime.Today).AddDays(5); day7 = TimeControl.FirstDayOfWeek(DateTime.Today).AddDays(6); UpdateLivingText(); }
private void btnCurrentWeek_Click(object sender, EventArgs e) { btnNextWeek.Visible = true; day1 = TimeControl.FirstDayOfWeek(DateTime.Today); day2 = TimeControl.FirstDayOfWeek(DateTime.Today).AddDays(1); day3 = TimeControl.FirstDayOfWeek(DateTime.Today).AddDays(2); day4 = TimeControl.FirstDayOfWeek(DateTime.Today).AddDays(3); day5 = TimeControl.FirstDayOfWeek(DateTime.Today).AddDays(4); day6 = TimeControl.FirstDayOfWeek(DateTime.Today).AddDays(5); day7 = TimeControl.FirstDayOfWeek(DateTime.Today).AddDays(6); UpdateLivingText(); btnCurrentWeek.Visible = false; btnChartToggle.Visible = true; }