Пример #1
0
 /// <summary>
 /// Atspausdinama i konsole kas mate daugiausiai filmu, kuriuose vaidina T. Cruise ir N.Kidman.
 /// </summary>
 /// <param name="Spectators"></param>
 /// <param name="max"></param>
 void CruisAndKidmanSpausdinimas(SpectatorBranch Spectators, int max)
 {
     Console.WriteLine("Daugiausiai filmu, kuriose vaidino N. Kidman mate: ");
     for (int i = 0; i < Spectators.Count; i++)
     {
         if (Spectators.GetSpectator(i).CruisKidmanCount == max)
         {
             Console.WriteLine("{0} {1}", Spectators.GetSpectator(i).Name, Spectators.GetSpectator(i).CruisKidmanCount);
         }
     }
 }
Пример #2
0
        /// <summary>
        /// Suranda kiek daugiausiai vienas ziurovas mate filmu kuriuose vaidino T. Cruise ir N.Kidman.
        /// </summary>
        /// <param name="Spectators"></param>
        /// <returns></returns>
        int CruisAndKidmanMax(SpectatorBranch Spectators)
        {
            int max = 0;

            for (int i = 0; i < Spectators.Count; i++)
            {
                if (Spectators.GetSpectator(i).CruisKidmanCount > max)
                {
                    max = Spectators.GetSpectator(i).CruisKidmanCount;
                }
            }
            return(max);
        }
Пример #3
0
        /// <summary>
        /// Suskaiciuoja kiek kuris ziurovas mate filmu kuriuose vaidina N.Kidman.
        /// </summary>
        /// <param name="Spectators"></param>
        void CruisAndKidmanCounter(ref SpectatorBranch Spectators)
        {
            Program p = new Program();

            for (int i = 0; i < Spectators.Count; i++)
            {
                for (int j = 0; j < Spectators.GetSpectator(i).Films.Count; j++)
                {
                    if (p.CruisAndKidmanIsOrNo(Spectators.GetSpectator(i).Films.GetFilm(j)) == true)
                    {
                        Spectators.GetSpectator(i).CruisKidmanCount++;
                    }
                }
            }
        }
Пример #4
0
        /// <summary>
        /// Sukuriamas visu filmu konteineris
        /// </summary>
        /// <param name="Spectators"></param>
        /// <returns></returns>
        FilmContainer AllFilmContainerCreate(SpectatorBranch Spectators)
        {
            Program       p        = new Program();
            FilmContainer AllFilms = new FilmContainer();

            for (int i = 0; i < Spectators.Count; i++)
            {
                for (int j = 0; j < Spectators.GetSpectator(i).Films.Count; j++)
                {
                    if (p.FilmCheck(AllFilms, Spectators.GetSpectator(i).Films.GetFilm(j)))
                    {
                        AllFilms.AddFilm(Spectators.GetSpectator(i).Films.GetFilm(j));
                    }
                }
            }
            return(AllFilms);
        }
Пример #5
0
        /// <summary>
        /// Surandamas nematytu filmu sarasas, kuris iskart siunciamas atspausdinti
        /// </summary>
        /// <param name="Spectators"></param>
        /// <param name="AllFilms"></param>
        void Recomendations(SpectatorBranch Spectators, FilmContainer AllFilms)
        {
            Program p = new Program();

            for (int i = 0; i < Spectators.Count; i++)
            {
                FilmContainer UnseenedFilms        = new FilmContainer();
                string[]      unseendedFilmsString = new string[50];
                for (int j = 0; j < AllFilms.Count; j++)
                {
                    if (p.FilmCheck(Spectators.GetSpectator(i).Films, AllFilms.GetFilm(j)))
                    {
                        unseendedFilmsString[UnseenedFilms.Count] = string.Format(AllFilms.GetFilm(j).ToString());
                        UnseenedFilms.AddFilm(AllFilms.GetFilm(j));
                    }
                }
                p.RecomendationPrint(unseendedFilmsString, Spectators.GetSpectator(i).Name);
            }
        }
Пример #6
0
        /// <summary>
        /// Sukuria WarnerBros sukurtu filmu konteineri
        /// </summary>
        /// <param name="Spectators"></param>
        /// <returns></returns>
        FilmContainer WarnerBrosContainerCreate(SpectatorBranch Spectators)
        {
            string        studio = "Warner Bros";
            Program       p      = new Program();
            FilmContainer WarnerBrosContainer = new FilmContainer();

            for (int i = 0; i < Spectators.Count; i++)
            {
                for (int j = 0; j < Spectators.GetSpectator(i).Films.Count; j++)
                {
                    if (Spectators.GetSpectator(i).Films.GetFilm(j).Studio == studio)
                    {
                        if (p.FilmCheck(WarnerBrosContainer, Spectators.GetSpectator(i).Films.GetFilm(j)))
                        {
                            WarnerBrosContainer.AddFilm(Spectators.GetSpectator(i).Films.GetFilm(j));
                        }
                    }
                }
            }
            return(WarnerBrosContainer);
        }