Exemplo n.º 1
0
 public ActorDataSheet(string title, string id)
 {
     InitializeComponent();
     this.id   = id;
     this.Text = title;
     searchDetails(id);
     StartPosition     = FormStartPosition.CenterScreen;
     pictureBox1.Image = LoadDefaultPicture.getDefaultPicture();
 }
Exemplo n.º 2
0
        private Boolean setFields()
        {
            Boolean check;

            if (string.IsNullOrEmpty(title))
            {
                MessageBox.Show("Please select a movie first");
                check = false;
            }
            else
            {
                textBox1.Text           = title;
                textBox1.SelectionStart = 0;
                textBox1.ReadOnly       = true;
                textBox2.Text           = year;
                textBox2.ReadOnly       = true;
                textBox3.Text           = runTime;
                textBox3.ReadOnly       = true;

                textBox7.ReadOnly = true;
                textBox4.Text     = collection;
                textBox4.ReadOnly = true;
                textBox5.Text     = getCastStr();
                textBox5.ReadOnly = true;
                textBox6.Text     = overview;
                textBox6.ReadOnly = true;
                try
                {
                    textBox7.Text = homePage.Length <= 0 ? "N/A" : homePage;
                }
                catch (Exception) { }
                // pictureBox1.ImageLocation = imgPath;
                if (string.IsNullOrEmpty(imgPath))
                {
                    pictureBox1.Image = LoadDefaultPicture.getDefaultPicture();
                }
                else if (imgPath.Length <= 30)
                {
                    pictureBox1.Image = LoadDefaultPicture.getDefaultPicture();
                }
                else
                {
                    pictureBox1.ImageLocation = imgPath;
                }

                pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
                check = true;
            }
            return(check);
        }
Exemplo n.º 3
0
        private void SetImage(string i)
        {
            try
            {
                if (i.Length <= 30)
                {
                    Console.WriteLine("No image " + i.Length);

                    pictureBox1.Image = LoadDefaultPicture.getDefaultPicture();
                }
                else
                {
                    pictureBox1.ImageLocation = i;
                }

                pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
            }
            catch (Exception) { }
        }