comparison ServerMonitor/Objects/Schedule.cs @ 8:052aa62cb42a

Single instance. Add autorun option. Add icons. General enhancements.
author Brad Greco <brad@bgreco.net>
date Sat, 09 Mar 2019 20:14:03 -0500
parents 3142e52cbe69
children d92176c5398a
comparison
equal deleted inserted replaced
7:8486ab7d2357 8:052aa62cb42a
30 public DateTime GetNextTime(DateTime lastScheduledTime, DateTime minStartTime) 30 public DateTime GetNextTime(DateTime lastScheduledTime, DateTime minStartTime)
31 { 31 {
32 DateTime nextTime = lastScheduledTime; 32 DateTime nextTime = lastScheduledTime;
33 if (Units == FrequencyUnits.Day) 33 if (Units == FrequencyUnits.Day)
34 { 34 {
35 //TODO what if nextTime is null or really long ago?
36 while (nextTime < minStartTime) 35 while (nextTime < minStartTime)
37 nextTime = nextTime.AddDays(Frequency).Date.Add(StartTime); 36 nextTime = nextTime.AddDays(Frequency).Date.Add(StartTime);
38 } 37 }
39 else 38 else
40 { 39 {