예제 #1
0
        // Adds movie to database, if there isn't already on for that year
        public bool AddMovie(Movie movie)
        {
            if (!movieExists(movie.Year))
            {
                // There isn't already a movie for this year, so add it
                movies.Add(movie.Year, movie);
                return true;
            }

            // A movie from that year already exists
            return false;
        }
예제 #2
0
 // Clears the listbox then displays all movies in the passed in dictionary
 private void displayMovie(Movie movieToDisplay)
 {
     rtMoviesList.AppendText(movieToDisplay.ToString() + "\n");
 }