示例#1
0
        private void getRecentBangumi()
        {
            string firstBangumiID = userInfo.RecentBangumi()[0];

            getFirstBangumi = new getBiliBangumi(uint.Parse(firstBangumiID));

            this.bangumiName.Text             = getFirstBangumi.data()["Name"];
            this.bangumiPicture.ImageLocation = getFirstBangumi.data()["Picture"];
            if (getFirstBangumi.data()["IsFinish"] == "0")    //0: not finished.
            {
                this.iconIsFinished.Visible = false;
            }
            this.bangumiDetail.Text = "(共 " + getFirstBangumi.data()["Count"] + " 集)";
        }
示例#2
0
        public bangumiForm(uint bangumiID)
        {
            InitializeComponent();

            this.bangumiInfo = new getBiliBangumi(bangumiID);

            initBangumiData();  //Get the bangumi data from bilibili
            initEpisodes();
            this.Text = bangumiInfo.data()["Name"];

            opHunter = new MusicHunter(bangumiInfo.data()["Name"]);

            this.tabControl.SelectedIndexChanged += new EventHandler(this.tabControlChanged);
        }
示例#3
0
        private void initEpisodes()
        {
            int count = int.Parse(bangumiInfo.data()["Count"]);
            int row   = 0;

            for (int i = 0; i < count; i++)
            {
                if (i % 4 == 0 && i != 0)
                {
                    row++;
                }

                Label      eBlankGround = new Label();
                PictureBox ePicture     = new PictureBox();
                SkinLabel  eCountNumber = new SkinLabel();
                SkinLabel  eName        = new SkinLabel();

                eBlankGround.Location = new Point(0 + i % 4 * 230, 5 + row * 80);
                eBlankGround.Size     = new Size(210, 60);
                //eBlankGround.Text = (count -1 - i).ToString();

                ePicture.Location      = new Point(0 + i % 4 * 230, 5 + row * 80);
                ePicture.Size          = new Size(96, 60);
                ePicture.ImageLocation = (string)bangumiInfo.episodes()[count - 1 - i]["cover"];
                ePicture.SizeMode      = PictureBoxSizeMode.StretchImage;
                ePicture.InitialImage  = Properties.Resources.loading;

                eName.ArtTextStyle = ArtTextStyle.None;
                eName.Location     = new Point(105 + i % 4 * 230, 28 + row * 80);
                eName.Size         = new Size(110, 35);
                eName.Text         = (string)bangumiInfo.episodes()[count - 1 - i]["index_title"];
                eName.Font         = new Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));

                eCountNumber.ArtTextStyle = ArtTextStyle.None;
                eCountNumber.Location     = new Point(105 + i % 4 * 230, 5 + row * 80);
                eCountNumber.Size         = new Size(100, 25);
                eCountNumber.Text         = "第 " + (i + 1).ToString() + " 集";
                eCountNumber.Font         = new Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));

                this.pageVideo.Controls.Add(eName);
                this.pageVideo.Controls.Add(eCountNumber);
                this.pageVideo.Controls.Add(ePicture);
                this.pageVideo.Controls.Add(eBlankGround);

                eBlankGround.Click += new EventHandler(toWebBangumi_Click);
            }
        }
示例#4
0
        private void bangumiPicture_Click(object sender, EventArgs e)
        {
            bangumiForm recentBangumiForm = new bangumiForm(uint.Parse(getFirstBangumi.data()["ID"]));

            recentBangumiForm.Show();
        }