Exemple #1
0
 private void InitData()
 {
     using (var reader = new StreamReader("../../../Airport/airport.csv"))
     {
         while (!reader.EndOfStream)
         {
             var line = reader.ReadLine();
             var data = line.Split(';');
             FromCityList.Add(data[0]);
             ToCityList.Add(data[1]);
             DepartureTimeList.Add(data[2]);
             ArrivalTimeList.Add(data[3]);
         }
     }
 }
Exemple #2
0
 private void InitConnections()
 {
     Connections = new List <Connection>();
     for (var i = 0; i < FromCityList.LongCount(); i++)
     {
         Connections.Add(new Connection(FromCityList.ElementAt(i), ToCityList.ElementAt(i), CreateDateFromString(DepartureTimeList.ElementAt(i)), CreateDateFromString(ArrivalTimeList.ElementAt(i))));
     }
 }