private void MovieInfoWindow_Load(object sender, EventArgs e) { this.CenterToScreen(); MovieDAO movieDao = new MovieDAO(); Movie movie = movieDao.GetMovieData(movieId); pbMoviePoster.Image = (Image)AgileProject.Properties.Resources.ResourceManager.GetObject(movieId); lbMovieName.Text = movie.movieName; lbMovieYear.Text = movie.year.ToString(); lbMovieTime.Text = movie.movieLength.ToString() + " minutes"; lbGenre.Text = movie.genre; tbDescription.Text = movie.movieDescription; btnPurchase.Text = "$" + movie.purchasePrice.ToString() + " Buy"; Label[] lbCredits = { lbCredit1, lbCredit2, lbCredit3, lbCredit4 }; TextBox[] tbCredits = { tbCredit1, tbCredit2, tbCredit3, tbCredit4 }; String[] creditTitle = { "Actors", "Producers", "Directors", "Writers" }; String[] creditInfo = { movie.actors, movie.producers, movie.directors, movie.writers }; int i = 0; for (int j = 0; j < 4; j++) { if (creditInfo[j] != "") { lbCredits[i].Text = creditTitle[j]; tbCredits[i].Text = creditInfo[j]; i++; } } initializeButtons(); }
private void BillingFormWindow_Load(object sender, EventArgs e) { this.CenterToScreen(); MovieDAO movieDAO = new MovieDAO(); Movie movie = movieDAO.GetMovieData(movieId); pbMoviePoster.Image = (Image)Properties.Resources.ResourceManager.GetObject(movieId); lblMovieName.Text = movie.movieName; lblGenre.Text = movie.genre; lblPrice.Text = "$" + movie.purchasePrice.ToString(); }
private void PlayerWindow_Load(object sender, EventArgs e) { this.CenterToScreen(); loading.Location = new Point(this.Width / 2 - 25, this.Height / 2 - 100); MovieDAO movieDAO = new MovieDAO(); Movie movie = movieDAO.GetMovieData(movieId); pbMoviePoster.Image = (Image)Properties.Resources.ResourceManager.GetObject(movieId); lblMovieName.Text = movie.movieName; time.Text = TimeSpan.FromMinutes(movie.movieLength).ToString(@"hh\:mm\:ss"); }