public MovieInformationWindow(Movie movie)
        {
            InitializeComponent();

            this.Text = movie.Title;

            directorNameLabel.Text = movie.Director;
            certificationValueLabel.Text = movie.Certificate;
            ratingValueLabel.Text = movie.Rating.ToString();
            movieNameLabel.Text = movie.Title;
            yearValueLabel.Text = movie.Year.ToString();
            runningTimeValueLabel.Text = movie.RunningTime.ToString() + " minutes";
            genreValueLabe.Text = movie.Genre;

            foreach (string str in movie.ActorList)
                actorListBox.Items.Add(str);

            foreach (string str in movie.ActressList)
                actressListBox.Items.Add(str);

            this.Visible = true;
        }
 private bool testYearRange(Movie movie)
 {
     return !(movie.Year >= yearMin && movie.Year <= yearMax);
 }
 private bool testRunningTime(Movie movie)
 {
     return !(movie.RunningTime >= runningTimeMin && movie.RunningTime <= runningTimeMax);
 }
 private bool testRatingRange(Movie movie)
 {
     return !(movie.Rating >= ratingMin && movie.Rating <= ratingMax);
 }
        private bool testGenre(Movie movie)
        {
            //bool result = false;

            //List<string> currentGenreSet;
            //int numberOfMatchingGenres;

            //currentGenreSet = movie.GenreList;
            //numberOfMatchingGenres = 0;

            ////loop through each disabled genre
            //for (int i = 0; i < disabledGenres.Count && numberOfMatchingGenres != currentGenreSet.Count; i++)
            //{
            //    //search for that genre in the set of genres for the current movie
            //    if (search(currentGenreSet, disabledGenres[i]))
            //    {
            //        numberOfMatchingGenres++;
            //        movie.moveGenreToEnd(disabledGenres[i]);
            //    }
            //}

            //if (numberOfMatchingGenres == currentGenreSet.Count)
            //{
            //    result = true;
            //}

            bool result;

            if (movie.Genre != null && search(disabledGenres, movie.Genre))
            {
                result = true;
            }
            else
                result = false;

            return result;
        }
        private bool testDirector(Movie movie)
        {
            bool result;

            if (String.Compare(directorFilter, "all", true) != 0)
                result = !(String.Compare(directorFilter, movie.Director) == 0);
            else
                result = false;

            return result;
        }
        private bool testCertification(Movie movie)
        {
            bool result;

            if (movie.Certificate != null && search(disabledCertifications, movie.Certificate))
            {
                result = true;
            }
            else
                result = false;

            return result;
        }
        private bool testActress(Movie movie)
        {
            List<string> currentActressSet = movie.ActressList;
            bool result;

            if (String.Compare(actressFilter, "all", true) != 0)
            {
                currentActressSet = movie.ActressList;
                result = !search(currentActressSet, actressFilter);
            }
            else
            {
                result = false;
            }

            return result;
        }
Example #9
0
        public Movie deepCopy()
        {
            Movie temp = new Movie();

            temp.Title = title;
            temp.Director = director;
            temp.Rating = rating;
            temp.RunningTime = runningTime;
            temp.Year = year;
            temp.certificate = certificate;
            temp.genre = genre;

            foreach (string str in ActorList)
                temp.addActor(str);

            foreach (string str in ActorCharacterList)
                temp.addActorCharacter(str);

            foreach (string str in ActressCharacterList)
                temp.addActressCharacter(str);

            foreach (string str in ActressList)
                temp.addActress(str);

            return temp;
        }