Example #1
0
        public void Recept7()
        {
            XmlTextReader xml0 = new XmlTextReader("C:\\Users\\Administrátor\\Desktop\\RecipeStorage.xml");

            while (xml0.Read())
            {
                if (xml0.NodeType == XmlNodeType.Element && xml0.Name == "eigname")
                {
                    Console.ForegroundColor = ConsoleColor.DarkCyan;
                    string s1 = xml0.ReadElementString();
                    Console.WriteLine("                                           " + s1);
                }
                if (xml0.NodeType == XmlNodeType.Element && xml0.Name == "eigdate")
                {
                    Console.ForegroundColor = ConsoleColor.White;
                    string s2 = xml0.ReadElementString();
                    Console.WriteLine(s2);
                }
                if (xml0.NodeType == XmlNodeType.Element && xml0.Name == "eigcategory")
                {
                    Console.WriteLine("");
                    string s3 = xml0.ReadElementString();
                    Console.WriteLine(s3);
                }
                if (xml0.NodeType == XmlNodeType.Element && xml0.Name == "eigingredients")
                {
                    string s4 = xml0.ReadElementString();
                    Console.WriteLine(s4);
                }
                if (xml0.NodeType == XmlNodeType.Element && xml0.Name == "eigprocess")
                {
                    string s5 = xml0.ReadElementString();
                    Console.WriteLine(s5);
                }
                if (xml0.NodeType == XmlNodeType.Element && xml0.Name == "eigauthor")
                {
                    Console.WriteLine("");
                    string s6 = xml0.ReadElementString();
                    Console.WriteLine("Autor receptu: " + s6);
                }
            }


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

                  .────────────────────────────────────────────────────────────────.
                  |                      [S]  Späť na recepty                      |
                  *────────────────────────────────────────────────────────────────* ";

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

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

            if (buttonString1 == "S")
            {
                Console.Clear();
                Recipes recipes = new Recipes();
                recipes.RecipeClass();
            }
            else if (buttonString1 == "s")
            {
                Console.Clear();
                Recipes recipes = new Recipes();
                recipes.RecipeClass();
            }
        }
Example #2
0
        public void SearchDate()
        {
            string a = @"
                              RECEPTY SÚ ZORADENÉ OD NAJNOVŠIE PRIDANÉ PO TIE NAJSTARŠIE
                            --------------------------------------------------------------";

            Console.WriteLine(a);

            Console.ForegroundColor = ConsoleColor.DarkCyan;
            string str = @"    


                             .────────────────────────────────────────────────────────────────.
                             |            [0]  Zemiakové pirohy s mäsovou plnkou              |
                             *────────────────────────────────────────────────────────────────*

                             .────────────────────────────────────────────────────────────────.
                             |            [1]  Cesnaková polievka                             |
                             *────────────────────────────────────────────────────────────────*

                             .────────────────────────────────────────────────────────────────.
                             |            [2]  Čokoládové cookies                             |
                             *────────────────────────────────────────────────────────────────*

                             .────────────────────────────────────────────────────────────────.
                             |            [3]  Gyros s kuracím mäsom v tortille               |
                             *────────────────────────────────────────────────────────────────*

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

                             .────────────────────────────────────────────────────────────────.
                             |            [5]  Kurací perkelt so smotanou a haluškami         |
                             *────────────────────────────────────────────────────────────────*

                             .────────────────────────────────────────────────────────────────.
                             |            [6]  Polesníky                                      |
                             *────────────────────────────────────────────────────────────────* 

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

                             .────────────────────────────────────────────────────────────────.
                             |            [8]  Cestoviny s kuracími prsiami Alfredo           |
                             *────────────────────────────────────────────────────────────────*                         
                              
                             .────────────────────────────────────────────────────────────────.
                             |            [9]  Talianske tiramisu                             |
                             *────────────────────────────────────────────────────────────────*";

            Console.Write(str);

            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äť do menu");
                Menu hlavna = new Menu();
                hlavna.DesignMenu();

                break;
            }

            case "0":
            {
                Console.Clear();
                Recipe9 recipe9 = new Recipe9();
                recipe9.Recept9();


                break;
            }


            case "1":
            {
                Console.Clear();
                Recipe8 recipe8 = new Recipe8();
                recipe8.Recept8();

                break;
            }


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

                break;
            }


            case "3":
            {
                Console.Clear();
                Recipe6 recipe6 = new Recipe6();
                recipe6.Recept6();

                break;
            }


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

                break;
            }


            case "5":
            {
                Console.Clear();
                Recipe4 recipe4 = new Recipe4();
                recipe4.Recept4();

                break;
            }

            case "6":
            {
                Console.Clear();
                Recipe3 recipe3 = new Recipe3();
                recipe3.Recept3();

                break;
            }


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

                break;
            }

            case "8":
            {
                Console.Clear();
                Recipe1 recipe1 = new Recipe1();
                recipe1.Recept1();

                break;
            }

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

                break;
            }

            default:
            {
                Console.Clear();
                Recipes rec = new Recipes();
                rec.RecipeClass();

                break;
            }
            }
        }
Example #3
0
        public void RecipeClass()
        {
            Console.ForegroundColor = ConsoleColor.DarkCyan;
            string r = @"     
                                            _____                     _         
                                           |  __ \                   | |        
                                           | |__) |___  ___ ___ _ __ | |_ _   _ 
                                           |  _  // _ \/ __/ _ \ '_ \| __| | | |
                                           | | \ \  __/ (_|  __/ |_) | |_| |_| |
                                           |_|  \_\___|\___\___| .__/ \__|\__, |
                                                               | |         __/ |
                                                               |_|        |___/ 

";

            Console.Write(r);
            Console.ForegroundColor = ConsoleColor.White;

            string a = @"   
          


                             .────────────────────────────────────────────────────────────────.
                             |                [S]  Späť do hlavnej ponuky                     |
                             *────────────────────────────────────────────────────────────────* ";


            Console.Write(a);
            Console.ForegroundColor = ConsoleColor.DarkYellow;
            string str = @"    


                             
                             .────────────────────────────────────────────────────────────────.
                             |          [0]  Talianske tiramisu                               |
                             *────────────────────────────────────────────────────────────────* 
          

                             .────────────────────────────────────────────────────────────────.
                             |          [1]  Cestoviny s kuracími prsiami Alfredo             |
                             *────────────────────────────────────────────────────────────────*                         
                              

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


                             .────────────────────────────────────────────────────────────────.
                             |          [3]  Polesníky                                        |
                             *────────────────────────────────────────────────────────────────* 


                             .────────────────────────────────────────────────────────────────.
                             |          [4]  Kurací perkelt so smotanou a haluškami           |
                             *────────────────────────────────────────────────────────────────*


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


                             .────────────────────────────────────────────────────────────────.
                             |          [6]  Gyros s kuracím mäsom v tortille                 |
                             *────────────────────────────────────────────────────────────────*


                             .────────────────────────────────────────────────────────────────.
                             |          [7]  Čokoládové cookies                               |
                             *────────────────────────────────────────────────────────────────*


                             .────────────────────────────────────────────────────────────────.
                             |          [8]  Cesnaková polievka                               |
                             *────────────────────────────────────────────────────────────────*


                             .────────────────────────────────────────────────────────────────.
                             |          [9]  Zemiakové pirohy s mäsovou plnkou                |
                             *────────────────────────────────────────────────────────────────*


                             .────────────────────────────────────────────────────────────────.
                             |          [N]  Nový recept                                      |
                             *────────────────────────────────────────────────────────────────*

";

            Console.Write(str);



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

            switch (buttonString)
            {
            case "s":
            case "S":
            {
                Console.Clear();
                Console.WriteLine("Späť do menu");
                Menu hlavna = new Menu();
                hlavna.DesignMenu();

                break;
            }

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

                break;
            }

            case "1":
            {
                Console.Clear();
                Recipe1 recipe1 = new Recipe1();
                recipe1.Recept1();

                break;
            }

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

                break;
            }


            case "3":
            {
                Console.Clear();
                Recipe3 recipe3 = new Recipe3();
                recipe3.Recept3();

                break;
            }


            case "4":
            {
                Console.Clear();
                Recipe4 recipe4 = new Recipe4();
                recipe4.Recept4();

                break;
            }


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

                break;
            }

            case "6":
            {
                Console.Clear();
                Recipe6 recipe6 = new Recipe6();
                recipe6.Recept6();

                break;
            }


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

                break;
            }

            case "8":
            {
                Console.Clear();
                Recipe8 recipe8 = new Recipe8();
                recipe8.Recept8();

                break;
            }

            case "9":
            {
                Console.Clear();
                Recipe9 recipe9 = new Recipe9();
                recipe9.Recept9();

                break;
            }

            case "n":
            case "N":
            {
                Console.Clear();
                Recipe10 class1 = new Recipe10();
                class1.Recept11();

                break;
            }

            default:
            {
                Console.Clear();
                Recipes rec = new Recipes();
                rec.RecipeClass();

                break;
            }
            }
        }
Example #4
0
        public void DesignMenu()
        {
            Console.BackgroundColor = ConsoleColor.Black;
            Console.ForegroundColor = ConsoleColor.DarkYellow;
            Console.Title           = "Yummy book";
            string title = @"
                           * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                        
                           *                                                                   *
                           *  _   _ _   _ _ __ ___  _ __ ___  _   _  | |__   ___   ___ | | __  *
                           * | | | | | | | '_ ` _ \| '_ ` _ \| | | | | '_ \ / _ \ / _ \| |/ /  * 
                           * | |_| | |_| | | | | | | | | | | | |_| | | |_) | (_) | (_) |   <   *
                           *  \__, |\__,_|_| |_| |_|_| |_| |_|\__, | |_.__/ \___/ \___/|_|\_\  *
                           *   __/ |                           __/ |                           *
                           *  |___/                           |___/                            *            
                           *                                                                   *
                           * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ";

            Console.WriteLine(title);

            Console.ForegroundColor = ConsoleColor.DarkCyan;
            string recepty = @" 
                            .────────────────────────────────────────────────────────────────.
                            |                        [R]  RECEPTY                            |
                            *────────────────────────────────────────────────────────────────* 

                            .────────────────────────────────────────────────────────────────.
                            |                        [N]  NÁJSŤ RECEPT                       |
                            *────────────────────────────────────────────────────────────────* 

                            .────────────────────────────────────────────────────────────────.
                            |                        [P]  PRIDAŤ RECEPT                      |
                            *────────────────────────────────────────────────────────────────* 

                            .────────────────────────────────────────────────────────────────.
                            |                        [A]  O APLIKÁCIÍ                        |
                            *────────────────────────────────────────────────────────────────* ";



            Console.Write(recepty);

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

                            .────────────────────────────────────────────────────────────────.
                            |                        [U] UKONČIŤ APLIKÁCIU                   |
                            *────────────────────────────────────────────────────────────────*

";

            Console.WriteLine(ext);


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

            switch (buttonString)
            {
            case "r":
            case "R":
            {
                Console.Clear();
                Recipes rec = new Recipes();
                rec.RecipeClass();


                break;
            }

            case "n":
            case "N":
            {
                Console.Clear();
                Find findr = new Find();
                findr.FindRecipe();

                break;
            }

            case "p":
            case "P":
            {
                Console.Clear();
                AddRecipe addr = new AddRecipe();
                addr.AddRec();

                break;
            }

            case "a":
            case "A":
            {
                Console.Clear();
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                string str = @"
                                               _____        __      
                                              |_   _|      / _|     
                                                | |  _ __ | |_ ___  
                                                | | | '_ \|  _/ _ \ 
                                               _| |_| | | | || (_) |
                                              |_____|_| |_|_| \___/ 
                                                                           

";
                Console.WriteLine(str);
                Console.ForegroundColor = ConsoleColor.White;
                Console.WriteLine("Vítame vás v tomto receptári :) ");
                Console.WriteLine("Nájdete tu plno vynikajúcich receptov rôznych druhov z ktorých si každý vyberie.");
                Console.WriteLine("Dúfam, že vám budú všetky recepty chutiť <3 ");
                Console.WriteLine("");
                Console.ForegroundColor = ConsoleColor.Magenta;
                Console.WriteLine("Vytvorené T.Michalíkovou a B.Dujčíkovou.");
                Console.ForegroundColor = ConsoleColor.DarkRed;

                string s = @"


                           .────────────────────────────────────────────────────────────────.
                           |                [S]  Späť do hlavnej ponuky                     |
                           *────────────────────────────────────────────────────────────────* ";
                Console.WriteLine(s);

                Console.ReadLine();

                char   button1       = Convert.ToChar(Console.Read());
                string buttonString1 = button1.ToString();
                if (buttonString1 == "S")
                {
                    Console.Clear();
                    Menu hlavna = new Menu();
                    hlavna.DesignMenu();
                }
                else if (buttonString1 == "s")
                {
                    Console.Clear();
                    Menu hlavna = new Menu();
                    hlavna.DesignMenu();
                }


                break;
            }


            case "u":
            case "U":
            {
                Environment.Exit(0);

                break;
            }


            default:
            {
                Console.Clear();
                Menu hlavna = new Menu();
                hlavna.DesignMenu();

                break;
            }
            }
        }