Exemple #1
0
        /// <summary>
        /// A two arguments constructor for the <c>NewMovieForm</c> class.
        /// </summary>
        /// <param name="movie_id">The id of the movie.</param>
        /// <param name="allMovies">The AllMoviesForm argument.</param>
        public mov4eAddMovie(int movie_id, IAllMovies allMovies)
        {
            this.all_movies = allMovies;
            InitializeComponent();
            InitializeForm();
            all_movies_presenter = new AllMoviesPresenter();
            Tuple <Movie, string> movie = all_movies_presenter.GetMovie(movie_id);

            textBoxName.Text            = movie.Item1.title;
            labelMovieName.Text         = movie.Item1.title;
            genreComboBox.SelectedValue = movie.Item1.genre;
            pgComboBox.SelectedValue    = (int)movie.Item1.pg;
            datePickerPrDate.Text       = movie.Item1.year.ToString();
            textBoxSummary.Text         = movie.Item1.summary;
            pictureBoxMoviePic.Image    = (Bitmap)((new ImageConverter()).ConvertFrom((byte[])movie.Item1.picture));
            textBoxDuration.Text        = movie.Item1.duration.ToString();
            id = movie_id;

            textBoxName.ForeColor     = Color.White;
            nameFirstClick            = false;
            textBoxDuration.ForeColor = Color.White;
            durationFirstClick        = false;
            textBoxSummary.ForeColor  = Color.White;
            summaryFirstClick         = false;

            // hides movie name only when a movie is added (because there's no name yet)
            labelMovieName.Visible = true;
        }
Exemple #2
0
 /// <summary>
 /// A one arguments constructor for the <c>NewMovieForm</c> class.
 /// </summary>
 /// <param name="allMovies">This is the AllMoviesForm argument.</param>
 public mov4eAddMovie(IAllMovies allMovies)
 {
     this.all_movies = allMovies;
     InitializeComponent();
     InitializeForm();
 }