public Show FindShow(string MovieName, DayOfWeek dayOfWeek, Time time) { Movie movie = Movies.FindMovie(MovieName); int showIndex = -1; for (int i = 0; i < shows.Count; i++) { Show show = shows[i]; int dayOfWeekIndex = show.Movie.ProjectionTime.FindIndex(item => item.DayOfWeek == (DayOfWeek)dayOfWeek); if (dayOfWeekIndex < 0) { continue; } int timeOfWeekIndex = show.Movie.ProjectionTime[dayOfWeekIndex].ShowTime.FindIndex(item => item.Hours == time.Hours && item.Minutes == time.Minutes); if (timeOfWeekIndex < 0) { continue; } showIndex = shows.FindIndex(item => item.Movie == movie && item.Time == show.Movie.ProjectionTime[dayOfWeekIndex].ShowTime[timeOfWeekIndex] && show.Date == show.Movie.ProjectionTime[dayOfWeekIndex].DayOfWeek); if (showIndex >= 0) { break; } } return shows[showIndex]; }
public Show(CinemaHall hall, Movie movie, DayOfWeek date, Time time) { this.Hall = hall; this.Movie = movie; this.seatReserved = new bool[Hall.Rows, Hall.Seats]; this.Date = date; this.Time = time; }
public Movie(string name, Genre genre, Time duratation, string director, List<string> artists, string movieInfo, bool isPremiere, List<MovieDate> projection) { this.Name = name; this.MovieGenre = genre; this.Duratation = duratation; this.Director = director; this.ArtistList = artists; this.MovieInfo = movieInfo; this.IsPremiere = isPremiere; this.ProjectionTime = projection; }