void MoveToNextDate() { if (CurrentView == ViewEnum.Day) { if ((DateTime.MaxValue - DetailedHumidityDate).Days >= 1) { DetailedHumidityDate = DetailedHumidityDate.AddDays(1); } } else { if ((DateTime.MaxValue - HumiditySummaryEndDate).Days >= 7) { HumiditySummaryStartDate = HumiditySummaryStartDate.AddDays(7); HumiditySummaryEndDate = HumiditySummaryEndDate.AddDays(7); } } }
void MoveToPreviousDate() { if (CurrentView == ViewEnum.Day) { if ((DetailedHumidityDate - DateTime.MinValue).Days >= 1) { DetailedHumidityDate = DetailedHumidityDate.AddDays(-1); } } else { if ((HumiditySummaryStartDate - DateTime.MinValue).Days >= 7) { HumiditySummaryStartDate = HumiditySummaryStartDate.AddDays(-7); HumiditySummaryEndDate = HumiditySummaryEndDate.AddDays(-7); } } }