public ScheduleRecord(Schedule schedule, Station station, Train train, Direction dir, int time)
     : base()
 {
     this.schedule = schedule;
     this.station = station;
     this.train = train;
     this.dir = dir;
 }
示例#2
0
 /// <summary>
 /// Finds a Direction with the supplied name, if it can't find one it creates one with the supplied name
 /// </summary>
 /// <param name="name">Name to search for</param>
 /// <returns>Direction that was found/created</returns>
 public Direction GetOrCreateDirection(String name)
 {
     Direction result = null;
     foreach (Direction t in directions)
     {
         if (t.GetName().Equals(name))
         {
             result = t;
         }
     }
     if (result == null)
     {
         result = new Direction(name);
     }
     return result;
 }