Beispiel #1
0
        public void LoadHighestRatedList()
        {
            HighestRated highestRated = new HighestRated();

            highestRated.HighestRatedMethod();

            string picturePath = Path.GetFullPath("Pictures/" + "Pictures/" + highestRated.Top20MovieID[HighestRatedCounter] + ".jpg");

            pictureBox1.Image = Image.FromFile(picturePath);
            label1.Text       = HighestRatedCounter + 1 + ". " + highestRated.Top20MovieName[HighestRatedCounter];
            label6.Text       = "Rating: " + highestRated.Top20MovieRating[HighestRatedCounter];

            picturePath       = Path.GetFullPath("Pictures/" + "Pictures/" + highestRated.Top20MovieID[HighestRatedCounter + 1] + ".jpg");
            pictureBox2.Image = Image.FromFile(picturePath);
            label2.Text       = HighestRatedCounter + 2 + ". " + highestRated.Top20MovieName[HighestRatedCounter + 1];
            label7.Text       = "Rating: " + highestRated.Top20MovieRating[HighestRatedCounter + 1];

            picturePath       = Path.GetFullPath("Pictures/" + "Pictures/" + highestRated.Top20MovieID[HighestRatedCounter + 2] + ".jpg");
            pictureBox3.Image = Image.FromFile(picturePath);
            label3.Text       = HighestRatedCounter + 3 + ". " + highestRated.Top20MovieName[HighestRatedCounter + 2];
            label8.Text       = "Rating: " + highestRated.Top20MovieRating[HighestRatedCounter + 2];

            picturePath       = Path.GetFullPath("Pictures/" + "Pictures/" + highestRated.Top20MovieID[HighestRatedCounter + 3] + ".jpg");
            pictureBox4.Image = Image.FromFile(picturePath);
            label4.Text       = HighestRatedCounter + 4 + ". " + highestRated.Top20MovieName[HighestRatedCounter + 3];
            label9.Text       = "Rating: " + highestRated.Top20MovieRating[HighestRatedCounter + 3];

            picturePath       = Path.GetFullPath("Pictures/" + "Pictures/" + highestRated.Top20MovieID[HighestRatedCounter + 4] + ".jpg");
            pictureBox5.Image = Image.FromFile(picturePath);
            label5.Text       = HighestRatedCounter + 5 + ". " + highestRated.Top20MovieName[HighestRatedCounter + 4];
            label10.Text      = "Rating: " + highestRated.Top20MovieRating[HighestRatedCounter + 4];
        }
        public void ChoseFunction()
        {
            Console.WriteLine("Welcome to our Movie Recommender software.");
            Console.WriteLine("Press 1 to launch the function for generating textfiles with the different Genres in them");
            Console.WriteLine("Press 2 to launch the function for generating a textfile with the movieratings and sort them alphabetically");
            Console.WriteLine("Press 3 to access the user login system");
            Console.WriteLine("Press 4 to asdas");
            Console.WriteLine("Press 5 for picture download");
            Console.WriteLine("Press 6 for highest average rated");
            Console.WriteLine("Press 7 to run to GUI");

            string UserInput = Console.ReadLine();
            int    ChosenFunction;

            Int32.TryParse(UserInput, out ChosenFunction);

            switch (ChosenFunction)
            {
            case 1:
                CreateGenreTextFiles GenreFiles = new CreateGenreTextFiles();
                GenreFiles.CreateGenreTextFilesFunction();
                break;

            case 2:
                SortingMovieIdInRatingsFile sort = new SortingMovieIdInRatingsFile();
                sort.SortingMovieIdInRatingsFileFunction();
                break;

            case 3:
                Login mainlogin = new Login();
                Application.Run(mainlogin);
                break;

            case 4:
                GenreSortedByRatings genreSort = new GenreSortedByRatings();
                genreSort.GenreSortedByRatingsMethod();
                break;

            /*case 5:
             *  GetPictures pictures = new GetPictures();
             *  pictures.GetPicturesVoid();
             *  break;*/

            case 6:
                HighestRated highrated = new HighestRated();
                highrated.HighestRatedMethod();
                break;

            case 7:
                GUI openGUI = new GUI();
                Application.Run(openGUI);
                break;

            default:
                Console.WriteLine("No function was chosen. Press Enter to chose again");
                Console.ReadLine();
                ChoseFunction();
                break;
            }
        }