private void _calendar_CalendarEvent(object sender, CalendarEventArgs e) { _currentDayProps = e; _fatherTime.SetDay(e.Day); CheckDayOfWeek(); DoSprinkler(); DoAlarm(); DoCoffee(); _fatherTime.IncrementDay(); }
public void NextDay(bool isStart = false) { if (!isStart) { _currentDay = ++_currentDay; } SetByDay(); CalendarEventArgs e = new CalendarEventArgs(); e.Day = _currentDay; e.DayEvents = _recurringEvents[_currentDay]; e.IsTrashDay = _isTrashDay; e.IsWeekend = _isWeekend; OnCalendarEvent(e); }
protected virtual void OnCalendarEvent(CalendarEventArgs e) { Console.WriteLine("Day has changed. It is now {0}", _currentDay); CalendarEvent?.Invoke(this, e); }