Пример #1
0
 public void CreateActionTitlesList(Genre Action, Genre All)
 {
     Action.ListOfTitles.Add(All.ListOfTitles[0]);
     Action.ListOfTitles.Add(All.ListOfTitles[1]);
     Action.ListOfTitles.Add(All.ListOfTitles[5]);
     Action.ListOfTitles.Add(All.ListOfTitles[7]);
 }
Пример #2
0
 public void CreateGenreList(Genre All, Genre Action, Genre Romance, Genre Drama)
 {
     Genres.Add (All);
     Genres.Add (Action);
     Genres.Add (Romance);
     Genres.Add (Drama);
 }
Пример #3
0
 public void CreateAllTitlesList(Genre All)
 {
     All.ListOfTitles.Add(new Movie("Spotlight", 4.5, 128));
     All.ListOfTitles.Add(new Movie("Brooklyn", 4, 92));
     All.ListOfTitles.Add(new Movie("The Revenant", 5, 160));
     All.ListOfTitles.Add(new Movie("Room", 3.5, 88));
     All.ListOfTitles.Add(new Movie("The Martian", 3, 132));
     All.ListOfTitles.Add(new Movie("Mad Max", 3.5, 125));
     All.ListOfTitles.Add(new TV_Show("Mr. Robot"));
     All.ListOfTitles.Add(new TV_Show("Game Of Thrones"));
     All.ListOfTitles.Add(new TV_Show("Narcos"));
     All.ListOfTitles.Add(new TV_Show("Outlander"));
     All.ListOfTitles.Add(new TV_Show("Empire"));
 }
Пример #4
0
        static void Main(string[] args)
        {
            Catalog catalog = new Catalog();
            ViewTitlesWithGenres viewtitleswithgenres = new ViewTitlesWithGenres();
            Genre All = new Genre("All");
            Genre Action = new Genre("Action");
            Genre Romance = new Genre("Romance");
            Genre Drama = new Genre("Drama");

            catalog.CreateAllTitlesList(All);
            catalog.CreateActionTitlesList(Action, All);
            catalog.CreateRomanceTitlesList(Romance, All);
            catalog.CreateDramaTitlesList(Drama, All);
            catalog.CreateGenreList(All, Action, Romance, Drama);
            viewtitleswithgenres.DisplayGenresAndTitles(catalog.Genres);

            Console.ReadKey();
        }
Пример #5
0
 public void CreateDramaTitlesList(Genre Drama, Genre All)
 {
     Drama.ListOfTitles.Add(All.ListOfTitles[3]);
     Drama.ListOfTitles.Add(All.ListOfTitles[4]);
     Drama.ListOfTitles.Add(All.ListOfTitles[8]);
 }
Пример #6
0
 public void CreateRomanceTitlesList(Genre Romance, Genre All)
 {
     Romance.ListOfTitles.Add(All.ListOfTitles[2]);
     Romance.ListOfTitles.Add(All.ListOfTitles[6]);
 }
Пример #7
0
 public Title(string name, double rating, Genre genre)
 {
     this.Rating = rating;
     this.Name = name;
     this.Genre = genre;
 }
Пример #8
0
 public Title()
 {
     this.Rating = null;
     this.Name = null;
     this.Genre = null;
 }