Exemple #1
0
        //Menu'en for at vise alle film og vægle en film
        public static void ViewAllFilms()
        {
            Console.Clear();

            Console.WriteLine(":::::::All movies::::::::");

            List <Film> films = FilmManager.GetFilm();

            for (int i = 0; i < films.Count; i++)
            {
                Console.WriteLine($"{i}: {films[i].Title}");
            }

            //Bruger kan valge en af de udskrevet film
            UserManager.SelectMovie();
        }
Exemple #2
0
        //Menu'en til bruger
        public static void Menu()
        {
            List <Film> movies = FilmManager.GetFilm();

            Console.Clear();

            Console.WriteLine(":::::::Start menu::::::::");

            Console.WriteLine();

            Console.WriteLine("-1: Exit");
            Console.WriteLine("0: Search Movie");
            Console.WriteLine("1: Search Actor");
            Console.WriteLine("2: Search Genre");
            Console.WriteLine("3: View all movie");
            Console.WriteLine("4: View all actors");
        }
Exemple #3
0
        //Bruger skal vægle en film
        public static void SelectMovie()
        {
            //Får alle film
            List <Film> movies = FilmManager.GetFilm();

            while (true)
            {
                int input = ParseInt();
                if (input < movies.Count && input >= 0)
                {
                    //Viser den film man har valgt
                    UI.MovieViewer(input, movies);
                    break;
                }
                else
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("Invalid number");
                    Console.ResetColor();
                    Console.ReadKey();
                }
            }
        }