private static Cinema CreateDefaultCinema() { List <CinemaHall> halls = new List <CinemaHall>(); CinemaHall hall1 = new CinemaHall(1, new ThreeDimentionalHall()); hall1.AddRow(); hall1.AddRow(); hall1.AddRow(); hall1.AddRow(); hall1.AddRow(); halls.Add(hall1); CinemaHall hall2 = new CinemaHall(2, new TwoDimentionalHall()); hall2.AddRow(); hall2.AddRow(); hall2.AddRow(); hall2.AddRow(); halls.Add(hall2); CinemaHall hall3 = new CinemaHall(3, new TwoDimentionalHall()); hall3.AddRow(); hall3.AddRow(); hall3.AddRow(); hall3.AddRow(); halls.Add(hall3); List <User> users = new List <User>(); User user1 = new User("234342", "me", "me"); users.Add(user1); User user2 = new User("234342", "you", "you"); users.Add(user2); Cinema cinema = new Cinema("Kievskaya Rus'", new List <Movie>(), halls, users); List <Seance> seances1 = new List <Seance>(); seances1.Add(new Seance(new DateTime(2019, 1, 1, 13, 0, 0), hall1.Clone() as CinemaHall)); seances1.Add(new Seance(new DateTime(2019, 1, 1, 18, 0, 0), hall1.Clone() as CinemaHall)); List <Seance> seances2 = new List <Seance>(); seances2.Add(new Seance(new DateTime(2019, 1, 1, 12, 00, 0), hall2.Clone() as CinemaHall)); seances2.Add(new Seance(new DateTime(2019, 1, 1, 23, 00, 0), hall2.Clone() as CinemaHall)); List <Seance> seances3 = new List <Seance>(); seances3.Add(new Seance(new DateTime(2019, 1, 1, 8, 00, 0), hall3.Clone() as CinemaHall)); seances3.Add(new Seance(new DateTime(2019, 1, 1, 19, 00, 0), hall3.Clone() as CinemaHall)); Movie movie1 = new Movie("Shazam", "fantactic", 80, 16, @"C:\Users\dafna\Desktop\Labs\Cursach\1.jpg", FilmType.Premiere, seances1); Movie movie2 = new Movie("The theory of everything", "biography", 70, 16, @"C:\Users\dafna\Desktop\Labs\Cursach\3.jpg", FilmType.Ordinary, seances2); Movie movie3 = new Movie("Happy death day", "comedy", 60, 18, @"C:\Users\dafna\Desktop\Labs\Cursach\2.jpg", FilmType.StudentSale, seances3); cinema.AddMovie(movie1); cinema.AddMovie(movie2); cinema.AddMovie(movie3); return(cinema); }
public Seance(DateTime time, CinemaHall hall) { _time = time; _hall = hall; _ev = new Evening(null); _day = new Day(_ev); _mn = new MorningOrNight(_day); _seancePaid = _mn.CountAddedSceanceCost(this._time); }