Example #1
0
        private void Update_Movie_Details(MovieClass Movie)
        {
            try
            {
                Size tempSize = new Size(252, 20);

                Update_Stars_Movie_Details();

                MoviePoster.ImageLocation = "images\\" + Movie.Index.ToString() + ".jpg";
                MovieName.Text = Movie.Movie_Name;

                try
                {
                    tempSize.Width = (int)(252 * float.Parse(Movie.Get_Mark()) / 10);
                    TopPicture.Size = tempSize;
                    TopPicture.Visible = true;
                    pictureBox2.Visible = true;
                }
                catch
                {
                    TopPicture.Visible = false;
                    pictureBox2.Visible = false;
                }

                try
                {
                    tempSize.Width = (int)(252 * float.Parse(Movie.Get_IMDB_Mark()) / 10);
                    TopPictureMark.Size = tempSize;
                    TopPictureMark.Visible = true;
                    pictureBox1.Visible = true;
                }
                catch
                {
                    TopPictureMark.Visible = false;
                    pictureBox1.Visible = false;
                }

                MarkName.Text = Movie.Get_Mark();
                if (Movie.Get_IMDB_Name() != null)
                    IMDBName.Text = "( " + Movie.Get_IMDB_Name() + " )";
                else
                    IMDBName.Text = "( " + Movie.Movie_Name + " ) - no Update";
                MovieNam.Text = Movie.Movie_Name;
                if (Movie.Get_IMDB_Mark() == null)
                    IMDBMarkDate.Text = "Unknown";
                else
                    IMDBMarkDate.Text = Movie.Get_IMDB_Mark();
                if ((Movie.Get_Date_Day() != 0 || Movie.Get_Date_Month() != 0 || Movie.Get_Date_Year() != 0) && Movie.Get_Date_Year() != -1)
                    DateDate.Text = Movie.Get_Date_Month().ToString() + "/" + Movie.Get_Date_Day().ToString() + "/" + Movie.Get_Date_Year().ToString();
                else if (Movie.Get_Date_Year() == -1)
                    DateDate.Text = "Not viewed yet";
                else
                    DateDate.Text = "Unknown";
                ReviewRichTextBox.Text = Movie.Get_Review().Replace(@"\n", Environment.NewLine);
                DirectorDate.Text = Movie.Director;
                DescriptionTextBox.Text = Movie.Storyline;

                try
                {
                    tempSize = new Size(61, 20);
                    YearDate.Size = tempSize;
                    YearDate.Text = int.Parse(Movie.Get_Year()).ToString();
                }
                catch
                {
                    tempSize = new Size(100, 20);
                    YearDate.Size = tempSize;
                    YearDate.Text = Movie.Get_Year();
                }

                List<string> Aux = new List<string>();

                ComboGenreDate.Items.Clear();
                ComboGenreDate.Text = Movie.Get_Genre(0);
                Aux = Movie.Get_Genre();
                foreach(string genre in Aux)
                    ComboGenreDate.Items.Add(genre);

                RuntimeDate.Text = Movie.Runtime;
                MPAAtext.Text = Movie.MPAA_Rating;

                CountryDate.Items.Clear();
                CountryDate.Text = Movie.Get_Country(0);
                Aux = Movie.Get_Country();
                foreach(string country in Aux)
                    CountryDate.Items.Add(country);

                LanguageDate.Items.Clear();
                LanguageDate.Text = Movie.Get_Language(0);
                Aux = Movie.Get_Language();
                foreach(string language in Aux)
                    LanguageDate.Items.Add(language);

                toolTip1.SetToolTip(DirectorWebLink, "Visit " + Movie.Director + "'s page");

                Tags.Items.Clear();
                if (Movie.Get_Tags().Count > 0)
                {
                    Tags.Text = Movie.Get_Tag(0);
                    foreach (string tag in Movie.Get_Tags())
                        Tags.Items.Add(tag);
                }
                else
                    Tags.Text = "Unknown";

                PrizesBox.Text = Movie.Prize;
                toolTip2.SetToolTip(OscarButton, "Visit " + Movie.Movie_Name + "'s Gallery of Trophies");
            }
            catch
            {
            }
        }