Exemple #1
0
 public void Init()
 {
     db = BusDB.Instance;
 }
Exemple #2
0
 public void Init()
 {
     db=BusDB.Instance;
 }
Exemple #3
0
        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));
        }