public static void PriceResultScreenMethod()
        {
            WriteToScreen(0, 1);
            while (true)
            {
                ConsoleKeyInfo key = Console.ReadKey(true);
                if (key.Key == ConsoleKey.DownArrow || key.Key == ConsoleKey.UpArrow)
                {
                    WriteToScreen(2, 3);
                    ConsoleKeyInfo key1 = Console.ReadKey(true);
                    switch (key1.Key)
                    {
                    case ConsoleKey.Enter:
                        Environment.Exit(0);
                        break;

                    case ConsoleKey.DownArrow:
                        WriteToScreen(0, 1);
                        break;

                    case ConsoleKey.UpArrow:
                        WriteToScreen(0, 1);
                        break;
                    }
                }
                else if (key.Key == ConsoleKey.Enter)
                {
                    StartScreen.StartScreenMethod();
                    break;
                }
            }
        }
        public static void DetermineKeyInput(ConsoleKeyInfo k, int w1n1, int w1n2, int w1n3, int w1n4, int w2n1, int w2n2,
                                             int w2n3, int w2n4)
        {
            switch (k.Key)
            {
            case ConsoleKey.UpArrow:
                WriteToScreen(w1n1, w1n2, w1n3, w1n4);
                if (count > 0)
                {
                    count -= 1;
                }
                else
                {
                    count = 3;
                }
                break;

            case ConsoleKey.DownArrow:
                WriteToScreen(w2n1, w2n2, w2n3, w2n4);
                if (count < 3)
                {
                    count += 1;
                }
                else
                {
                    count = 0;
                }
                break;

            case ConsoleKey.Enter:
                switch (count)
                {
                case 0:
                    EnterInformationScreen.SelectedTicketType = Constants.TicketType.GENERIC_TICKET;
                    EnterInformationScreen.SelectedBridge     = "Generic bridge Ticket";
                    VehicleSelectScreen.SelectVehicleScreen();
                    break;

                case 1:
                    EnterInformationScreen.SelectedTicketType = Constants.TicketType.STOREBAELT_TICKET;
                    EnterInformationScreen.SelectedBridge     = "Storebaelt bridge Ticket Ticket";
                    VehicleSelectScreen.SelectVehicleScreen();
                    break;

                case 2:
                    EnterInformationScreen.SelectedTicketType = Constants.TicketType.ORESUND_TICKET;
                    EnterInformationScreen.SelectedBridge     = "Oresund Ticket";
                    VehicleSelectScreen.SelectVehicleScreen();
                    break;

                case 3:
                    EnterInformationScreen.SelectedTicketType = Constants.TicketType.NOT_SELECTED;
                    EnterInformationScreen.SelectedBridge     = "";
                    StartScreen.StartScreenMethod();
                    break;
                }
                break;
            }
        }
Ejemplo n.º 3
0
 static void Main(string[] args)
 {
     StartScreen.StartScreenMethod();
 }