Exemple #1
0
        public static void ArrivalsPrinter(List <Arrivals> arrivals)
        {
            string busStop = BusStop.StopName(arrivals);

            Console.WriteLine("");
            Console.WriteLine(busStop + " Arrivals:\n");
            string header = string.Format(("{0,-0}{1,-9}{2,-9}{3,-4}"), "Due", "", "Route", "Destination");

            Console.WriteLine(header);
            Console.WriteLine(ArrivalsList.ArrivalsBoard(arrivals));
        }
Exemple #2
0
        static void Main(string[] args)
        {
            string          stopSearchUrl = BusStop.StopChooser();
            List <Arrivals> arrivals      = new List <Arrivals>(ArrivalsList.ArrivalsFetcher(stopSearchUrl).OrderBy(stopPointArrival => stopPointArrival.TimeToStation)
                                                                .Take(5));

            PrintArrivals.ArrivalsPrinter(arrivals);
            // string stopId = StopChooser.AskUserForStopCode();
            // List<Arrivals> arrivals = ArrivalsFetcher.GetArrivalsForStop(stopId);
            // BusBoard.PrintArrivals(arrivals)
        }