예제 #1
0
        static void Main(string[] args)
        {
            Console.SetWindowSize(150, 50);
            Dictionary <string, FoodItem> foodDictionary = ManipFoodData.ReadData();

            Art.IntroArt();
            MenusClass.MainMenu(foodDictionary);
        }
예제 #2
0
        public static void OrderMenu(Dictionary <string, FoodItem> foodDictionary)
        {
            List <FoodItem> userOrder = new List <FoodItem>();

            bool killswitch = true;

            while (killswitch)
            {
                //Console.WriteLine("\nWhat would you like to do?\n" +
                //    "1. Add an item to your order\n" +
                //    "2. View Your Order\n" +
                //    "3. View the Menu\n" +
                //    "4. Check Out\n" +
                //    "5. Cancel order and go back to main menu.\n");
                Console.Clear();
                Console.WriteLine(@"
......................................................................
|,---. .          ,-. .       .       ,--.    ,-. .                  |
|  |   |         /    |       |       |      /    |                  |
|  |   |-. ,-.   |    |-. ,-: |-  --- |-     |    |-. ,-. ,-. ,-. ,-.|
|  |   | | |-'   \    | | | | |       |      \    | | |-' |-' `-. |-'|
|  '   ' ' `-'    `-' ' ' `-` `-'     `--'    `-' ' ' `-' `-' `-' `-'|                                                                     
|....................................................................|
| : : : :::#:#:#:#:##:##:######:#####:#############|________|________|
| : : : :::#:#:#:#:##:##:######:#####:#############|        |        |
| : : : : : ::#:#:#:#:#:##:###:###:#####:##########|        |        |
| : : :  (-) :::#:#:#:#:#:#:##:####:###:###:####:##|        |        |
|______.-'-'-.___________________________:####::###|________|________|
|      |-...-|   _______   .--''''''--.  \:###:#####:################|
|      |;:.._|  / MENU /  |'''''/      |  \:#                     ###|
|      `-...-' / ==== /   '''''/_...--'|   \#   1. Add food       ###|
|             /______/     /\  |__...--'    \   2. View order     ###|
|_________________________/  \_______________\  3. Look at menu      |
|                                      | |      4. Check out         |
|  So you want to order some food, eh? | |      5. Never mind. Go    |
|  Hit me.                             | |         back.             |
|......................................|.|...........................|
");
                Console.Write("Type a number to make a selection: ");

                string userOrderMenuInput = Console.ReadLine();
                switch (userOrderMenuInput)
                {
                case "1":
                    Console.Clear();
                    OrderOptions.ListFoodMenu(foodDictionary);
                    userOrder = OrderOptions.AddFoodItem(userOrder, foodDictionary);
                    Console.WriteLine("\nPress enter to continue.\n");
                    string x = Console.ReadLine();
                    break;

                case "2":
                    Console.Clear();
                    OrderOptions.ListCurrentOrderDetails(userOrder, "Your Order");
                    Console.WriteLine("\nPress enter to continue.\n");
                    string y = Console.ReadLine();
                    break;

                case "3":
                    Console.Clear();
                    OrderOptions.ListFoodMenu(foodDictionary);
                    Console.WriteLine("\nPress enter to continue.\n");
                    string z = Console.ReadLine();
                    break;

                case "4":
                    Console.Clear();
                    killswitch = MenusClass.CheckoutMenu(userOrder);
                    break;

                case "5":
                    Console.WriteLine("Are you sure you want to cancel this transaction? Y/N");
                    string uSure = Console.ReadLine();
                    if (uSure.ToUpper() == "Y")
                    {
                        killswitch = false;
                    }
                    break;
                }
            }
        }