Exemplo n.º 1
0
        public void readAll()
        {
            string[] values = moviesFile.ReadFile();

            foreach (var value in values)
            {
                Movie movie = new Movie();
                movie.stringToObject(value);
                movies.Add(movie);
            }

            values = hallFile.ReadFile();

            foreach (var value in values)
            {
                CinemaHall hall = new CinemaHall();
                hall.stringToObject(value);
                cinemaHalls.Add(hall);
            }
        }
Exemplo n.º 2
0
        public void AddCinemaHall()
        {
            CinemaHall hall = new CinemaHall();

            Console.Clear();
            Console.WriteLine("Adding hall:\n");

            Console.Write("Hall Name > ");
            hall.Name = Console.ReadLine();

            Console.WriteLine("Select Movie:\n");
            printList(new List <object>(movies));

            Console.Write("\n > ");
            int select = int.Parse(Console.ReadLine());

            hall.Movie = movies[select];

            cinemaHalls.Add(hall);
        }