Пример #1
0
        public static void Menu()
        {
            Console.ForegroundColor = ConsoleColor.Blue;
            Console.WriteLine("Would you like to make a new bread or pastry purchase? (type: 'bread,' 'pastry,', 'settle', or 'au revoir' to exit) \n");
            Console.ResetColor();
            Console.ForegroundColor = ConsoleColor.Red;
            string menuInput = Console.ReadLine();

            Console.ResetColor();
            switch (menuInput.ToLower())
            {
            case "bread":
                BreadMenu();
                break;

            case "pastry":
                PastryMenu();
                break;

            case "settle":
                Pastry.ClearAll();
                Bread.ClearAll();
                Console.WriteLine($"\nAll settled up! You have {Pastry.Quantity} pastries and {Bread.Quantity} bread in your cart. \n");
                Menu();
                break;

            case "au revoir":
                Console.WriteLine("Pierre: Au revoir!");
                break;

            default:
                Console.WriteLine("Pierre only understands 'bread,' 'pastry', 'settle', or 'au revoir.'");
                Menu();
                break;
            }
        }
Пример #2
0
 // Clears all tests of pervious data.
 public void Dispose()
 {
     Bread.ClearAll();
 }