public DisPlayCell(LiuXingType iType) { Size = new System.Drawing.Size(150, 210); BackColor = PublicStatic.FontColor[1]; if (iType.Data.IsEmpty()) return; Tag = iType.Data; // 影片海报 if (!iType.Img.IsEmpty()) { try { var imagepal = new EPicBox { Size = new System.Drawing.Size(150, 210), BackColor = PublicStatic.FontColor[1], Image = iType.Img, SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage }; Controls.Add(imagepal); // 影片标题 if (iType.Data.Name.IsNotNullOrEmpty()) { var tempname = iType.Data.Name; if (tempname.Contains("/")) { tempname = tempname.Split("/".ToCharArray())[0]; } new HDarge( imagepal, tempname, new System.Drawing.Font(PublicStatic.MainFont, 18F), new System.Drawing.Size(150, 36), new System.Drawing.Point(0, 210 - 36), System.Drawing.Color.FromArgb(220, 254, 254, 254), System.Drawing.Color.FromArgb(150, 0, 0, 0), BaseAlign.AlignBottomCenter, BaseAnchor.AnchorBottomFill ); } } catch { } } // 滚轮聚焦 if (string.IsNullOrEmpty(PublicStatic.SearchBox.Text)) { PublicStatic.LiuXingCon.Invoke( new System.Windows.Forms.MethodInvoker (() => PublicStatic.LiuXingCon.Focus())); } }
/// <summary> /// 逐个显示 /// </summary> /// <param name="tag"></param> /// <param name="img"></param> public static void DisPlayListItem(LiuXingData tag, System.Drawing.Image img) { if (tag == null) return; // 磁贴方块 var cellpal = new EPanel { Size = new System.Drawing.Size(406, 210), BackColor = System.Drawing.Color.White, Tag = tag }; PublicStatic.LiuXingCon.Controls.Add(cellpal); if (!string.IsNullOrEmpty(tag.Cos)) { new HDarge( cellpal, tag.Cos, new System.Drawing.Font(PublicStatic.MainFont, 12F), new System.Drawing.Size(40, 25), new System.Drawing.Point(-2, 44 + 24 + 45 + 25 + 20 - 135), System.Drawing.Color.FromArgb(248, 248, 248), System.Drawing.Color.FromArgb(0, 122, 204), System.Drawing.ContentAlignment.MiddleCenter, System.Windows.Forms.AnchorStyles.Top ); } // 方块内海报 if (img != null) { var cellimg = new EPicBox { Size = new System.Drawing.Size(150, 210), BackColor = System.Drawing.Color.White, Image = img, SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage }; cellpal.Controls.Add(cellimg); } // 方块内文字 var tempname = tag.Name; if (!string.IsNullOrEmpty(tempname)) { if (tempname.Contains("/")) { tempname = tempname.Split("/".ToCharArray())[0]; } new HDarge( cellpal, tempname, new System.Drawing.Font(PublicStatic.MainFont, 22F), new System.Drawing.Size(244, 42), new System.Drawing.Point(150, 10), System.Drawing.Color.FromArgb(0, 122, 204), System.Drawing.Color.Transparent, System.Drawing.ContentAlignment.BottomCenter, System.Windows.Forms.AnchorStyles.Top ); } new HDarge( cellpal, "", new System.Drawing.Font(PublicStatic.MainFont, 14F), new System.Drawing.Size(240, 1), new System.Drawing.Point(150 + 8, 48 + 10), System.Drawing.Color.Transparent, System.Drawing.Color.FromArgb(90, 122, 204), System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top ); new HDarge( cellpal, "主演:" + tag.Car, new System.Drawing.Font(PublicStatic.MainFont, 12F), new System.Drawing.Size(248, 45), new System.Drawing.Point(150 + 6, 44 + 24), System.Drawing.Color.FromArgb(60, 60, 60), System.Drawing.Color.Transparent, System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top ); new HDarge( cellpal, "年代:" + tag.Tim, new System.Drawing.Font(PublicStatic.MainFont, 12F), new System.Drawing.Size(120, 25), new System.Drawing.Point(150 + 6, 44 + 24 + 45), System.Drawing.Color.FromArgb(60, 60, 60), System.Drawing.Color.Transparent, System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top ); new HDarge( cellpal, "地区:" + tag.Loc, new System.Drawing.Font(PublicStatic.MainFont, 12F), new System.Drawing.Size(120, 25), new System.Drawing.Point(150 + 6 + 120, 44 + 24 + 45), System.Drawing.Color.FromArgb(60, 60, 60), System.Drawing.Color.Transparent, System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top ); new HDarge( cellpal, "类型:" + tag.Typ, new System.Drawing.Font(PublicStatic.MainFont, 12F), new System.Drawing.Size(120, 25), new System.Drawing.Point(150 + 6, 44 + 24 + 45 + 25), System.Drawing.Color.FromArgb(60, 60, 60), System.Drawing.Color.Transparent, System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top ); new HDarge( cellpal, "更新:" + tag.Upt, new System.Drawing.Font(PublicStatic.MainFont, 12F), new System.Drawing.Size(120, 25), new System.Drawing.Point(150 + 6 + 120, 44 + 24 + 45 + 25), System.Drawing.Color.FromArgb(60, 60, 60), System.Drawing.Color.Transparent, System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top ); // 方块内按钮 var temphds = tag.HDs; if (string.IsNullOrEmpty(temphds)) return; var playbtn = new LButton ( cellpal, 1, temphds, new System.Drawing.Font(PublicStatic.MainFont, 12.5F), new System.Drawing.Size(101, 32), new System.Drawing.Point(150 + 152, 40 + 25*5 + 2*5), System.Drawing.Color.FromArgb(0, 122, 204), System.Drawing.Color.FromArgb(248, 248, 248), System.Drawing.Color.FromArgb(248, 248, 248), System.Drawing.Color.FromArgb(0, 122, 204), System.Drawing.Color.FromArgb(0, 122, 204), System.Drawing.Color.FromArgb(248, 248, 248), System.Windows.Forms.AnchorStyles.Top ); var copybtn = new LButton ( cellpal, 1, "复制链接", new System.Drawing.Font(PublicStatic.MainFont, 12.5F), new System.Drawing.Size(101, 32), new System.Drawing.Point(150 + 152 - 101 - 8, 40 + 25*5 + 2*5), System.Drawing.Color.FromArgb(0, 122, 204), System.Drawing.Color.FromArgb(248, 248, 248), System.Drawing.Color.FromArgb(248, 248, 248), System.Drawing.Color.FromArgb(0, 122, 204), System.Drawing.Color.FromArgb(0, 122, 204), System.Drawing.Color.FromArgb(248, 248, 248), System.Windows.Forms.AnchorStyles.Top ); copybtn.MouseClick += Copybtn_MouseClick; playbtn.MouseClick += Playbtn_MouseClick; if (string.IsNullOrEmpty(PublicStatic.SearchBox.Text)) { PublicStatic.LiuXingCon.Focus(); } }