public void Init() { db = BusDB.Instance; }
public void Init() { db=BusDB.Instance; }
public TimeSpan getTimeUntilArrival() { DateTime nextTime = DateTime.Today.Add(this.clockTimeOrigin); //add a day until it runs that day while (DateTime.Now > nextTime || (weekdays.Contains(nextTime.DayOfWeek) && !OperatesWeekdays) || (weekends.Contains(nextTime.DayOfWeek) && !OperatesWeekends) || (BusDB.IsAHoliday(nextTime) && !OperatesHolidays)) { nextTime = nextTime.AddDays(1); } return(nextTime.Subtract(DateTime.Now)); }