Example #1
0
        public static void SelectExtras(Order porder)
        {
            Console.Clear();
            AbMeny.PrintExtraLogo();
            Console.WriteLine("\t\t\t\t\tTillbehör: \n " +
                              "\t\t\t\t\t1: Läsk 33cl \n " +
                              "\t\t\t\t\t2: Läsk 2L \n " +
                              "\t\t\t\t\t3: Stor Stark \n " +
                              "\t\t\t\t\t4: Vin, rött 40cl\n" +
                              "\t\t\t\t\t5: Vin, vitt 40cl \n" +
                              "\t\t\t\t\t6: Pizzasallad \n" +
                              "\t\t\t\t\t7: Dipsås \n\n\n " +
                              "\t\t\t\t\t0: Bakåt");
            Submeny.PrintSummary(porder);
            int choice = IntIn();

            switch (choice) // addade radavbrytning så att kvittot inte blir för "brett"
            {
            case 1:
                porder.AddStuff(new Tillbehör("Läsk 33cl\n\t\t\t\t\t", 15));
                return;

            case 2:
                porder.AddStuff(new Tillbehör("Läsk 2L\n\t\t\t\t\t", 25));
                return;

            case 3:
                porder.AddStuff(new Tillbehör("Stor Stark\n\t\t\t\t\t", 40));
                return;

            case 4:
                porder.AddStuff(new Tillbehör("Vin, rött 40cl\n\t\t\t\t\t", 50));
                return;

            case 5:
                porder.AddStuff(new Tillbehör("Vin, vitt 40cl\n\t\t\t\t\t", 50));
                return;

            case 6:
                porder.AddStuff(new Tillbehör("Pizzasallad\n\t\t\t\t\t", 5));
                return;

            case 7:
                porder.AddStuff(new Tillbehör("Dipsås\n\t\t\t\t\t", 7));
                return;

            case 0:
                //Submeny.StarMenuChoice(porder);
                return;

            default:
                Console.WriteLine("\t\t\t\tFelaktig inmatning, försök igen!");
                Thread.Sleep(1000);
                break;
            }
        }
Example #2
0
        static void Main(string[] args)
        {
            Terminal terminal = new Terminal();

            while (true)
            {
                Console.Clear();
                Console.ForegroundColor = ConsoleColor.Cyan;
                string pizzalogo = @"   
                                  ██████╗ ██╗███████╗███████╗ █████╗                
                                  ██╔══██╗██║╚══███╔╝╚══███╔╝██╔══██╗               
                                  ██████╔╝██║  ███╔╝   ███╔╝ ███████║               
                                  ██╔═══╝ ██║ ███╔╝   ███╔╝  ██╔══██║               
                                  ██║     ██║███████╗███████╗██║  ██║               
                                  ╚═╝     ╚═╝╚══════╝╚══════╝╚═╝  ╚═╝               
                                                                                    
                  ██████╗  █████╗ ██╗      █████╗ ████████╗███████╗███████╗████████╗
                  ██╔══██╗██╔══██╗██║     ██╔══██╗╚══██╔══╝██╔════╝██╔════╝╚══██╔══╝
                  ██████╔╝███████║██║     ███████║   ██║   ███████╗█████╗     ██║   
                  ██╔═══╝ ██╔══██║██║     ██╔══██║   ██║   ╚════██║██╔══╝     ██║   
                  ██║     ██║  ██║███████╗██║  ██║   ██║   ███████║███████╗   ██║   
                  ╚═╝     ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝   ╚═╝   ╚══════╝╚══════╝   ╚═╝   
                  
        █████╗█████╗█████╗█████╗█████╗█████╗█████╗█████╗█████╗█████╗█████╗█████╗█████╗█████╗█████╗ 
        ╚════╝╚════╝╚════╝╚════╝╚════╝╚════╝╚════╝╚════╝╚════╝╚════╝╚════╝╚════╝╚════╝╚════╝╚════╝                                                                                                           
                 ██╗██╗                                                                       
                 ╚═╝╚═╝                                                                       
        ██╗   ██╗ █████╗ ██╗     ██╗  ██╗ ██████╗ ███╗   ███╗███╗   ███╗███████╗███╗   ██╗██╗
        ██║   ██║██╔══██╗██║     ██║ ██╔╝██╔═══██╗████╗ ████║████╗ ████║██╔════╝████╗  ██║██║
        ██║   ██║███████║██║     █████╔╝ ██║   ██║██╔████╔██║██╔████╔██║█████╗  ██╔██╗ ██║██║
        ╚██╗ ██╔╝██╔══██║██║     ██╔═██╗ ██║   ██║██║╚██╔╝██║██║╚██╔╝██║██╔══╝  ██║╚██╗██║╚═╝
         ╚████╔╝ ██║  ██║███████╗██║  ██╗╚██████╔╝██║ ╚═╝ ██║██║ ╚═╝ ██║███████╗██║ ╚████║██╗
          ╚═══╝  ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝ ╚═════╝ ╚═╝     ╚═╝╚═╝     ╚═╝╚══════╝╚═╝  ╚═══╝╚═╝";
                Console.WriteLine(pizzalogo);
                Console.ResetColor();
                Console.WriteLine("\t\t\t\t\tPress anykey to continue ");
                Console.ReadKey();
                Customer customer = new Customer();
                Order    order    = new Order(customer);
                Submeny.StarMenuChoice(order);
                //När användaren trycker på valfri knapp så skapas ett nytt customer och orderobjekt
                //orderobjektet skickas med genom hela programmet när ny metod kallas.
            }
        }
Example #3
0
        //static Kundkorg kundkorg = new Kundkorg();
        //public static List<Product> Items { get; set; } = new List<Product>();

        public static void PaymentMenu(Order porder)
        {
            Console.Clear();
            AbMeny.PrintPayLogo();
            Console.WriteLine("\t\t\t\t\t***** Kvitto *****");
            Submeny.PrintSummary(porder);  //Visar summering av order som kvitto.


            Console.WriteLine("\t\t\t\t\t1: Betala"); //Vi skrotade kundkorgen och valde att simulera ett köp istället

            int input = IntIn();

            if (input == 1)
            {
                Console.Clear();
                AbMeny.PrintLogo();
                Console.WriteLine("\t\t\t\t\tAnvänd kortterminalen för att slutföra din order");
                Thread.Sleep(3000);

                Console.Clear();
                AbMeny.PrintLogo();
                Console.WriteLine("\t\t\t\t\tBekräfta order genom att trycka 1.");
                int input2 = IntIn();
                if (input2 == 1)
                {
                    Console.Clear();
                    AbMeny.PrintLogo();
                    Console.WriteLine("\t\t\t\t\tProcessing payment...");
                    Thread.Sleep(3000);
                    Console.WriteLine("\t\t\t\t\tBetalning godkänd!");
                    Thread.Sleep(1500);
                    Console.Clear();
                    AbMeny.PrintLogo();
                    Console.WriteLine("\t\t\t\t\tDin order behandlas nu hos en av våra bagare\n" +
                                      "\t\t\t\t\tVänligen följ din order på infoterminalen framme vid kassan\n" +
                                      "\t\t\t\t\tBon appetit!");


                    Thread.Sleep(5000);
                    return;
                }
            }
        }
        public static void ChoosePasta(Order porder)
        {
            Console.Clear();
            AbMeny.PrintPastaLogo();
            Console.WriteLine("\t\t\t\t\tVälj pasta: \n " +
                              "\t\t\t\t\t1: Marinara \n " +
                              "\t\t\t\t\t2: Pesto \n " +
                              "\t\t\t\t\t3: Carbonara \n " +
                              "\t\t\t\t\t4: Frutti di mare \n\n\n " +
                              "\t\t\t\t\t0: Bakåt");
            Submeny.PrintSummary(porder);
            int pastachoice = IntIn();

            switch (pastachoice)
            {
            case 1:
                porder.AddStuff(new Pasta("Marinara och Senapspasta", 55));
                return;

            case 2:
                porder.AddStuff(new Pasta("Pesto", 50));
                return;

            case 3:
                porder.AddStuff(new Pasta("Carbonara", 76));
                return;

            case 4:
                porder.AddStuff(new Pasta("Frutti di mare", 70));
                return;

            case 0:
                //Submeny.StarMenuChoice(porder);
                return;

            default:
                Console.WriteLine("\t\t\t\tFelaktig inmatning, försök igen!");
                Thread.Sleep(1000);
                break;
            }
        }
        public static void ChooseSalad(Order porder)
        {
            Console.Clear();
            AbMeny.PrintSaladLogo();
            Console.WriteLine("\t\t\t\t\tSalladsmeny: \n " +
                              "\t\t\t\t\t1: Avocadosallad \n " +
                              "\t\t\t\t\t2: FetaOst-sallad \n " +
                              "\t\t\t\t\t3: Räksallad \n " +
                              "\t\t\t\t\t4: Kycklingsallad\n\n\n" +
                              "\t\t\t\t\t0: Bakåt");
            Submeny.PrintSummary(porder);
            int saladchoice = IntIn();

            switch (saladchoice)
            {
            case 1:
                porder.AddStuff(new Sallad("Avocadosallad", 70, "RhodeIsland"));
                return;

            case 2:
                porder.AddStuff(new Sallad("FetaOst-sallad", 70, "Kebabsås"));
                return;

            case 3:
                porder.AddStuff(new Sallad("Räksallad", 70, "Jordgubb och Cocacolasås"));
                return;

            case 4:
                porder.AddStuff(new Sallad("Kycklingsallad", 170, "Smultron och Mahmodisås"));
                return;

            case 0:

                return;
            }
        }