Ejemplo n.º 1
0
        private void ctrlMovieDetails_Load(object sender, EventArgs e)
        {
            if (panelTorrents.Controls.Count == 0)
            {
                panelTorrents.Visible = false; panelTitleTorrents.Visible = false;
            }
            if (infoTrailerUrl == "")
            {
                btnWatchTrailer.Visible = false;
            }
            if (infoImagePoster == "")
            {
                imgPoster.Image = UtilityTools.ChangeOpacity(Properties.Resources.poster_default, 1);
            }
            if (infoFanartUrl == "")
            {
                BackgroundImage = UtilityTools.ChangeOpacity(Properties.Resources.background_original, 0.5F);
            }
            panelTitleFiles.Size    = new Size(panelDetails.Size.Width, panelTitleFiles.Size.Height);
            panelTitleTorrents.Size = new Size(panelDetails.Size.Width, panelTitleTorrents.Size.Height);
            panelFiles.Size         = new Size(panelDetails.Size.Width, panelFiles.Size.Height);

            foreach (Control ctrl in panelFiles.Controls)
            {
                ctrl.Size = new Size(panelDetails.Size.Width - 3, ctrl.Size.Height);
            }

            panelTorrents.Size = new Size(panelDetails.Size.Width, panelTorrents.Size.Height);

            foreach (Control ctrl in panelTorrents.Controls)
            {
                ctrl.Size = new Size(panelDetails.Size.Width - 3, ctrl.Size.Height);
            }
        }
Ejemplo n.º 2
0
        private void frmOpenTheatre_Load(object sender, EventArgs e)
        {
            loadSettings();

            currentTab = tabMovies;

            Directory.CreateDirectory(pathRoot);
            Directory.CreateDirectory(pathData);

            tabAbout.BackgroundImage       = UtilityTools.ChangeOpacity(Properties.Resources.background_original, 0.5F);
            tabSettings.BackgroundImage    = UtilityTools.ChangeOpacity(Properties.Resources.background_original, 0.5F);
            tabFilesSearch.BackgroundImage = UtilityTools.ChangeOpacity(Properties.Resources.background_original, 0.5F);

            lblAboutVersion.Text = "v" + Application.ProductVersion;

            if (UtilityTools.checkForInternetConnection() == true)
            {
                UtilityTools.checkForUpdate();

                worker                     = new BackgroundWorker();
                worker.DoWork             += worker_DoWork;
                worker.RunWorkerCompleted += worker_RunWorkerCompleted;
                worker.RunWorkerAsync();
            }
            else
            {
                showStatusTab(rm.GetString("errorNoInternetConnection"));
            }
        }
Ejemplo n.º 3
0
        public void showFileDetails(string Url, string Name, string Type, string Host, string DateAdded, string Size, bool isLocal, string fileSize = "", string fileDateAdded = "")
        {
            imgSpinner.Visible = true;

            ctrlFileDetails fileDetails = new ctrlFileDetails();

            fileDetails.infoFileName.Text = Name;
            fileDetails.infoName.Text     = Name;
            fileDetails.infoSize.Text     = Size;
            fileDetails.infoReferrer.Text = Host;
            var url         = new Uri(Url);
            var directories = new StringBuilder(Host);

            foreach (string path in url.LocalPath.Split('/'))
            {
                if (!Path.HasExtension(path))
                {
                    directories.Append(path + "> ");
                }
                ;
            }
            fileDetails.infoDirectory.Text = directories.ToString();
            fileDetails.infoType.Text      = Type;
            fileDetails.infoDateAdded.Text = DateAdded;
            fileDetails.infoFileURL.Text   = Url;
            fileDetails.Dock            = DockStyle.Fill;
            fileDetails.BackgroundImage = UtilityTools.ChangeOpacity(Properties.Resources.background_original, 0.5F);
            tabBlank.Controls.Clear();
            tabBlank.Controls.Add(fileDetails);
            imgSpinner.Visible = false;
            tab.SelectedTab    = tabBlank;
        }
Ejemplo n.º 4
0
        //

        // 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;
        }
Ejemplo n.º 5
0
        private void InfoPoster_ClickButtonArea(object Sender, MouseEventArgs e)
        {
            frmOpenTheatre.form.tabBlank.Controls.Clear();

            ctrlDetails MovieDetails = new ctrlDetails();

            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 (infoMovieTorrent480p != null && infoMovieTorrent480p != "")
            {
                MovieDetails.addStream(infoMovieTorrent480p, false, true, MovieDetails.panelTorrents, "480p");
            }

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

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

            MovieDetails.Dock = DockStyle.Fill;
            frmOpenTheatre.form.tabBlank.Controls.Clear();
            frmOpenTheatre.form.tabBlank.Controls.Add(MovieDetails);
            frmOpenTheatre.form.tab.SelectedTab = frmOpenTheatre.form.tabBlank;
        }
Ejemplo n.º 6
0
 private void InfoPoster_MouseLeave(object sender, EventArgs e)
 {
     try
     {
         infoPoster.BackgroundImage.Dispose();
         infoPoster.BorderShow      = false;
         infoPoster.BackgroundImage = UtilityTools.ChangeOpacity(infoPoster2.Image, 1);
     }
     catch
     {
         infoPoster.BackgroundImage = UtilityTools.ChangeOpacity(Properties.Resources.poster_default, 1);
     }
 }
Ejemplo n.º 7
0
        private void InfoPoster_ClickButtonArea(object Sender, MouseEventArgs e)
        {
            try
            {
                frmOpenTheatre.form.tabBlank.Controls.Clear();

                ctrlDetails MovieDetails = new ctrlDetails();

                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;

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

                if (infoImagePoster == "")
                {
                    MovieDetails.imgPoster.Image = UtilityTools.ChangeOpacity(Properties.Resources.poster_default, 1);
                }
                if (infoImageFanart == "")
                {
                    MovieDetails.BackgroundImage = UtilityTools.ChangeOpacity(Properties.Resources.background_original, 0.5F);
                }

                foreach (string movieLink in infoMovieLinks)
                {
                    ctrlStreamInfo ctrlInfo = new ctrlStreamInfo();
                    ctrlInfo.infoFileURL       = new Uri(movieLink).AbsoluteUri;
                    ctrlInfo.infoFileHost.Text = new Uri(movieLink).Host.Replace("www.", "");
                    ctrlInfo.infoFileName.Text = Path.GetFileNameWithoutExtension(new Uri(movieLink).LocalPath);
                    MovieDetails.panelStreams.Controls.Add(ctrlInfo);
                }

                MovieDetails.Dock = DockStyle.Fill;
                frmOpenTheatre.form.tabBlank.Controls.Clear();
                frmOpenTheatre.form.tabBlank.Controls.Add(MovieDetails);
                frmOpenTheatre.form.tab.SelectedTab = frmOpenTheatre.form.tabBlank;
            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }
Ejemplo n.º 8
0
        public void showStatusTab(string errorText)
        {
            // throws error with  control on Movies tab (WIP)
            imgSpinner.Visible = false;
            ctrlStatus a = new ctrlStatus();

            a.BackColor        = tabMovies.BackColor;
            a.BackgroundImage  = UtilityTools.ChangeOpacity(Properties.Resources.background_original, 0.5F);
            a.titleStatus.Text = errorText;
            a.Dock             = DockStyle.Fill;
            a.Show();
            tabMovies.Controls.Clear();
            tabMovies.Padding = new Padding(0, 0, 0, 0);
            tabMovies.Controls.Add(a);
            Controls.Remove(frmSplash);
        }
Ejemplo n.º 9
0
        private void InfoPoster_MouseEnter(object sender, EventArgs e)
        {
            try
            {
                if (!(infoPoster2.Image == null))
                {
                    infoPoster2.Image.Dispose();
                }

                infoPoster2.Image     = new Bitmap(infoPoster.BackgroundImage);
                infoPoster.BorderShow = true;
                infoPoster.BackgroundImage.Dispose();
                infoPoster.BackgroundImage = UtilityTools.ChangeOpacity(infoPoster2.Image, 0.4F);
                Update();
            }
            catch
            {
                infoPoster.BackgroundImage = UtilityTools.ChangeOpacity(Properties.Resources.poster_default, 0.4F);
            }
        }
Ejemplo n.º 10
0
        private void InfoPoster_ClickButtonArea(object Sender, MouseEventArgs e)
        {
            frmOpenTheatre.form.tabBlank.Controls.Clear();

            ctrlDetails MovieDetails = new ctrlDetails();

            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;


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

            if (infoImagePoster == "")
            {
                MovieDetails.imgPoster.Image = UtilityTools.ChangeOpacity(Properties.Resources.poster_default, 1);
            }
            if (infoImageFanart == "")
            {
                MovieDetails.BackgroundImage = UtilityTools.ChangeOpacity(Properties.Resources.background_original, 0.5F);
            }
            if (infoTrailer == "")
            {
                MovieDetails.btnWatchTrailer.Visible = false;
            }

            foreach (string movieLink in infoMovieFiles)
            {
                ctrlStreamInfo ctrlInfo = new ctrlStreamInfo();
                ctrlInfo.infoFileURL       = new Uri(movieLink).AbsoluteUri;
                ctrlInfo.infoFileHost.Text = new Uri(movieLink).Host.Replace("www.", "");
                ctrlInfo.infoFileName.Text = Path.GetFileNameWithoutExtension(new Uri(movieLink).LocalPath);
                MovieDetails.panelFiles.Controls.Add(ctrlInfo);
            }


            //  Magnet : magnet:?xt=urn:btih:TORRENT_HASH&dn=Url+Encoded+Movie+Name&tr=http://track.one:1234/announce&tr=udp://track.two:80
            string trackers = "&tr=" + "udp://open.demonii.com:1337/announce" + " &tr=" + "udp://tracker.openbittorrent.com:80" + "&tr=" + "udp://tracker.coppersurfer.tk:6969" + "&tr=" + "udp://glotorrents.pw:6969/announce" + "&tr=" + "udp://tracker.opentrackr.org:1337/announce" + "&tr=" + "udp://torrent.gresille.org:80/announce" + "&tr=" + "udp://p4p.arenabg.com:1337" + "&tr=" + "udp://tracker.leechers-paradise.org:6969";

            if (infoMovieTorrent480p == "" && infoMovieTorrent720p == "" && infoMovieTorrent1080p == "")
            {
                MovieDetails.panelTitleTorrents.Visible = false;
                MovieDetails.panelTorrents.Visible      = false;
            }
            else
            {
                if (infoMovieTorrent480p != "")
                {
                    ctrlStreamInfo ctrlInfo = new ctrlStreamInfo();
                    ctrlInfo.isTorrent         = true;
                    ctrlInfo.infoFileURL       = new Uri(infoMovieTorrent480p).AbsoluteUri;
                    ctrlInfo.infoFileHost.Text = new Uri(infoMovieTorrent480p).Host.Replace("www.", "");
                    ctrlInfo.infoFileName.Text = infoTitle.Text + " (" + infoYear.Text + ") [" + "480p" + "] [" + "YTS.AG" + "]";
                    ctrlInfo.infoMagnet        = "magnet:?xt=urn:btih:" + Path.GetFileName(infoMovieTorrent1080p) + "&dn=" + infoTitle.Text.Replace(" ", "+") + "%28" + infoYear.Text + "%29+%5B" + "720p" + "%5D+%5B" + "YTS.AG" + "%5D" + trackers;
                    MovieDetails.panelTorrents.Controls.Add(ctrlInfo);
                }

                if (infoMovieTorrent720p != "")
                {
                    ctrlStreamInfo ctrlInfo = new ctrlStreamInfo();
                    ctrlInfo.isTorrent         = true;
                    ctrlInfo.infoFileURL       = new Uri(infoMovieTorrent720p).AbsoluteUri;
                    ctrlInfo.infoFileHost.Text = new Uri(infoMovieTorrent720p).Host.Replace("www.", "");
                    ctrlInfo.infoFileName.Text = infoTitle.Text + " (" + infoYear.Text + ") [" + "720p" + "] [" + "YTS.AG" + "]";
                    ctrlInfo.infoMagnet        = "magnet:?xt=urn:btih:" + Path.GetFileName(infoMovieTorrent1080p) + "&dn=" + infoTitle.Text.Replace(" ", "+") + "%28" + infoYear.Text + "%29+%5B" + "720p" + "%5D+%5B" + "YTS.AG" + "%5D" + trackers;
                    MovieDetails.panelTorrents.Controls.Add(ctrlInfo);
                }

                if (infoMovieTorrent1080p != "")
                {
                    ctrlStreamInfo ctrlInfo = new ctrlStreamInfo();
                    ctrlInfo.isTorrent         = true;
                    ctrlInfo.infoFileURL       = new Uri(infoMovieTorrent1080p).AbsoluteUri;
                    ctrlInfo.infoFileHost.Text = new Uri(infoMovieTorrent1080p).Host.Replace("www.", "");
                    ctrlInfo.infoFileName.Text = infoTitle.Text + " (" + infoYear.Text + ") [" + "1080p" + "] [" + "YTS.AG" + "]";
                    ctrlInfo.infoMagnet        = "magnet:?xt=urn:btih:" + Path.GetFileName(infoMovieTorrent1080p) + "&dn=" + infoTitle.Text.Replace(" ", "+") + "%28" + infoYear.Text + "%29+%5B" + "720p" + "%5D+%5B" + "YTS.AG" + "%5D" + trackers;
                    MovieDetails.panelTorrents.Controls.Add(ctrlInfo);
                }
            }


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