/// <summary> /// Get required information from staff's input to add a new movie to the Movie Collection or add a number of copies to an existing movie. /// </summary> /// <param name="collection"></param> static void AddMovie(MovieCollection collection) { string title = GetTitle(); if (collection.Find(title) == null) { Console.Write("Enter the starring actor(s): "); string starring_input = Console.ReadLine(); string[] starring = starring_input.Split(new string[] { ", " }, StringSplitOptions.RemoveEmptyEntries); Console.Write("Enter the director(s): "); string director_input = Console.ReadLine(); string[] director = director_input.Split(new string[] { ", " }, StringSplitOptions.RemoveEmptyEntries); Movie.Genre genre = getGenre(); Movie.Classification classification = getClassification(); Console.Write("Enter the duration (minutes): "); int duration = GetValue(); Console.Write("Enter the release year (year): "); int release_date = GetValue(); Console.Write("Enter the number of copies available: "); int copies = GetValue(); collection.Insert(new Movie(title, starring, director, duration, genre, classification, release_date, copies, 0)); } else { Console.Write("Enter the number of copies you would like to add: "); int value = GetValue(); collection.Add_copies(value, title); } }
public DVD(string title, Movie.Genre category, int runTime, List <string> scenes) { this.Title = title; this.Category = category; this.RunTime = runTime; this.Scenes = scenes; this.CurrentTime = 0; }
private void Form1_Load(object sender, EventArgs e) { collection.Load(); foreach (var movie in collection.GetAll()) { listBox1.Items.Add(movie); } for (Movie.Genre genre = Movie.Genre.Action; genre < Movie.Genre.LAST; genre++) { comboBox1.Items.Add(genre); } }
public void AddMovieGenre(int movieId, Movie.Genre genre) { movies[movieId].Add(genre); }