Exemplo n.º 1
0
        public Form3(MovieIfo movie)
        {
            InitializeComponent();

            if (movie.IconLink == "")
            {
                MessageBox.Show("NMSL");
                this.Close();
            }
            pictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
            http = movie.IconLink;
            FinishGetPictureStream = false;
            Task.Run(() => GetPictureStream());
            Thread t = new Thread(CheckPictureStream);

            t.Start();
        }
Exemplo n.º 2
0
        public void output_Key_Movie(MovieIfo ifo, int id)
        {
            if (this.panel2.InvokeRequired)
            {
                panel2.BeginInvoke(new Action(() =>
                {
                    GroupBox groupBox = new GroupBox();
                    {
                        groupBox.Location = new Point(5, 50 + 160 * i++);
                        groupBox.Size     = new Size(750, 150);
                        groupBox.Text     = "电影名称:" + ifo.Name;
                        groupBox.Tag      = id;
                        groupBox.Click   += new EventHandler(groupBox_Click);
                    }
                    panel2.Controls.Add(groupBox);
                    //groupBoxes.Add(groupBox);

                    PictureBox pictureBox = new PictureBox();
                    pictureBox.Location   = new Point(10, 20);
                    pictureBox.Size       = new Size(100, 150);
                    ///////////////显示图片

                    //Label
                    string[] str1 = { "导演:", "主演:", "标签:", "日期:", "片长:" };
                    string[] str2 = { ifo.Director, ifo.Actors, ifo.Tag, ifo.Date, ifo.Time };
                    for (int j = 0; j < 5; j++)
                    {
                        Label label = new Label();
                        {
                            label.Location = new Point(120, 25 + 20 * j); //设置位置
                            label.Size     = new Size(200, 15);           //设置大小
                            label.Text     = str1[j] + str2[j];
                        }
                        groupBox.Controls.Add(label);//在当前窗体上添加这个label控件
                    }

                    /*
                     * Label label1 = new Label();
                     * {
                     *  label1.Location = new Point(300, 25);
                     *  label1.Size = new Size(300, 120);
                     *  label1.AutoSize = false;
                     *  label1.Text = "内容简介:" + ifo.Introduction;
                     * }
                     * groupBox.Controls.Add(label1);//在当前窗体上添加这个label控件
                     */
                }));
            }
            else
            {
                GroupBox groupBox = new GroupBox();
                {
                    groupBox.Location = new Point(5, 50 + 160 * i++);
                    groupBox.Size     = new Size(750, 150);
                    groupBox.Text     = "电影名称:" + ifo.Name;
                    groupBox.Tag      = id;
                    groupBox.Click   += new EventHandler(groupBox_Click);
                }
                panel2.Controls.Add(groupBox);
                //groupBoxes.Add(groupBox);

                PictureBox pictureBox = new PictureBox();
                pictureBox.Location = new Point(10, 20);
                pictureBox.Size     = new Size(100, 150);
                ///////////////显示图片

                //Label
                string[] str1 = { "导演:", "主演:", "标签:", "日期:", "片长:" };
                string[] str2 = { ifo.Director, ifo.Actors, ifo.Tag, ifo.Date, ifo.Time };
                for (int j = 0; j < 5; j++)
                {
                    Label label = new Label();
                    {
                        label.Location = new Point(120, 25 + 20 * j); //设置位置
                        label.Size     = new Size(200, 15);           //设置大小
                        label.Text     = str1[j] + str2[j];
                    }
                    groupBox.Controls.Add(label);//在当前窗体上添加这个label控件
                }

                /*Label label1 = new Label();
                 * {
                 *  label1.Location = new Point(300, 25);
                 *  label1.Size = new Size(300, 120);
                 *  label1.AutoSize = false;
                 *  label1.Text = "内容简介:" + ifo.Introduction;
                 * }
                 * groupBox.Controls.Add(label1);//在当前窗体上添加这个label控件
                 */
            }
        }