Exemple #1
0
        public void SweetCat()
        {
            Console.ForegroundColor = ConsoleColor.DarkYellow;
            string str = @"
                             .────────────────────────────────────────────────────────────────.
                             |            [T]  Talianske tiramisu                             |
                             *────────────────────────────────────────────────────────────────* 

                             .────────────────────────────────────────────────────────────────.
                             |            [K]  Karamelový cheesecake s čokoládou              |
                             *────────────────────────────────────────────────────────────────* 

                             .────────────────────────────────────────────────────────────────.
                             |            [B]  Banánové lievance s čokoládou                  |
                             *────────────────────────────────────────────────────────────────*

                             .────────────────────────────────────────────────────────────────.
                             |            [C]  Čokoládové cookies                             |
                             *────────────────────────────────────────────────────────────────*";

            Console.WriteLine(str);

            Console.ForegroundColor = ConsoleColor.DarkRed;
            string s = @"
                             .────────────────────────────────────────────────────────────────.
                             |                         [S]  SPÄŤ                              |
                             *────────────────────────────────────────────────────────────────* ";

            Console.WriteLine(s);
            Console.ReadLine();


            char   button1       = Convert.ToChar(Console.Read());
            string buttonString1 = button1.ToString();

            switch (buttonString1)
            {
            case "s":
            case "S":
            {
                Console.Clear();
                Console.WriteLine("Späť do kategorií");
                ByCategory byCategory = new ByCategory();
                byCategory.SearchCat();

                break;
            }

            case "t":
            case "T":
            {
                Console.Clear();
                Recipe0 recipe0 = new Recipe0();
                recipe0.Recept0();

                break;
            }


            case "k":
            case "K":
            {
                Console.Clear();
                Recipe2 recipe2 = new Recipe2();
                recipe2.Recept2();

                break;
            }


            case "b":
            case "B":
            {
                Console.Clear();
                Recipe5 recipe5 = new Recipe5();
                recipe5.Recept5();

                break;
            }


            case "c":
            case "C":
            {
                Console.Clear();
                Recipe7 recipe7 = new Recipe7();
                recipe7.Recept7();

                break;
            }


            default:
            {
                Console.Clear();
                Sweet sweet = new Sweet();
                sweet.SweetCat();

                break;
            }
            }
        }
Exemple #2
0
        public void SearchCat()
        {
            Console.ForegroundColor = ConsoleColor.DarkCyan;
            string str = @"
                                                                     _
                                         _  __     _                //      _
                                        | |/ /__ _| |_ ___  __ _  ___  _ __(_) ___ 
                                        | ' // _` | __/ _ \/ _` |/ _ \| '__| |/ _ \
                                        | . \ (_| | ||  __/ (_| | (_) | |  | |  __/
                                        |_|\_\__,_|\__\___|\__, |\___/|_|  |_|\___|
                                                            |___/                   ";

            Console.WriteLine(str);

            Console.ForegroundColor = ConsoleColor.DarkYellow;
            string cat = @"
                             .────────────────────────────────────────────────────────────────.
                             |                    [0]  SLADKÉ RECEPTY                         |
                             *────────────────────────────────────────────────────────────────* 
          

                             .────────────────────────────────────────────────────────────────.
                             |                    [1]  SLANÉ RECEPTY                          |
                             *────────────────────────────────────────────────────────────────*                         
                              

                             .────────────────────────────────────────────────────────────────.
                             |                    [2]  NÍZKA NÁROČNOSŤ                        |
                             *────────────────────────────────────────────────────────────────*


                             .────────────────────────────────────────────────────────────────.
                             |                    [3]  STREDNÁ NÁROČNOSŤ                      |
                             *────────────────────────────────────────────────────────────────*";

            Console.WriteLine(cat);

            Console.ForegroundColor = ConsoleColor.DarkRed;
            string s = @"

                             .────────────────────────────────────────────────────────────────.
                             |                [S]  SPÄŤ NA VŠETKY KATEGÓRIE                   |
                             *────────────────────────────────────────────────────────────────* ";

            Console.WriteLine(s);
            Console.ReadLine();

            char   button       = Convert.ToChar(Console.Read());
            string buttonString = button.ToString();

            switch (buttonString)
            {
            case "s":
            case "S":
            {
                Console.Clear();
                Console.WriteLine("Späť na vyhľadávanie");
                Find findr = new Find();
                findr.FindRecipe();

                break;
            }

            case "0":
            {
                Console.Clear();
                Sweet sweet = new Sweet();
                sweet.SweetCat();

                break;
            }


            case "1":
            {
                Console.Clear();
                Salty salty = new Salty();
                salty.SaltyCat();

                break;
            }


            case "2":
            {
                Easy easy = new Easy();
                easy.EasyCat();

                break;
            }


            case "3":
            {
                Console.Clear();
                Medium medium = new Medium();
                medium.MediumCat();


                break;
            }



            default:
            {
                Console.Clear();
                ByCategory byCategory = new ByCategory();
                byCategory.SearchCat();

                break;
            }
            }
        }