private void SetMovies() { moviesView.Rows.Clear(); List <Movie> movies = Cinema.GetCinema().Movies; for (int i = 0; i < movies.Count; i++) { int minCost = movies[i].GetPrice(); string extraInfo = ""; if (movies[i].Type == FilmType.Premiere) { PremiereMarkup pm = new PremiereMarkup(movies[i]); extraInfo = pm.GetExtraInfo(); minCost = pm.GetPrice(); } else if (movies[i].Type == FilmType.StudentSale) { StudentSale ss = new StudentSale(movies[i]); extraInfo = ss.GetExtraInfo(); } moviesView.Rows.Add( resizeImage(movies[i].GetImage(), new Size(100, 100)), movies[i].Name + Environment.NewLine + movies[i].Genre + Environment.NewLine + movies[i].MinAge + "+" + Environment.NewLine + "(from " + minCost + " hrn)", extraInfo); moviesView.Rows[i].Tag = movies[i]; } }
public MainMoviesWindow() { InitializeComponent(); Cinema.DeserializeJSON(); cinemaNameLabel.Text = Cinema.GetCinema().Name; SetMovies(); }
public HallWindow(int selectedMovieIndex) { Cinema cinema = Cinema.GetCinema(); _movie = cinema.Movies[selectedMovieIndex]; _ticket = new ProxyTicket(); _ticket.CinemaName = cinema.Name; InitializeComponent(); SetMovieSeances(cinema.Movies, selectedMovieIndex); if (Cinema.CurUser == null) { enterLabel.Visible = true; } }