Пример #1
0
        /// <summary>
        /// Load using Preview information..
        /// </summary>
        /// <param name="selectedMovieInfo"></param>
        public void LoadMovieInfo(ref TmdbWrapper.Movies.Movie selectedMovieInfo)
        {
            lblTitle.Text = selectedMovieInfo.Title;
            if (selectedMovieInfo.ReleaseDate.HasValue)
            {
                lblReleaseDate.Text  = selectedMovieInfo.ReleaseDate.Value.ToShortDateString();
                lblReleaseDate.Text += AgeHelper.GetReleaseDateDelta(selectedMovieInfo.ReleaseDate.Value);
            }
            else
            {
                lblReleaseDate.Text = "TBD";
            }
            lblRunTime.Text = selectedMovieInfo.Runtime.ToString() + " minutes";
            lblRevenue.Text = selectedMovieInfo.Revenue.ToString("C0"); // Currency no cents.
            if (selectedMovieInfo.Homepage != null)
            {
                pbPoster.Tag = selectedMovieInfo.Homepage.AbsoluteUri;
            }
            else
            {
                pbPoster.Tag = null;
            }
            GetMoviePoster(ref selectedMovieInfo);
            //TmdbWrapper.Movies.ProductionCompany
            IReadOnlyList <TmdbWrapper.Movies.ProductionCompany> prodCos = selectedMovieInfo.ProductionCompanies;

            GetProductionCompanyLogos(prodCos);
        }
Пример #2
0
        /// <summary>
        /// Universe Reference should only be used for Movies in the my Universe.
        /// </summary>
        /// <param name="movie"></param>
        /// <param name="univ"></param>
        public void LoadMovieInfo(ref Movie movie, ref Universe univ)
        {
            selectedMovie = movie;
            u             = univ;
            lblTitle.Text = movie.Title;
            if (movie.ReleaseDate.HasValue)
            {
                lblReleaseDate.Text  = movie.ReleaseDate.Value.ToShortDateString();
                lblReleaseDate.Text += AgeHelper.GetReleaseDateDelta(movie.ReleaseDate.Value);
            }
            else
            {
                lblReleaseDate.Text = "TBD";
            }

            lblRunTime.Text = movie.Runtime.ToString() + " minutes";
            lblRevenue.Text = movie.Revenue.ToString("C0"); // Currency no cents.
            //if (movie.HomePage != null)
            //{
            //    pbPoster.Tag = movie.HomePage.AbsoluteUri;
            //}
            //else
            //{
            //    pbPoster.Tag = null;
            //}
            if (movie.TrailerLink != null)
            {
                pbPoster.Tag = movie.TrailerLink;
            }
            else
            {
                pbPoster.Tag = null;
            }
            GetMoviePoster();
            GetProductionCompanyLogos();
        }