//

        // Random Movie Button (I'm Feeling Lucky)
        private void btnMoviesRandom_ClickButtonArea(object Sender, MouseEventArgs e)
        {
            imgSpinner.Visible = true;

            Thread.Sleep(100);

            var data = OMDbEntity.FromJson(UtilityTools.Random(dataMovies));

            ctrlMovieDetails MovieDetails = new ctrlMovieDetails();

            MovieDetails.infoTitle.Text      = data.Title;
            MovieDetails.infoYear.Text       = data.Year;
            MovieDetails.infoGenre.Text      = data.Genre;
            MovieDetails.infoSynopsis.Text   = data.Plot;
            MovieDetails.infoRuntime.Text    = data.Runtime;
            MovieDetails.infoRated.Text      = data.Rated;
            MovieDetails.infoDirector.Text   = data.Director;
            MovieDetails.infoCast.Text       = data.Actors;
            MovieDetails.infoRatingIMDb.Text = data.ImdbRating;
            MovieDetails.infoImdbId          = data.ImdbID;
            MovieDetails.infoImagePoster     = data.Poster;
            MovieDetails.infoFanartUrl       = data.imageFanart;
            MovieDetails.infoTrailerUrl      = data.trailerUrl;

            try
            {
                MovieDetails.imgPoster.Image = UtilityTools.ChangeOpacity(UtilityTools.LoadPicture(data.Poster), 1);
                MovieDetails.BackgroundImage = UtilityTools.ChangeOpacity(UtilityTools.LoadPicture(data.imageFanart), 0.2F);
            }
            catch { }

            foreach (string movieLink in data.Sources)
            {
                MovieDetails.addStream(movieLink, false, false, MovieDetails.panelFiles);
            }

            if (data.YifyTorrent480p != null && data.YifyTorrent480p != "")
            {
                MovieDetails.addStream(data.YifyTorrent480p, false, true, MovieDetails.panelTorrents, "480p");
            }

            if (data.YifyTorrent720p != null && data.YifyTorrent720p != "")
            {
                MovieDetails.addStream(data.YifyTorrent720p, false, true, MovieDetails.panelTorrents, "720p");
            }

            if (data.YifyTorrent1080p != null && data.YifyTorrent1080p != "")
            {
                MovieDetails.addStream(data.YifyTorrent1080p, false, true, MovieDetails.panelTorrents, "1080p");
            }


            MovieDetails.Dock = DockStyle.Fill;
            tabBlank.Controls.Clear();
            tabBlank.Controls.Add(MovieDetails);
            imgSpinner.Visible = false;
            tab.SelectedTab    = tabBlank;
        }
Esempio n. 2
0
        private void InfoPoster_ClickButtonArea(object Sender, MouseEventArgs e)
        {
            frmOpenTheatre.form.tabBlank.Controls.Clear();

            ctrlMovieDetails MovieDetails = new ctrlMovieDetails();

            MovieDetails.infoTitle.Text      = infoTitle.Text;
            MovieDetails.infoYear.Text       = infoYear.Text;
            MovieDetails.infoGenre.Text      = infoGenres;
            MovieDetails.infoSynopsis.Text   = infoSynopsis;
            MovieDetails.infoRuntime.Text    = infoRuntime;
            MovieDetails.infoRated.Text      = infoRated;
            MovieDetails.infoDirector.Text   = infoDirector;
            MovieDetails.infoCast.Text       = infoCast;
            MovieDetails.infoRatingIMDb.Text = infoImdbRating;
            MovieDetails.infoImdbId          = infoImdbId;
            MovieDetails.infoTrailerUrl      = infoTrailer;
            MovieDetails.infoFanartUrl       = infoImageFanart;
            MovieDetails.infoImagePoster     = infoImagePoster;

            try
            {
                MovieDetails.imgPoster.Image = UtilityTools.ChangeOpacity(UtilityTools.LoadPicture(infoImagePoster), 1);
                MovieDetails.BackgroundImage = UtilityTools.ChangeOpacity(UtilityTools.LoadPicture(infoImageFanart), 0.2F);
            }
            catch { }

            foreach (string movieLink in infoMovieFiles)
            {
                MovieDetails.addStream(movieLink, false, false, MovieDetails.panelFiles);
            }

            if (infoYifyTorrent480p != null && infoYifyTorrent480p != "")
            {
                MovieDetails.addStream(infoYifyTorrent480p, false, true, MovieDetails.panelTorrents, "YIFY", "480p");
            }

            if (infoYifyTorrent720p != null && infoYifyTorrent720p != "")
            {
                MovieDetails.addStream(infoYifyTorrent720p, false, true, MovieDetails.panelTorrents, "YIFY", "720p");
            }

            if (infoYifyTorrent1080p != null && infoYifyTorrent1080p != "")
            {
                MovieDetails.addStream(infoYifyTorrent1080p, false, true, MovieDetails.panelTorrents, "YIFY", "1080p");
            }

            if (infoPopcornTorrent720p != null && infoPopcornTorrent720p != "")
            {
                MovieDetails.addStream(infoPopcornTorrent720p, false, true, MovieDetails.panelTorrents, "POPCORN", "720p");
            }

            if (infoPopcornTorrent1080p != null && infoPopcornTorrent1080p != "")
            {
                MovieDetails.addStream(infoPopcornTorrent1080p, false, true, MovieDetails.panelTorrents, "POPCORN", "1080p");
            }

            MovieDetails.Dock = DockStyle.Fill;
            frmOpenTheatre.form.tabBlank.Controls.Clear();
            frmOpenTheatre.form.tabBlank.Controls.Add(MovieDetails);
            frmOpenTheatre.form.tab.SelectedTab = frmOpenTheatre.form.tabBlank;
        }