Ejemplo n.º 1
0
        /// <summary>
        /// 添加菜单项
        /// </summary>
        /// <param name="name">菜单名称</param>
        /// <param name="top">标签Top</param>
        public void AddItems(string name, int top)
        {
            DuiLabel item = new DuiLabel();

            item.Text        = name;
            item.Size        = new System.Drawing.Size(MenuList.Width, 35);
            item.TextAlign   = ContentAlignment.MiddleLeft;
            item.TextPadding = 10;
            item.Tag         = top;
            item.TextAlign   = ContentAlignment.MiddleCenter;
            item.Font        = font;
            item.MouseUp    += ItemsMouseUp;
            item.MouseEnter += delegate
            {//鼠标移入效果
                if (item.BackColor != SelectedBackColor)
                {
                    item.BackColor = HoverBackColor;
                }
            };
            item.MouseLeave += delegate
            {//鼠标移出效果
                if (item.BackColor != SelectedBackColor)
                {
                    item.BackColor = NormalBackColor;
                }
            };
            MenuList.Items.Add(item);
            MenuList.LayoutContent();
        }
Ejemplo n.º 2
0
        private void dlTag_MouseClick(object sender, DuiMouseEventArgs e)
        {
            DuiLabel dlb     = sender as DuiLabel;
            string   tidsStr = dlb.Tag.ToString();

            if (!String.IsNullOrEmpty(tidsStr))
            {
                if (tidsStr.Contains("-"))
                {
                    userEntity.menuName = dlb.Tag.ToString().Split('-')[1];
                    startNo             = "1";
                    SumPage             = "N";
                    isSearch            = false;
                    Thread thread = new Thread(() => updateImgList(dlb.Tag.ToString().Split('-')[1], startNo));
                    thread.Start();
                }
                else
                {
                    userEntity.menuName = dlb.Tag.ToString();
                    startNo             = "1";
                    SumPage             = "N";
                    isSearch            = false;
                    Thread thread = new Thread(() => updateImgList(dlb.Tag.ToString().Split('-')[1], startNo));
                    thread.Start();
                }
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FrmLoad(object sender, EventArgs e)
        {
            //timShow.Enabled = true;
            Bitmap   topbg = new Bitmap(this.Width, this.Height);
            Graphics g     = Graphics.FromImage(topbg);

            //绘制头部背景
            using (Brush LineartBrush = new LinearGradientBrush(
                       new Rectangle(0, 0, ClientRectangle.Width, 30),
                       Color.FromArgb(135, Color.White), Color.FromArgb(255, Color.White), 90))
            {
                g.FillRectangle(LineartBrush, new Rectangle(0, 0, ClientRectangle.Width, 30));
                LineartBrush.Dispose();
            }

            TopControl.BackgroundImage = topbg;
            //添加昵称
            TopControl.DUIControls.Add(AddDuiLabel("", _font, new Size(150, 30), new Point(0, 0), false));
            ChatList.BackColor             = Color.White;
            BottonControl.Borders.TopColor = Color.FromArgb(100, 60, 60, 60);
            BottonControl.BackColor        = Color.White;
            BottonControl.DUIControls.Add(AddDuiLabel("", _font, new Size(BottonControl.Width, 38), new Point(0, 0), false));
            DuiLabel bt1 = AddDuiLabel("全部忽略", _font, new Size(60, 30), new Point(10, 4), true);

            bt1.ForeColor = Color.Blue;
            bt1.Cursor    = Cursors.Hand;
            bt1.TextAlign = ContentAlignment.MiddleCenter;
            DuiLabel bt2 = AddDuiLabel("全部查看", _font, new Size(60, 30), new Point(this.Width - 90, 4), true);

            bt2.ForeColor = Color.Blue;
            bt2.Cursor    = Cursors.Hand;
            bt2.TextAlign = ContentAlignment.MiddleCenter;
            BottonControl.DUIControls.Add(bt1);
            BottonControl.DUIControls.Add(bt2);
        }
Ejemplo n.º 4
0
 public void Init()
 {
     //int[,] colorArray = { { 253, 177, 174 }, { 212, 170, 224 }, { 253, 208, 234 }, { 253, 202, 178 }, { 233, 122, 124 }, { 254, 178, 195 }, { 251, 180, 121 }, { 216, 194, 236 }, { 236, 218, 235 }, { 178, 216, 252 }, { 184, 242, 140 }, { 139, 226, 217 }, { 215, 225, 230 }, { 212, 156, 185 }, { 235, 170, 182 }, { 177, 196, 252 }, { 243, 113, 171 }, { 35, 212, 254 }, { 60, 242, 177 }, { 252, 163, 113 }, { 49, 108, 156 }, { 202, 228, 231 }, { 101, 224, 222 }, { 65, 225, 211 } };
     Color[] colorArray = { Color.FromArgb(30, 30, 30), Color.Crimson, Color.OrangeRed, Color.FromArgb(236, 109, 113), Color.DarkOrange, Color.FromArgb(44, 169, 225), Color.FromArgb(0, 123, 180), Color.LightSeaGreen, Color.MediumSeaGreen, Color.Chartreuse, Color.GreenYellow, Color.YellowGreen, Color.Gold, Color.FromArgb(224, 224, 224), Color.FromArgb(231, 96, 158), Color.FromArgb(170, 76, 143), Color.DarkOrchid, Color.SlateBlue, Color.SteelBlue, Color.Teal, Color.MediumAquamarine, Color.FromArgb(56, 180, 139), Color.ForestGreen, Color.DarkGreen };
     for (int i = 1; i <= 24; i++)
     {
         DuiLabel dlc = new DuiLabel();
         //dlc.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(colorArray[i - 1, 0])))), ((int)(((byte)(colorArray[i - 1, 1])))), ((int)(((byte)(colorArray[i - 1, 2])))));
         dlc.BackColor = colorArray[i - 1];
         dlc.Width     = (Width - 44) / 12;
         dlc.Height    = (base_main.Height - 14) / 2;
         dlc.Name      = "color" + i.ToString();
         //根据循环数判断当前行及列
         int ColorColNum = (i % 12 == 0 ? 12 : i % 12);
         int ColorRowNum = (i - i % 12) / 12 + (i % 12 == 0 ? 0 : 1);
         dlc.Location    = new Point(13 + ((ColorColNum - 1) * dlc.Width) + ColorColNum * 2, 4 * (ColorRowNum) + ((ColorRowNum - 1) * dlc.Height));
         dlc.MouseClick += Dlc_MouseClick;
         base_main.DUIControls.Add(dlc);
     }
     tkb_skin.Value = Double.Parse(cpes.pes.Opacity);
     lb_skintr.Text = (tkb_skin.Value * 100).ToString("0") + "%";
     string[] imgsUrl = new Utils.PropertsUtils().BackImgsUrl;
     pictureBox1.Image = Image.FromFile(Utils.PicDeal.DownloaImage(imgsUrl[0]));
     pictureBox2.Image = Image.FromFile(Utils.PicDeal.DownloaImage(imgsUrl[1]));
     pictureBox3.Image = Image.FromFile(Utils.PicDeal.DownloaImage(imgsUrl[2]));
     pictureBox4.Image = Image.FromFile(Utils.PicDeal.DownloaImage(imgsUrl[3]));
     pictureBox5.Image = Image.FromFile(Utils.PicDeal.DownloaImage(imgsUrl[4]));
     pictureBox7.Image = Image.FromFile(Utils.PicDeal.DownloaImage(imgsUrl[5]));
     pictureBox8.Image = Image.FromFile(Utils.PicDeal.DownloaImage(imgsUrl[6]));
     pictureBox9.Image = Image.FromFile(Utils.PicDeal.DownloaImage(imgsUrl[7]));
 }
Ejemplo n.º 5
0
        public MusicList()
        {
            DuiBaseControl b = new DuiBaseControl();

            b.Size      = new Size(Width, 35);
            b.BackColor = Color.Transparent;
            DuiLabel l = new DuiLabel();

            l.TextRenderMode = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
            l.Location       = new Point(30, 8);
            l.AutoSize       = true;
            l.Font           = new Font("微软雅黑", 11F, FontStyle.Bold);
            l.ForeColor      = Color.White;
            l.Text           = "这个列表没有音乐哦\n您可以直接把音乐拖到这里来";
            l.Name           = "name";
            b.Controls.Add(l);
            b.Name      = "no";
            b.Visible   = false;
            no          = b;
            tx.Interval = 100;
            tx.Tick    += Tx_Tick;
            t.Interval  = 100;
            t.Tick     += T_Tick;
            t1.Interval = 500;
            t1.Tick    += T1_Tick;
            cs          = new System.Windows.Forms.Cursor(Properties.Resources.music_move.GetHicon());
            MouseMove  += MusicList_MouseMove;
        }
Ejemplo n.º 6
0
        private void Dlbe_MouseEnter(object sender, DuiMouseEventArgs e)
        {
            skinLine_Update();
            DuiBaseControl lbbtn = sender as DuiBaseControl;
            string         vtag  = "";

            foreach (var vitem in lbbtn.Controls)
            {
                DuiLabel lb = vitem as DuiLabel;
                vtag = lb.Tag.ToString();
                if (lb.Name.Contains("ImageTypeName_"))
                {
                    lb.ForeColor = defaultColor;
                }
                else
                {
                    lb.BackColor = defaultColor;
                }
            }
            DuiBaseControl bControl = lbbtn.Parent as DuiBaseControl;

            foreach (var item in bControl.FindControl("ImageTypeGrid_" + vtag))
            {
                if (item is DuiBaseControl && item.Controls.Count > 0 && Panel_TypeMess.DUIControls.Count <= 0)
                {
                    DuiBaseControl newpm = new DuiBaseControl();
                    newpm.Size       = item.Size;
                    newpm.Visible    = true;
                    newpm.Location   = new Point(0, 0);
                    newpm.BackColor  = item.BackColor;
                    newpm.Borders    = item.Borders;
                    newpm.ShowBorder = item.ShowBorder;
                    foreach (var vitem in item.Controls)
                    {
                        if (vitem is DuiLabel)
                        {
                            DuiLabel dl = vitem as DuiLabel;
                            dl.Cursor      = Cursors.Hand;
                            dl.MouseEnter += dlTag_MouseEnter;
                            dl.MouseLeave += dlTag_MouseLeave;
                            newpm.Controls.Add(dl);
                        }
                    }
                    newpm.Dock = DockStyle.Fill;
                    Panel_TypeMess.DUIControls.Add(newpm);
                    Panel_TypeMess.Size     = item.Size;
                    Panel_TypeMess.Location = new Point(item.Location.X, layeredPanel_top.Height + Panel_Type.Height - 5);
                    Utils.AnimationControl.ShowControl(Panel_TypeMess, true, AnchorStyles.Right);
                }
            }
            Point ms = Control.MousePosition;

            x = ms.X;
            y = ms.Y;
            //NowNum = int.Parse(btn.Tag.ToString());
            //LoadSliderImg(NowNum);
            Panel_Type.Refresh();
        }
Ejemplo n.º 7
0
        private void Dlc_MouseClick(object sender, DuiMouseEventArgs e)
        {
            DuiLabel dlc = sender as DuiLabel;

            cpes.BackGroundSkin = null;
            cpes.pes.BackImg    = "";
            cpes.pes.BackColor  = Color.FromArgb((int)(255 * (tkb_skin.Value)), dlc.BackColor);
            cpes.pes.Opacity    = tkb_skin.Value.ToString();
            cpes.setSkinStyle();
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 图片列表失去焦点后的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Dp_MouseLeave(object sender, EventArgs e)
        {
            Point ms = Control.MousePosition;

            if (ms.Y != y || (ms.X != x))
            {
                DuiBaseControl dp    = null;
                string         strId = "";
                if (sender is DuiBaseControl)
                {
                    dp = sender as DuiBaseControl;
                    if (dp.Name.Contains("btnBaseControl_"))
                    {
                        strId = (dp != null ? dp.Name.Replace("btnBaseControl_", "") : "");
                    }
                }
                if (sender is DuiButton)
                {
                    dp    = (sender as DuiButton).Parent as DuiBaseControl;
                    strId = (sender as DuiButton).Name.Replace("btn_Download_", "").Replace("btn_Setting_", "");
                }
                if (sender is DuiPictureBox)
                {
                    strId = (sender as DuiPictureBox).Name.Replace("back_", "");
                    dp    = (sender as DuiPictureBox).Parent as DuiBaseControl;
                }
                //隐藏按钮
                if (dp.FindControl("btnBaseControl_" + strId).Count > 0)
                {
                    DuiBaseControl ldl = dp.FindControl("btnBaseControl_" + strId)[0];
                    if (!ldl.IsMouseEnter)
                    {
                        ldl.Visible = false;
                        //显示名称
                        if (dp.FindControl("imgTag_" + strId).Count > 0)
                        {
                            DuiLabel dl = (DuiLabel)dp.FindControl("imgTag_" + strId)[0];
                            dl.Visible = true;
                        }
                        //显示时长
                        if (dp.FindControl("tvLength_" + strId).Count > 0)
                        {
                            DuiLabel dl = (DuiLabel)dp.FindControl("tvLength_" + strId)[0];
                            dl.Visible = true;
                        }
                    }
                }
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 鸣谢内容点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Lb_mxnr1_MouseClick(object sender, DuiMouseEventArgs e)
        {
            DuiLabel cdl   = sender as DuiLabel;
            string   wsite = "";

            if (cdl.Name == "lb_mxnr2")
            {
                wsite = "http://www.52pojie.cn";
            }
            else
            {
                wsite = "http://bbs.cskin.net";
            }
            System.Diagnostics.Process.Start(wsite);
        }
Ejemplo n.º 10
0
        public static void LabelMouseEnterAndLeaveEnvent(DuiLabel label)
        {
            Color orignalColor = label.ForeColor;

            label.MouseEnter += new EventHandler <MouseEventArgs>(delegate(object sender, MouseEventArgs e) {
                label.Cursor    = System.Windows.Forms.Cursors.Hand;
                label.ForeColor = Color.Yellow;
                //label.Font = new Font(label.Font.Name, label.Font.Size + 1);
                //label.Location = new Point(label.Location.X, label.Location.Y - 1);
            });
            label.MouseLeave += new EventHandler(delegate(object sender, EventArgs e) {
                label.ForeColor = orignalColor;
                //label.Font = new Font(label.Font.Name, label.Font.Size - 1);
                //label.Location = new Point(label.Location.X, label.Location.Y + 1);
            });
        }
Ejemplo n.º 11
0
        private DuiLabel CreateLabel(DuiBaseControl baseItem, Point location, Size size, string name, string text, int fontSize, string toolTip)
        {
            DuiLabel item = new DuiLabel
            {
                Location  = location,
                Size      = size,
                Name      = name,
                Text      = text,
                ForeColor = Color.Tan,
                BackColor = Color.Transparent,
                Font      = new Font("微软雅黑", fontSize),
                ToolTip   = toolTip,
                Cursor    = Cursors.Hand
            };

            item.MouseEnter += new EventHandler <MouseEventArgs>(delegate(object obj, MouseEventArgs args)
            {
                baseItem.BackColor = Color.FromArgb(50, 255, 255, 255);
            });
            item.MouseLeave += new EventHandler(delegate(object obj, EventArgs args)
            {
                baseItem.BackColor = Color.Transparent;
            });
            item.MouseClick += new EventHandler <DuiMouseEventArgs>(delegate(object obj, DuiMouseEventArgs args)
            {
                switch (name)
                {
                case "default":
                    SystemCommon.LoginState = LoginStateEnum.Default;
                    break;

                case "edit":
                    SystemCommon.LoginState = LoginStateEnum.Edit;
                    break;

                case "check":
                    SystemCommon.LoginState = LoginStateEnum.Check;
                    break;
                }
                if (this.SelectedHandler != null)
                {
                    this.SelectedHandler(SystemCommon.LoginState);
                }
            });
            baseItem.Controls.Add(item);
            return(item);
        }
Ejemplo n.º 12
0
 private void loadPageTextUpdate(string nowPage, string countPage)
 {
     if (string.IsNullOrEmpty(countPage))
     {
         countPage = "N";
     }
     if (this.Panel_load.InvokeRequired)
     {
         AsynUpdateloadPageText au = new AsynUpdateloadPageText(loadPageTextUpdate);
         this.Invoke(au, new object[] { nowPage, countPage });
     }
     else
     {
         DuiLabel dpText = Panel_load.DUIControls[1] as DuiLabel;
         dpText.Text = "正在加载第 " + nowPage + "/" + countPage + ", 请稍后......";
     }
 }
Ejemplo n.º 13
0
        /// <summary>
        /// 图片类型点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Dlbe_MouseClick(object sender, DuiMouseEventArgs e)
        {
            DuiLabel dlbe = sender as DuiLabel;

            if (dlbe.Tag != null)
            {
                Entity.MenuEntity.DataItem dt = (Entity.MenuEntity.DataItem)dlbe.Tag;
                if (dt.MenuName != userEntity.menuName)
                {
                    userEntity.menuName = dt.MenuVal.Replace("categoryID=", "");
                    startNo             = "1";
                    nCount   = "0";
                    SumPage  = "N";
                    isSearch = false;
                    Thread thread = new Thread(() => updateImgList(dt.MenuVal.Replace("categoryID=", ""), startNo));
                    thread.Start();
                }
            }
        }
Ejemplo n.º 14
0
        public static DuiLabel CreateLabel(DuiBaseControl baseItem, Point location, Size size, string name, string text, Color foreColor, Font font, Color borderColor, string toolTip)
        {
            DuiLabel label = new DuiLabel
            {
                Location   = location,
                Size       = size,
                Name       = name,
                Text       = text,
                ForeColor  = foreColor,
                Font       = font,
                BackColor  = Color.Transparent,
                ShowBorder = !borderColor.Equals(Color.Transparent),
                ToolTip    = toolTip
            };

            label.Borders.AllColor = borderColor;
            baseItem.Controls.Add(label);
            return(label);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 图片列表获取焦点后的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Dp_MouseEnter(object sender, EventArgs e)
        {
            Point ms = Control.MousePosition;

            x = ms.X;
            y = ms.Y;
            DuiBaseControl dp    = null;
            string         strId = "";

            if (sender is DuiBaseControl)
            {
                dp = sender as DuiBaseControl;
            }
            if (sender is DuiButton)
            {
                dp    = (sender as DuiButton).Parent as DuiBaseControl;
                strId = (sender as DuiButton).Name.Replace("btn_Download_", "").Replace("btn_Setting_", "");
            }
            if (sender is DuiPictureBox)
            {
                strId = (sender as DuiPictureBox).Name.Replace("back_", "");
                dp    = (sender as DuiPictureBox).Parent as DuiBaseControl;
            }
            //隐藏标题
            if (dp.FindControl("imgTag_" + strId).Count > 0)
            {
                DuiLabel dl = (DuiLabel)dp.FindControl("imgTag_" + strId)[0];
                dl.Visible = false;
            }
            //隐藏时长
            if (dp.FindControl("tvLength_" + strId).Count > 0)
            {
                DuiLabel dl = (DuiLabel)dp.FindControl("tvLength_" + strId)[0];
                dl.Visible = false;
            }
            //显示按钮
            if (dp.FindControl("btnBaseControl_" + strId).Count > 0)
            {
                DuiBaseControl ldl = dp.FindControl("btnBaseControl_" + strId)[0];
                ldl.Visible = true;
            }
        }
Ejemplo n.º 16
0
        private void ImgTag_MouseClick(object sender, DuiMouseEventArgs e)
        {
            DuiLabel dlt = sender as DuiLabel;

            if (dlt.Name.Contains("ps-"))
            {
                API.Mmtv llys  = new API.Mmtv();
                string   tvUrl = dlt.Name.Replace("imgTag_", "");
                tvUrl      = llys.getMmUrl(tvUrl.Split('-')[0], tvUrl.Split('-')[1]);
                plf.tvUrl  = tvUrl;
                plf.tvName = dlt.Text.Trim();
                plf.Axplayer_Play(tvUrl);
            }
            else
            {
                plf.tvUrl  = dlt.Name.Replace("imgTag_", "");
                plf.tvName = dlt.Text.Trim();
                plf.Axplayer_Play(dlt.Name.Replace("imgTag_", ""));
            }
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 添加热门标签
        /// </summary>
        /// <param name="tagsList">标签数组List</param>
        /// <param name="typeId">分类ID</param>
        /// <param name="index">当前顺序</param>
        /// <returns></returns>
        private DuiBaseControl addHotTagControl(Entity.TagsEntity.Root tagsList)
        {
            int            index        = ((typeControl.Controls.Count - 1) / 2);
            DuiBaseControl ltypeControl = new DuiBaseControl();

            if (tagsList.data.Count > 0)
            {
                ltypeControl.Size = new Size(154, 15 + tagsList.data.Count * 27 / 2);
            }
            else
            {
                ltypeControl.Size = new Size(154, 0);
            }

            ltypeControl.Name      = "ImageTypeGrid_0";
            ltypeControl.Location  = new Point(60 * index, 25);
            ltypeControl.Visible   = false;
            ltypeControl.BackColor = Color.White;//Color.FromArgb(defaultColor.R,defaultColor.G,defaultColor.B);
            int rowi = 1;
            int coli = 1;
            int ti   = 1;

            foreach (Entity.TagsEntity.DataItem citem in tagsList.data)
            {
                coli = (ti % 2 == 0 ? 2 : 1);
                rowi = (int)Math.Ceiling(((double)ti / 2));
                DuiLabel dlbea = new DuiLabel();
                dlbea.Size        = new Size(60, 20);
                dlbea.Text        = citem.Item;
                dlbea.Name        = "ImageTypeNameOther_" + citem.TopicId + citem.ItemOrder;
                dlbea.Location    = new Point(70 * (coli - 1), 10 + 24 * (rowi - 1));
                dlbea.Cursor      = System.Windows.Forms.Cursors.Hand;
                dlbea.TextAlign   = ContentAlignment.MiddleCenter;
                dlbea.Tag         = "0-" + citem.Item;
                dlbea.MouseClick += dlTag_MouseClick;
                ltypeControl.Controls.Add(dlbea);
                ti++;
            }
            return(ltypeControl);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// 返回DuiLabel
        /// </summary>
        /// <param name="text">显示的信息</param>
        /// <param name="font">字体</param>
        /// <param name="size">大小</param>
        /// <param name="location">显示位置</param>
        /// <returns></returns>
        public DuiLabel AddDuiLabel(string text, Font font, Size size, Point location, bool isEven)
        {
            DuiLabel duiLabel = new DuiLabel();

            duiLabel.Size           = size;
            duiLabel.Text           = text;
            duiLabel.Font           = font;
            duiLabel.TextRenderMode = TextRenderingHint.AntiAliasGridFit;
            duiLabel.Location       = location;
            duiLabel.ShowBorder     = false;

            duiLabel.Borders.TopColor               =
                duiLabel.Borders.BottomColor        =
                    duiLabel.Borders.LeftColor      =
                        duiLabel.Borders.RightColor = Color.FromArgb(40, Color.Black);
            if (isEven)
            {
                duiLabel.MouseEnter += HightMouseEnter;
                duiLabel.MouseLeave += HightMouseLeave;
            }
            return(duiLabel);
        }
Ejemplo n.º 19
0
        /// <summary>
        /// 添加新消息列表
        /// </summary>
        /// <param name="headimg"></param>
        /// <param name="uin"></param>
        /// <param name="nicname"></param>
        /// <param name="msg"></param>
        //public void AddItemsMsg(string uin, string type, string nicname, string msg)
        //{
        //    TagFrirendInfo tagFrirendInfo = null;
        //    try
        //    {
        //        tagFrirendInfo = (type == "1"
        //            ? GetObj(headimg, Webqq.GetFriendsInfomation(uin))
        //            : GetObj(headimg, Webqq.GetGroupInfomation(uin)));
        //    }
        //    catch
        //    {
        //        tagFrirendInfo = null;
        //    }
        //    if (tagFrirendInfo == null)
        //        return;
        //    FrmChat fc = FrmMain.FindFrmChat(uin, type);
        //    if (fc != null)
        //    {
        //        //fc.ReadChatRecord();
        //        return;
        //    }
        //    //判断是否存在列表中
        //    DuiBaseControl dc = IsHaveItem(tagFrirendInfo.Uin);
        //    if (dc != null)
        //    {
        //        ((DuiLabel)dc.Controls[3]).Text = (int.Parse(((DuiLabel)dc.Controls[3]).Text) + 1).ToString();
        //        ((DuiLabel)dc.Controls[1]).Text = msg;
        //    }
        //    else
        //    {
        //        DuiBaseControl item = AddChatItems(headimg, tagFrirendInfo.NicName, msg);
        //        //第一项为头像,第二项为QQ名称与个性签名,第三项为好友UIN(非QQ号),第四项为好友类型1为好友,2为群
        //        object[] obj = new object[10];
        //        obj[0] = tagFrirendInfo;
        //        obj[1] = type;
        //        item.Tag = obj;
        //        ChatList.Items.Add(item);
        //        ChatList.RefreshList();
        //        this.Height = ChatList.Items.Count * 55 + 80;
        //        this.Top = Screen.GetWorkingArea(this).Height - this.Height;
        //    }
        //}
        /// <summary>
        /// 添加新消息列表
        /// </summary>
        /// <param name="headimg"></param>
        /// <param name="uin"></param>
        /// <param name="nicname"></param>
        /// <param name="msg"></param>
        //public void AddItemsMsg(Bitmap headimg, string uin, string type, string nicname, List<MsgModel> msgModels)
        //{
        //    TagFrirendInfo tagFrirendInfo = null;
        //    try
        //    {
        //        tagFrirendInfo = (type == "1"
        //            ? GetObj(headimg, Webqq.GetFriendsInfomation(uin))
        //            : GetObj(headimg, Webqq.GetGroupInfomation(uin)));
        //    }
        //    catch
        //    {
        //        tagFrirendInfo = null;
        //    }
        //    if (tagFrirendInfo == null)
        //        return;
        //    FrmChat fc = FrmMain.FindFrmChat(uin, type);
        //    if (fc != null)
        //    {
        //        //fc.ReadChatRecord();
        //        return;
        //    }
        //    string lastMsg = "";
        //    if (msgModels.Count > 0)
        //    {
        //        if (msgModels[0].Type == "msg")
        //            lastMsg = msgModels[msgModels.Count - 1].Value;
        //        else if (msgModels[0].Type == "face")
        //            lastMsg = "[表情]";
        //        else if (msgModels[0].Type == "offpic")
        //            lastMsg = "[自定义图片]";
        //    }

        //    //判断是否存在列表中
        //    DuiBaseControl dc = IsHaveItem(tagFrirendInfo.Uin);
        //    if (dc != null)
        //    {
        //        ((DuiLabel)dc.Controls[3]).Text = (int.Parse(((DuiLabel)dc.Controls[3]).Text) + 1).ToString();
        //        ((DuiLabel)dc.Controls[1]).Text = lastMsg;
        //    }
        //    else
        //    {
        //        DuiBaseControl item = AddChatItems(headimg, tagFrirendInfo.NicName, lastMsg);
        //        //第一项为头像,第二项为QQ名称与个性签名,第三项为好友UIN(非QQ号),第四项为好友类型1为好友,2为群
        //        object[] obj = new object[10];
        //        obj[0] = tagFrirendInfo;
        //        obj[1] = type;
        //        item.Tag = obj;
        //        ChatList.Items.Add(item);
        //        ChatList.RefreshList();
        //        this.Height = ChatList.Items.Count * 55 + 80;
        //        this.Top = Screen.GetWorkingArea(this).Height - this.Height;
        //    }
        //}
        /// <summary>
        /// 添加列表项
        /// </summary>
        /// <param name="head"></param>
        /// <param name="displayname"></param>
        /// <param name="personalMsg"></param>
        /// <returns></returns>
        public DuiBaseControl AddChatItems(Bitmap head, string displayname, string personalMsg)
        {
            //好友名称
            DuiLabel lbl = AddDuiLabel(displayname, _font, new Size(ChatList.Width - 85, 20), new Point(60, 8),
                                       false);
            //消息
            DuiLabel info = AddDuiLabel(personalMsg, _font, new Size(ChatList.Width - 85, 20), new Point(59, 30),
                                        false);
            //消息数量
            DuiLabel infocount = AddDuiLabel("1", _font, new Size(20, 20), new Point(ChatList.Width - 50, 15),
                                             false);

            infocount.ForeColor    = Color.White;
            infocount.TextAlign    = ContentAlignment.MiddleCenter;
            infocount.BorderRender = new FilletBorderRender(12, 1, Color.FromArgb(245, 108, 11));
            infocount.BackColor    = Color.FromArgb(245, 108, 11);
            info.ForeColor         = Color.FromArgb(60, 60, 60);
            //好友头像
            DuiBaseControl pic = AddItemsHeadImgControll(head, ImageLayout.Stretch, Cursors.Default, new Size(45, 45),
                                                         new Point(5, 5), true);

            pic.BackColor = Color.BurlyWood;
            //好友项容器
            DuiBaseControl item = new DuiBaseControl();

            item.BackColor         = Color.Transparent;
            item.Width             = ChatList.Width;
            item.Height            = 55;
            item.MouseDoubleClick += ItemsMouseDoubleClick;
            item.MouseEnter       += ItemsMouseEnter;
            item.MouseLeave       += ItemsMouseLeave;
            item.Controls.Add(lbl);
            item.Controls.Add(info);
            item.Controls.Add(pic);
            item.Controls.Add(infocount);
            item.Name    = ChatList.Items.Count.ToString();
            item.Visible = true;
            return(item);
        }
Ejemplo n.º 20
0
        private void SendYjForm_Load(object sender, EventArgs e)
        {
            this.BackColor = Color.FromArgb(185, pes.pes.BackColor);
            if (pes.BackGroundSkin != null)
            {
                BackGroundSkin = pes.BackGroundSkin;
            }
            btn_send.BaseColor = pes.pes.BackColor;
            foreach (DuiBaseControl item in panel_main.DUIControls)
            {
                switch (item.Name)
                {
                case "rb_cpjy":
                case "rb_bugfk":
                    dr_fklx = item as DuiRadioButton;
                    dr_fklx.CheckRectColor  = pes.pes.BackColor;
                    dr_fklx.CheckFlagColor  = pes.pes.BackColor;
                    dr_fklx.CheckedChanged += Dr_fklx_CheckedChanged;
                    break;

                case "tb_fkyj":
                    tb_fkyj              = item as DuiTextBox;
                    tb_fkyj.Invalidated += Tb_fkyj_Invalidated;
                    break;

                case "tb_lxfs":
                    tb_lxfs = item as DuiTextBox;
                    tb_lxfs.FocusedChanged += Tb_lxfs_FocusedChanged;
                    break;

                case "lb_yjlen":
                    dl_yjlen = item as DuiLabel;
                    break;

                default:
                    break;
                }
            }
        }
Ejemplo n.º 21
0
        private void Form3_Load(object sender, EventArgs e)
        {
            Color[] colors = new Color[] {
                Color.FromArgb(23, 149, 75),
                Color.FromArgb(1, 187, 225),
                Color.FromArgb(176, 226, 64),
                Color.FromArgb(160, 0, 168),
                Color.FromArgb(190, 30, 74),
                Color.FromArgb(10, 89, 196),
                Color.FromArgb(218, 84, 46),
            };

            Random r = new Random();

            MetroList.Width  = this.Width - 100;
            MetroList.Height = this.Height - 100;

            for (int i = 0; i < 1000; i++)
            {
                DuiLabel lbl = new DuiLabel();
                lbl.Size        = new System.Drawing.Size(190, 140);
                lbl.Text        = (i + 1).ToString();
                lbl.Location    = new Point(5, 0);
                lbl.BackColor   = colors[r.Next(0, colors.Length)];
                lbl.ForeColor   = Color.White;
                lbl.TextAlign   = ContentAlignment.MiddleCenter;
                lbl.MouseEnter += lbl_MouseEnter;
                lbl.MouseLeave += lbl_MouseLeave;

                DuiBaseControl item = new DuiBaseControl();
                //item.BackColor = Color.FromArgb(14, 109, 56);
                item.Size = new System.Drawing.Size(200, 150);
                item.Controls.Add(lbl);
                MetroList.Items.Add(item);
            }
            MetroList.RefreshList();
        }
Ejemplo n.º 22
0
        /// <summary>
        /// 添加分类
        /// </summary>
        /// <param name="imgType">类型</param>
        /// <returns></returns>
        private Boolean addTypeLable(Entity.MenuEntity.DataItem imgType)
        {
            int      i    = (typeControl.Controls.Count / 1);
            DuiLabel dlbe = new DuiLabel();

            dlbe.Size        = new Size(60, 20);
            dlbe.Text        = imgType.MenuName;
            dlbe.Name        = "ImageTypeName_" + imgType.MenuName;
            dlbe.Location    = new Point(0, 5);
            dlbe.Cursor      = System.Windows.Forms.Cursors.Hand;
            dlbe.MouseMove  += Dlbe_MouseMove;
            dlbe.TextAlign   = ContentAlignment.MiddleCenter;
            dlbe.Tag         = imgType;
            dlbe.MouseClick += Dlbe_MouseClick;

            DuiLabel dLabel1 = new DuiLabel();

            dLabel1.Name        = "ImageTypeLine_" + imgType.MenuName;
            dLabel1.Cursor      = dlbe.Cursor;
            dLabel1.Size        = new Size(60, 2);
            dLabel1.BackColor   = System.Drawing.Color.Silver;
            dLabel1.Height      = 2;
            dLabel1.Tag         = imgType;
            dLabel1.Location    = new Point(0, 30);
            dLabel1.MouseClick += Dlbe_MouseClick;

            DuiBaseControl dlbControl = new DuiBaseControl();

            dlbControl.Size       = new Size(60, 35);
            dlbControl.Location   = new Point(61 * i, 0);
            dlbControl.MouseMove += Dlbe_MouseEnter;
            //dlbControl.MouseEnter += Dlbe_MouseEnter;
            dlbControl.MouseLeave += Dlbe_MouseLeave;
            dlbControl.Controls.AddRange(new DuiBaseControl[] { dlbe, dLabel1 });
            typeControl.Controls.Add(dlbControl);
            return(true);
        }
Ejemplo n.º 23
0
        private void LoadPrepare1()
        {
            for (int i = 1; i <= 60; i++)
            {
                DuiLabel dl = new DuiLabel();
                dl.TextAlign        = ContentAlignment.MiddleLeft;
                dl.TextInnerPadding = new Padding(18, 0, 0, 0);
                dl.Text             = i.ToString();
                dSkinComboBox_FastBack.Items.Add(dl);

                DuiLabel dll = new DuiLabel();
                dll.TextAlign        = ContentAlignment.MiddleLeft;
                dll.TextInnerPadding = new Padding(18, 0, 0, 0);
                dll.Text             = i.ToString();
                dSkinComboBox_FastForward.Items.Add(dll);
            }

            PnlInfo.VScrollBar.Fillet = true;
            PnlInfo.VScrollBar.Width  = 9;
            dSkinComboBox_FastBack.InnerListBox.ScrollBarWidth    = 11;
            dSkinComboBox_FastForward.InnerListBox.ScrollBarWidth = 11;
            dSkinPanel_LinkFile.VScrollBar.Fillet = true;
            dSkinComboBox_FastBack.InnerListBox.InnerScrollBar.Fillet    = true;
            dSkinComboBox_FastForward.InnerListBox.InnerScrollBar.Fillet = true;
            PnlInfo.VScrollBar.ValueChanged += ScrollBarValueChanged;


            duiScrollBar_LinkFile.Minimum              = 0;
            duiScrollBar_LinkFile.Maximum              = 750;
            duiScrollBar_LinkFile.SmallChange          = 25;
            duiScrollBar_LinkFile.LargeChange          = 100;
            dSkinPanel_LinkFile.VerticalScroll.Minimum = 0;
            dSkinPanel_LinkFile.VerticalScroll.Maximum = 750;

            ReadSettings();
        }
Ejemplo n.º 24
0
        private void AddControl()
        {
            #region 添加左上角显示内容标签(状态,声音等)
            if (dl_PlayerExplain == null)
            {
                dl_PlayerExplain = new DuiLabel();
                BaseControl.DUIControls.Add(dl_PlayerExplain);
            }
            updatePlayerExplain("");
            dl_PlayerExplain.TextAlign = ContentAlignment.MiddleLeft;
            dl_PlayerExplain.Font      = new Font("微软雅黑", 10F, FontStyle.Regular);
            dl_PlayerExplain.Size      = new Size(500, 20);
            dl_PlayerExplain.ForeColor = Color.White;
            dl_PlayerExplain.Location  = new Point(5, 5);
            dl_PlayerExplain.Visible   = true;
            #endregion

            #region 标题控件
            if (dl_TvName == null)
            {
                dl_TvName             = new DuiLabel();
                dl_TvName.Dock        = DockStyle.Top;
                dl_TvName.TextAlign   = ContentAlignment.MiddleCenter;
                dl_TvName.Font        = new Font("微软雅黑", 15F, FontStyle.Bold);
                dl_TvName.Size        = new Size(BaseControl.Width, 35);
                dl_TvName.ForeColor   = Color.White;
                dl_TvName.Location    = new Point(0, 0);
                dl_TvName.BackColor   = Color.Transparent;
                dl_TvName.Visible     = true;
                dl_TvName.MouseDown  += Dl_TvName_MouseDown;
                dl_TvName.MouseUp    += Dl_TvName_MouseUp;
                dl_TvName.MouseMove  += Dl_TvName_MouseMove;
                dl_TvName.MouseLeave += Dl_TvName_MouseLeave;
                BaseControl.DUIControls.Add(dl_TvName);
            }
            dl_TvName.Text = tvName.Length > 15 ? tvName.Substring(0, 15) + "......" : tvName;
            #endregion

            #region 播放器控制控件添加
            //添加播放器控制控件
            //停止按钮
            btnStop.Name                  = "btnStop";
            btnStop.Size                  = new Size(30, 30);
            btnStop.ShowBorder            = false;
            btnStop.BaseColor             = Color.Transparent;
            btnStop.BackgroundImage       = Properties.Resources.stop1;
            btnStop.BackgroundImageLayout = ImageLayout.Zoom;
            btnStop.IsPureColor           = true;
            btnStop.Cursor                = Cursors.Hand;
            btnStop.Tag         = "停止";
            btnStop.MouseEnter += BtnPlayControl_MouseEnter;
            btnStop.MouseLeave += BtnPlayControl_MouseLeave;
            btnStop.MouseClick += BtnPlayControl_MouseClick;
            //上一个按钮
            btnPrev.Name                  = "btnPrev";
            btnPrev.Size                  = new Size(30, 30);
            btnPrev.ShowBorder            = false;
            btnPrev.BaseColor             = Color.Transparent;
            btnPrev.BackgroundImage       = Properties.Resources.sys1;
            btnPrev.BackgroundImageLayout = ImageLayout.Zoom;
            btnPrev.Cursor                = Cursors.Hand;
            btnPrev.IsPureColor           = true;
            btnPrev.Tag         = "上一个";
            btnPrev.MouseEnter += BtnPlayControl_MouseEnter;
            btnPrev.MouseLeave += BtnPlayControl_MouseLeave;
            btnPrev.MouseClick += BtnPlayControl_MouseClick;
            //播放按钮
            btnPlay.Name                  = "btnPlay";
            btnPlay.Size                  = new Size(30, 30);
            btnPlay.ShowBorder            = false;
            btnPlay.BaseColor             = Color.Transparent;
            btnPlay.BackgroundImage       = Properties.Resources.play1;
            btnPlay.BackgroundImageLayout = ImageLayout.Zoom;
            btnPlay.IsPureColor           = true;
            btnPlay.Cursor                = Cursors.Hand;
            btnPlay.Tag         = "播放";
            btnPlay.MouseEnter += BtnPlayControl_MouseEnter;
            btnPlay.MouseLeave += BtnPlayControl_MouseLeave;
            btnPlay.MouseClick += BtnPlayControl_MouseClick;
            //下一个按钮
            btnNext.Name                  = "btnNext";
            btnNext.Size                  = new Size(30, 30);
            btnNext.ShowBorder            = false;
            btnNext.BaseColor             = Color.Transparent;
            btnNext.BackgroundImage       = Properties.Resources.xys1;
            btnNext.BackgroundImageLayout = ImageLayout.Zoom;
            btnNext.IsPureColor           = true;
            btnNext.Cursor                = Cursors.Hand;
            btnNext.Tag         = "下一个";
            btnNext.MouseEnter += BtnPlayControl_MouseEnter;
            btnNext.MouseLeave += BtnPlayControl_MouseLeave;
            btnNext.MouseClick += BtnPlayControl_MouseClick;
            //打开文件按钮
            btnOpenFile.Name                  = "btnOpenFile";
            btnOpenFile.Size                  = new Size(30, 30);
            btnOpenFile.ShowBorder            = false;
            btnOpenFile.BaseColor             = Color.Transparent;
            btnOpenFile.BackgroundImage       = Properties.Resources.dkwj1;
            btnOpenFile.BackgroundImageLayout = ImageLayout.Zoom;
            btnOpenFile.IsPureColor           = true;
            btnOpenFile.Cursor                = Cursors.Hand;
            btnOpenFile.Tag         = "打开文件";
            btnOpenFile.MouseEnter += BtnPlayControl_MouseEnter;
            btnOpenFile.MouseLeave += BtnPlayControl_MouseLeave;
            btnOpenFile.MouseClick += BtnPlayControl_MouseClick;
            //声音按钮
            btnVolume.Name                  = "btnVolume";
            btnVolume.Size                  = new Size(30, 30);
            btnVolume.ShowBorder            = false;
            btnVolume.BaseColor             = Color.Transparent;
            btnVolume.BackgroundImage       = Properties.Resources.volume1;
            btnVolume.BackgroundImageLayout = ImageLayout.Zoom;
            btnVolume.IsPureColor           = true;
            btnVolume.Cursor                = Cursors.Hand;
            btnVolume.Tag         = "静音";
            btnVolume.MouseEnter += BtnPlayControl_MouseEnter;
            btnVolume.MouseLeave += BtnPlayControl_MouseLeave;
            btnVolume.MouseClick += BtnPlayControl_MouseClick;
            //声音进度条

            //播放进度条

            //播放进度标签

            //截图按钮
            btnScreenShot.Name                  = "btnScreenShot";
            btnScreenShot.Size                  = new Size(30, 30);
            btnScreenShot.ShowBorder            = false;
            btnScreenShot.BaseColor             = Color.Transparent;
            btnScreenShot.BackgroundImage       = Properties.Resources.jietu1;
            btnScreenShot.BackgroundImageLayout = ImageLayout.Zoom;
            btnScreenShot.IsPureColor           = true;
            btnScreenShot.Cursor                = Cursors.Hand;
            btnScreenShot.Tag         = "截图";
            btnScreenShot.MouseEnter += BtnPlayControl_MouseEnter;
            btnScreenShot.MouseLeave += BtnPlayControl_MouseLeave;
            btnScreenShot.MouseClick += BtnPlayControl_MouseClick;
            //全屏按钮
            btnFullScreen.Name                  = "btnFullScreen";
            btnFullScreen.Size                  = new Size(30, 30);
            btnFullScreen.ShowBorder            = false;
            btnFullScreen.BaseColor             = Color.Transparent;
            btnFullScreen.BackgroundImage       = Properties.Resources.allSize1;
            btnFullScreen.BackgroundImageLayout = ImageLayout.Zoom;
            btnFullScreen.IsPureColor           = true;
            btnFullScreen.Cursor                = Cursors.Hand;
            btnFullScreen.Tag         = "全屏";
            btnFullScreen.MouseEnter += BtnPlayControl_MouseEnter;
            btnFullScreen.MouseLeave += BtnPlayControl_MouseLeave;
            btnFullScreen.MouseClick += BtnPlayControl_MouseClick;
            //列表按钮
            btnList.Name                  = "btnList";
            btnList.Size                  = new Size(30, 30);
            btnList.ShowBorder            = false;
            btnList.BaseColor             = Color.Transparent;
            btnList.BackgroundImage       = Properties.Resources.list1;
            btnList.BackgroundImageLayout = ImageLayout.Zoom;
            btnList.IsPureColor           = true;
            btnList.Cursor                = Cursors.Hand;
            btnList.Tag         = "列表";
            btnList.MouseEnter += BtnPlayControl_MouseEnter;
            btnList.MouseLeave += BtnPlayControl_MouseLeave;
            btnList.MouseClick += BtnPlayControl_MouseClick;
            //playPanel.DUIControls.AddRange(new LayeredSkin.DirectUI.DuiBaseControl[] {
            //    btnStop,btnPrev,btnPlay,btnNext,btnOpenFile,btnVolume,btnScreenShot,btnFullScreen,btnList
            //});
            playPanel.DUIControls.Add(btnStop);
            playPanel.DUIControls.Add(btnPrev);
            playPanel.DUIControls.Add(btnPlay);
            playPanel.DUIControls.Add(btnNext);
            playPanel.DUIControls.Add(btnOpenFile);
            playPanel.DUIControls.Add(btnVolume);
            playPanel.DUIControls.Add(btnScreenShot);
            playPanel.DUIControls.Add(btnFullScreen);
            playPanel.DUIControls.Add(btnList);
            #endregion

            #region 播放器列表控件添加
            listForm          = new PLayListForm();
            listForm.Size     = new Size(135, this.Height - 30);
            listForm.Location = new Point(this.Location.X + this.Width - 135, this.Location.Y + 30);

            List <Utils.PlayListEntity> playLists = new List <Utils.PlayListEntity>();
            //for (int i = 0; i < 20; i++)
            //{
            //    Utils.PlayListEntity ple = new Utils.PlayListEntity();
            //    ple.tvImgUrl = "视频图片地址" + i.ToString();
            //    ple.tvName = tvName + i.ToString();
            //    ple.tvUrl = tvUrl;
            //    ple.tvTimeLength = "12分钟";
            //    playLists.Add(ple);
            //}
            //盘丝视频
            for (int i = 0; i < 60; i++)
            {
                Utils.PlayListEntity ple = new Utils.PlayListEntity();
                ple.tvImgUrl     = "https://p.syasn.com/ps" + (1100 + i).ToString() + "+350";
                ple.tvName       = "盘丝视频:" + (1100 + i).ToString();
                ple.tvUrl        = "ps-ps" + (1100 + i).ToString();
                ple.tvTimeLength = "12分钟";
                playLists.Add(ple);
            }
            listForm.playList = playLists;
            listForm.plf      = this;
            #endregion
        }
Ejemplo n.º 25
0
        private void setDefaultStyle()
        {
            this.BackColor = Color.FromArgb(185, pes.pes.BackColor);
            if (pes.BackGroundSkin != null)
            {
                BackGroundSkin = pes.BackGroundSkin;
                this.BackColor = Color.Transparent;
            }
            btn_point.BaseColor = Color.Red;
            btn_cg.ForeColor    = Color.FromArgb(255, pes.pes.BackColor);
            layeredPanel_cg.BringToFront();
            //常规界面相关处理
            foreach (DuiBaseControl item in layeredPanel_cg.DUIControls)
            {
                switch (item.Name)
                {
                case "ck_qd":
                    Ck_AutoStart = item as DuiCheckBox;
                    Ck_AutoStart.CheckRectColor  = Color.FromArgb(155, pes.pes.BackColor);
                    Ck_AutoStart.CheckFlagColor  = Color.FromArgb(155, pes.pes.BackColor);
                    Ck_AutoStart.CheckedChanged += Ck_AutoStart_CheckedChanged;
                    Ck_AutoStart.Checked         = pes.pes.AutoStart;
                    break;

                case "rd_min":
                case "rd_close":
                    RadioButton_CloseMode = item as DuiRadioButton;
                    RadioButton_CloseMode.CheckRectColor  = Color.FromArgb(155, pes.pes.BackColor);
                    RadioButton_CloseMode.CheckFlagColor  = Color.FromArgb(155, pes.pes.BackColor);
                    RadioButton_CloseMode.CheckedChanged += RadioButton_CloseMode_CheckedChanged;
                    if ((pes.pes.CloseMode == "isClose") && RadioButton_CloseMode.Name == "rd_close")
                    {
                        (item as DuiRadioButton).Checked = true;
                    }
                    else if ((pes.pes.CloseMode == "isMin") && RadioButton_CloseMode.Name == "rd_min")
                    {
                        (item as DuiRadioButton).Checked = true;
                    }
                    else
                    {
                        (item as DuiRadioButton).Checked = false;
                    }
                    break;

                case "":

                    break;

                default:
                    break;
                }
            }
            //壁纸切换界面相关处理
            foreach (DuiBaseControl item in layeredPanel_qhbz.DUIControls)
            {
                switch (item.Name)
                {
                case "ck_qd":
                    Ck_IsSwitchWallpaper = item as DuiCheckBox;
                    Ck_IsSwitchWallpaper.CheckRectColor  = Color.FromArgb(155, pes.pes.BackColor);
                    Ck_IsSwitchWallpaper.CheckFlagColor  = Color.FromArgb(155, pes.pes.BackColor);
                    Ck_IsSwitchWallpaper.Checked         = pes.pes.IsSwitchWallpaper;
                    Ck_IsSwitchWallpaper.CheckedChanged += Ck_IsSwitchWallpaper_CheckedChanged;
                    break;

                case "db_timedw":
                    ComboBox_InterValTimeUnit                       = item as DuiComboBox;
                    ComboBox_InterValTimeUnit.BackColor             = Color.FromArgb(155, pes.pes.BackColor);
                    ComboBox_InterValTimeUnit.SelectedIndexChanged += ComboBox_InterValTimeUnit_SelectedIndexChanged;
                    if (pes.pes.InterValTime < 60)
                    {
                        ComboBox_InterValTimeUnit.SelectedIndex = 0;
                        TextBox_InterValTime.Text = pes.pes.InterValTime.ToString();
                    }
                    else if (pes.pes.InterValTime < 3600)
                    {
                        ComboBox_InterValTimeUnit.SelectedIndex = 1;
                        TextBox_InterValTime.Text = (pes.pes.InterValTime / 60).ToString();
                    }
                    else
                    {
                        ComboBox_InterValTimeUnit.SelectedIndex = 2;
                        TextBox_InterValTime.Text = (pes.pes.InterValTime / 3600).ToString();
                    }
                    break;

                case "tb_timeStr":
                    TextBox_InterValTime              = item as DuiTextBox;
                    TextBox_InterValTime.BackColor    = Color.FromArgb(155, pes.pes.BackColor);
                    TextBox_InterValTime.AutoHeight   = true;
                    TextBox_InterValTime.Invalidated += TextBox_InterValTime_TextChanged;
                    //TextBox_InterValTime.Text = pes.pes.InterValTime.ToString();
                    break;

                default:
                    if (item is DuiButton && item.Name.Contains("btn_"))
                    {
                        DuiButton Button_SwitchWallpaperType = item as DuiButton;
                        Button_SwitchWallpaperType.Cursor          = System.Windows.Forms.Cursors.Hand;
                        Button_SwitchWallpaperType.MouseClick     += Button_SwitchWallpaperType_MouseClick;
                        Button_SwitchWallpaperType.BaseColor       = Color.Transparent;
                        Button_SwitchWallpaperType.BackgroundImage = Properties.Resources.btn_n;
                        Button_SwitchWallpaperType.IsPureColor     = false;
                        Button_SwitchWallpaperType.Tag             = false.ToString();
                        foreach (var WallpaperType in pes.pes.SwitchWallpaperTypes)
                        {
                            if (item.Name.Replace("btn_", "") == WallpaperType.ToString())
                            {
                                Button_SwitchWallpaperType.Tag             = true.ToString();
                                Button_SwitchWallpaperType.BackgroundImage = Properties.Resources.btn_select_n;
                            }
                        }
                        Button_SwitchWallpaperType.BackgroundImageLayout = ImageLayout.Stretch;
                    }
                    break;
                }
            }
            //下载设置界面相关处理
            foreach (DuiBaseControl item in layeredPanel_xzsz.DUIControls)
            {
                switch (item.Name)
                {
                case "rd_SizeForThumb":
                case "rd_SizeFor1600900":
                case "rd_SizeFor1440900":
                case "rd_SizeFor12801024":
                case "rd_SizeFor1024768":
                case "rd_SizeFor1280800":
                    RadioButton_picSize = item as DuiRadioButton;
                    RadioButton_picSize.CheckFlagColor  = Color.FromArgb(155, pes.pes.BackColor);
                    RadioButton_picSize.CheckRectColor  = Color.FromArgb(155, pes.pes.BackColor);
                    RadioButton_picSize.CheckedChanged += RadioButton_picSize_CheckedChanged;
                    if ("rd_SizeFor" + (pes.pes.PicSize == "default" ? "Thumb" : pes.pes.PicSize) == item.Name)
                    {
                        RadioButton_picSize.Checked = true;
                    }
                    else
                    {
                        RadioButton_picSize.Checked = false;
                    }
                    break;

                case "text_downloadPath":
                    lb_downloadPath           = item as DuiTextBox;
                    lb_downloadPath.BackColor = Color.FromArgb(155, pes.pes.BackColor);
                    lb_downloadPath.Text      = (String.IsNullOrEmpty(pes.pes.DownloadPath) ? AppDomain.CurrentDomain.BaseDirectory + @"ImageWallpaper\" : pes.pes.DownloadPath);
                    break;

                case "btn_selectDownloadPath":
                    btn_selectDownloadPath             = item as DuiButton;
                    btn_selectDownloadPath.Cursor      = System.Windows.Forms.Cursors.Hand;
                    btn_selectDownloadPath.MouseClick += Btn_selectDownloadPath_MouseClick;
                    break;

                case "text_cachePath":
                    lb_cachePath           = item as DuiTextBox;
                    lb_cachePath.BackColor = Color.FromArgb(155, pes.pes.BackColor);
                    lb_cachePath.Text      = (String.IsNullOrEmpty(pes.pes.CachePath) ? AppDomain.CurrentDomain.BaseDirectory + @"CacheWallpaper\" : pes.pes.CachePath);
                    if (lb_nowCacheSize != null && lb_cachePath != null)
                    {
                        lb_nowCacheSize.Text = "当前缓存:" + GetDirectoryLength(lb_cachePath.Text) / (1024 * 1024) + "MB";
                    }

                    break;

                case "btn_selectCachePath":
                    btn_selectCachePath             = item as DuiButton;
                    btn_selectCachePath.Cursor      = System.Windows.Forms.Cursors.Hand;
                    btn_selectCachePath.MouseClick += Btn_selectCachePath_MouseClick;
                    break;

                case "lb_nowCacheSize":
                    lb_nowCacheSize = item as DuiLabel;
                    if (lb_cachePath != null && lb_nowCacheSize != null)
                    {
                        lb_nowCacheSize.Text = "当前缓存:" + GetDirectoryLength(lb_cachePath.Text) / (1024 * 1024) + "MB";
                    }
                    break;

                case "lb_clearCache":
                    lb_clearCache             = item as DuiLabel;
                    lb_clearCache.Cursor      = System.Windows.Forms.Cursors.Hand;
                    lb_clearCache.MouseClick += Lb_clearCache_MouseClick;
                    break;

                default:
                    break;
                }
            }
            //关于界面相关处理
            foreach (DuiBaseControl item in layeredPanel_gy.DUIControls)
            {
                switch (item.Name)
                {
                case "lb_ver":
                    lb_ver      = item as DuiLabel;
                    lb_ver.Text = pes.pes.VerNo;
                    break;

                case "btn_update":
                    btn_update             = item as DuiButton;
                    btn_update.Cursor      = System.Windows.Forms.Cursors.Hand;
                    btn_update.BaseColor   = Color.FromArgb(155, pes.pes.BackColor);
                    btn_update.MouseClick += Btn_update_MouseClick;
                    break;

                case "btn_sendyj":
                    btn_sendyj             = item as DuiButton;
                    btn_sendyj.Cursor      = System.Windows.Forms.Cursors.Hand;
                    btn_sendyj.BaseColor   = Color.FromArgb(155, pes.pes.BackColor);
                    btn_sendyj.MouseClick += Btn_sendyj_MouseClick;
                    break;

                case "lb_mxnr1":
                    lb_mxnr1             = item as DuiLabel;
                    lb_mxnr1.Cursor      = System.Windows.Forms.Cursors.Hand;
                    lb_mxnr1.MouseClick += Lb_mxnr1_MouseClick;
                    break;

                case "lb_mxnr2":
                    lb_mxnr2             = item as DuiLabel;
                    lb_mxnr2.Cursor      = System.Windows.Forms.Cursors.Hand;
                    lb_mxnr2.MouseClick += Lb_mxnr1_MouseClick;
                    break;

                case "lb_zzemail":
                    lb_zzemail             = item as DuiLabel;
                    lb_zzemail.Cursor      = System.Windows.Forms.Cursors.Hand;
                    lb_zzemail.MouseClick += Lb_zzemail_MouseClick;
                    break;

                default:
                    break;
                }
            }
        }
Ejemplo n.º 26
0
        private void dlTag_MouseEnter(object sender, EventArgs e)
        {
            DuiLabel dlb = sender as DuiLabel;

            dlb.ForeColor = defaultColor;
        }
Ejemplo n.º 27
0
        private void dlTag_MouseLeave(object sender, EventArgs e)
        {
            DuiLabel dlb = sender as DuiLabel;

            dlb.ForeColor = System.Drawing.Color.Black;
        }
Ejemplo n.º 28
0
        /// <summary>
        /// 添加图片列表
        /// </summary>
        /// <param name="imgInfos"></param>
        /// <returns></returns>
        public Boolean AddImgList(List <BridImg.ImageInfo> imgInfos)
        {
            if (imgInfos.Count == 0)
            {
                return(false);
            }
            int            thisWidth   = this.Width - 5;//减去滚动条宽度
            int            zWidth      = (int)(thisWidth / 3);
            int            zHeight     = (int)(thisWidth / 3 * 0.57);
            DuiBaseControl baseControl = new DuiBaseControl();

            baseControl.Size      = new Size(thisWidth, zHeight);
            baseControl.BackColor = Color.FromArgb(245, 245, 247);
            int    i      = 0;
            string baseID = "0";

            foreach (var imgInfo in imgInfos)
            {
                baseID = imgInfo.id.ToString();
                DuiBaseControl abaseControl = new DuiBaseControl();
                abaseControl.Size     = new Size(zWidth, zHeight);
                abaseControl.Location = new Point(i * zWidth, 0);
                abaseControl.Name     = "back_" + imgInfo.id.ToString();
                //背景图
                DuiPictureBox dp = new DuiPictureBox();
                dp.Size = new Size(zWidth - 4, zHeight - 4);
                int thisWidthScreen   = Screen.PrimaryScreen.Bounds.Width;
                int thisHeiightScreen = Screen.PrimaryScreen.Bounds.Height;
                dp.Tag = imgInfo.img_1280_1024;
                getImagePathByUIrlDelegate newg = new getImagePathByUIrlDelegate(PicDeal.DownloaImage);
                dp.BackgroundImage       = Image.FromFile(newg(imgInfo.url.Replace("__85", "300_161_100")));
                dp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
                dp.Name     = "back_" + imgInfo.id.ToString();
                dp.Location = new Point(2, 2);
                //dp.Cursor = System.Windows.Forms.Cursors.Hand;
                dp.MouseEnter += Dp_MouseEnter;
                dp.MouseLeave += Dp_MouseLeave;
                //dp.MouseClick += Dp_MouseClick;
                //图片说明
                DuiLabel imgTag = new DuiLabel();
                imgTag.TextRenderMode = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
                string ingTxt = (string.IsNullOrEmpty(imgInfo.utag) ? "" : imgInfo.utag);
                if (ingTxt.Length * 9 > zWidth)
                {
                    imgTag.Size     = new Size(zWidth - 4, 10 * 4);
                    imgTag.Location = new Point(2, zHeight - 43);
                }
                else
                {
                    imgTag.Size     = new Size(zWidth - 4, 10 * 2);
                    imgTag.Location = new Point(2, zHeight - 23);
                }
                imgTag.Font      = new Font("微软雅黑", 9F, FontStyle.Regular);
                imgTag.ForeColor = Color.White;
                imgTag.TextAlign = ContentAlignment.MiddleCenter;
                //imgTag.BackColor = Color.FromArgb(100, 0, 0, 0);
                imgTag.BackgroundImage       = Properties.Resources.mask_shadow;
                imgTag.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
                imgTag.Text        = imgInfo.utag;
                imgTag.Name        = "imgTag_" + imgInfo.id.ToString();
                imgTag.MouseLeave += Dp_MouseLeave;

                imgTag.Cursor = System.Windows.Forms.Cursors.Hand;
                //下载按钮
                DuiButton btn_Download = new DuiButton();
                btn_Download.Size                  = new Size(35, 35);
                btn_Download.Radius                = 35;
                btn_Download.Name                  = "btn_Download_" + imgInfo.id.ToString();
                btn_Download.Text                  = "";
                btn_Download.Location              = new Point(0, 0);
                btn_Download.Cursor                = System.Windows.Forms.Cursors.Hand;
                btn_Download.AdaptImage            = false;
                btn_Download.IsPureColor           = true;
                btn_Download.BaseColor             = Color.Transparent;
                btn_Download.BackgroundImage       = Properties.Resources.dl;
                btn_Download.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
                btn_Download.ShowBorder            = false;
                btn_Download.MouseClick           += Btn_Download_MouseClick;
                btn_Download.Tag         = "保存|" + imgInfo.url_thumb;
                btn_Download.MouseEnter += Btn_Download_MouseEnter;
                btn_Download.MouseLeave += Btn_Download_MouseLeave;
                //收藏按钮
                DuiButton btn_sc = new DuiButton();
                btn_sc.Location              = new Point(35, 0);
                btn_sc.Size                  = new Size(35, 35);
                btn_sc.Text                  = "";
                btn_sc.Cursor                = System.Windows.Forms.Cursors.Hand;
                btn_sc.AdaptImage            = false;
                btn_sc.Name                  = "btn_Sc_" + imgInfo.id.ToString();
                btn_sc.BaseColor             = Color.Transparent;//Color.FromArgb(100, 0, 0, 0);
                btn_sc.Radius                = 35;
                btn_sc.ShowBorder            = false;
                btn_sc.BackgroundImage       = Properties.Resources.sc0;
                btn_sc.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
                btn_sc.MouseClick           += Btn_Sc_MouseClick;
                btn_sc.IsPureColor           = true;
                btn_sc.Tag         = "收藏|" + getSetUrl(imgInfo);
                btn_sc.MouseEnter += Btn_Download_MouseEnter;
                btn_sc.MouseLeave += Btn_Download_MouseLeave;
                //设置按钮
                DuiButton btn_Setting = new DuiButton();
                btn_Setting.Location              = new Point(70, 0);
                btn_Setting.Size                  = new Size(35, 35);
                btn_Setting.Text                  = "";
                btn_Setting.Cursor                = System.Windows.Forms.Cursors.Hand;
                btn_Setting.AdaptImage            = false;
                btn_Setting.Name                  = "btn_Setting_" + imgInfo.id.ToString();
                btn_Setting.BaseColor             = Color.Transparent;//Color.FromArgb(100, 0, 0, 0);
                btn_Setting.Radius                = 35;
                btn_Setting.Tag                   = "设置|" + getSetUrl(imgInfo);
                btn_Setting.ShowBorder            = false;
                btn_Setting.BackgroundImage       = Properties.Resources.set;
                btn_Setting.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
                btn_Setting.MouseClick           += Btn_Setting_MouseClick;
                btn_Setting.IsPureColor           = true;
                btn_Setting.MouseEnter           += Btn_Download_MouseEnter;
                btn_Setting.MouseLeave           += Btn_Download_MouseLeave;
                //按钮底层控件
                DuiBaseControl btnBaseControl = new DuiBaseControl();
                btnBaseControl.Size      = new Size(zWidth / 3, 35);
                btnBaseControl.Cursor    = System.Windows.Forms.Cursors.Hand;
                btnBaseControl.Location  = new Point(zWidth / 3 * 2 - 12, zHeight - 52);
                btnBaseControl.BackColor = Color.Transparent;
                //btnBaseControl.MouseEnter += Dp_MouseEnter;
                btnBaseControl.MouseLeave += Dp_MouseLeave;
                btnBaseControl.MouseMove  += BtnBaseControl_MouseMove;
                btnBaseControl.Controls.Add(btn_Download);
                btnBaseControl.Controls.Add(btn_sc);
                btnBaseControl.Controls.Add(btn_Setting);
                btnBaseControl.Name    = "btnBaseControl_" + imgInfo.id.ToString();
                btnBaseControl.Visible = false;

                Borders baseBorder = new Borders(baseControl);
                baseBorder.BottomWidth = 2;
                baseBorder.TopWidth    = 2;
                baseBorder.LeftWidth   = 2;
                baseBorder.RightWidth  = 2;

                abaseControl.Borders = baseBorder;
                abaseControl.Controls.Add(dp);
                abaseControl.Controls.Add(imgTag);
                abaseControl.Controls.Add(btnBaseControl);
                baseControl.Controls.Add(abaseControl);
                i++;
            }
            baseControl.Name = "imgListBaseControl_" + baseID;
            Items.Add(baseControl);
            //更新列表
            RefreshList();
            GC.Collect();
            return(true);
        }
Ejemplo n.º 29
0
        /// <summary>
        /// 添加列表
        /// </summary>
        /// <param name="imgInfos"></param>
        /// <returns></returns>
        public Boolean AddList(List <Utils.PlayListEntity> tvInfos)
        {
            if (tvInfos.Count == 0)
            {
                return(false);
            }
            int    thisWidth = this.Width - 6;//减去滚动条宽度
            int    zWidth    = thisWidth;
            int    zHeight   = (int)(thisWidth * 0.2);
            int    i         = 0;
            string baseUrl   = "0";

            foreach (Utils.PlayListEntity tvInfo in tvInfos)
            {
                DuiBaseControl baseControl = new DuiBaseControl();
                baseControl.Size      = new Size(thisWidth, zHeight);
                baseControl.BackColor = defaultColor;//Color.FromArgb(245, 245, 247);
                baseUrl = tvInfo.tvUrl.ToString();
                DuiBaseControl abaseControl = new DuiBaseControl();
                abaseControl.Size = new Size(zWidth, zHeight);
                //abaseControl.Location = new Point(3, i * zHeight);
                abaseControl.Name      = "back_" + tvInfo.tvUrl.ToString();
                abaseControl.BackColor = Color.Transparent;
                //视频名称
                DuiLabel imgTag = new DuiLabel();
                imgTag.TextRenderMode = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
                string ingTxt = tvInfo.tvName;
                imgTag.Size      = new Size(zWidth - 4, zHeight - 4);
                imgTag.Location  = new Point(2, 2);
                imgTag.Font      = new Font("微软雅黑", 10F, FontStyle.Bold);
                imgTag.ForeColor = Color.White;
                imgTag.BackColor = Color.Transparent;
                imgTag.TextAlign = ContentAlignment.MiddleCenter;
                //imgTag.BackColor = Color.FromArgb(100, 0, 0, 0);
                //imgTag.BackgroundImage = Properties.Resources.mask_shadow;
                //imgTag.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
                imgTag.Text        = ingTxt;
                imgTag.Name        = "imgTag_" + tvInfo.tvUrl.ToString();
                imgTag.MouseLeave += Dp_MouseLeave;
                imgTag.Cursor      = System.Windows.Forms.Cursors.Hand;
                imgTag.MouseClick += ImgTag_MouseClick;

                Borders baseBorder = new Borders(baseControl);
                baseBorder.BottomWidth = 2;
                baseBorder.TopWidth    = 2;
                baseBorder.LeftWidth   = 2;
                baseBorder.RightWidth  = 2;

                abaseControl.Borders = baseBorder;
                abaseControl.Controls.Add(imgTag);
                baseControl.Controls.Add(abaseControl);

                baseControl.Name = "imgListBaseControl_" + baseUrl;
                Items.Add(baseControl);
                //更新列表
                RefreshList();
                i++;
            }
            GC.Collect();
            return(true);
        }
Ejemplo n.º 30
0
        /// <summary>
        /// 添加图片列表
        /// </summary>
        /// <param name="imgInfos"></param>
        /// <returns></returns>
        public Boolean AddImgList(List <Entity.MovieListEntity.DataItem> imgInfos)
        {
            if (imgInfos.Count == 0)
            {
                return(false);
            }
            int            thisWidth   = this.Width - 5;//减去滚动条宽度
            int            zWidth      = (int)(thisWidth / 3);
            int            zHeight     = (int)(thisWidth / 3 * 0.57);
            DuiBaseControl baseControl = new DuiBaseControl();

            baseControl.Size      = new Size(thisWidth, zHeight);
            baseControl.BackColor = Color.FromArgb(245, 245, 247);
            int    i      = 0;
            string baseID = "0";

            foreach (var imgInfo in imgInfos)
            {
                //EDate.DataItem newImgInfo = isValidImgInfo(imgInfo);
                baseID = imgInfo.videoID.ToString();
                DuiBaseControl abaseControl = new DuiBaseControl();
                abaseControl.Size     = new Size(zWidth, zHeight);
                abaseControl.Location = new Point(i * zWidth, 0);
                abaseControl.Name     = "back_" + imgInfo.videoID.ToString();
                //背景图
                DuiPictureBox dp = new DuiPictureBox();
                dp.Size = new Size(zWidth - 4, zHeight - 4);
                int thisWidthScreen   = Screen.PrimaryScreen.Bounds.Width;
                int thisHeiightScreen = Screen.PrimaryScreen.Bounds.Height;
                dp.Tag = imgInfo.photo;
                getImagePathByUIrlDelegate newg = new getImagePathByUIrlDelegate(PicDeal.DownloaImage);
                dp.BackgroundImage       = Image.FromFile(newg(imgInfo.photo));
                dp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
                dp.Name     = "back_" + imgInfo.videoID.ToString();
                dp.Location = new Point(2, 2);
                //dp.Cursor = System.Windows.Forms.Cursors.Hand;
                dp.MouseEnter += Dp_MouseEnter;
                dp.MouseLeave += Dp_MouseLeave;
                //dp.MouseClick += Dp_MouseClick;
                //视频名称
                DuiLabel imgTag = new DuiLabel();
                imgTag.TextRenderMode = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
                string ingTxt = (string.IsNullOrEmpty(imgInfo.videoName) ? imgInfo.videoType : imgInfo.videoName);
                if (ingTxt.Length * 12 > zWidth)
                {
                    imgTag.Size     = new Size(zWidth - 4, 12 * 4);
                    imgTag.Location = new Point(2, zHeight - 48);
                }
                else
                {
                    imgTag.Size     = new Size(zWidth - 4, 12 * 2);
                    imgTag.Location = new Point(2, zHeight - 24);
                }
                imgTag.Font      = new Font("微软雅黑", 9F, FontStyle.Regular);
                imgTag.ForeColor = Color.White;
                imgTag.TextAlign = ContentAlignment.MiddleCenter;
                //imgTag.BackColor = Color.FromArgb(100, 0, 0, 0);
                imgTag.BackgroundImage       = Properties.Resources.mask_shadow;
                imgTag.BackColor             = Color.FromArgb(125, 255, 92, 138);
                imgTag.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
                imgTag.Text        = ingTxt;
                imgTag.Name        = "imgTag_" + imgInfo.videoID.ToString();
                imgTag.MouseLeave += Dp_MouseLeave;
                imgTag.Cursor      = System.Windows.Forms.Cursors.Hand;
                //视频时长
                DuiLabel tvLength = new DuiLabel();
                tvLength.TextRenderMode = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
                string tvTimeStr = "上架时间:";
                if (!string.IsNullOrEmpty(imgInfo.onDate))
                {
                    tvTimeStr = "上架时间:" + imgInfo.onDate;
                }
                tvLength.Size      = new Size(tvTimeStr.Length * 12, 12 * 2);
                tvLength.Location  = new Point(zWidth - tvTimeStr.Length * 12 - 2, 2);
                tvLength.Font      = new Font("微软雅黑", 9F, FontStyle.Regular);
                tvLength.ForeColor = Color.White;
                tvLength.TextAlign = ContentAlignment.MiddleCenter;
                //imgTag.BackColor = Color.FromArgb(100, 0, 0, 0);
                tvLength.BackgroundImage       = Properties.Resources.mask_shadow;
                tvLength.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
                tvLength.Text        = tvTimeStr;
                tvLength.Name        = "tvLength_" + imgInfo.videoID.ToString();
                tvLength.MouseLeave += Dp_MouseLeave;
                tvLength.Cursor      = System.Windows.Forms.Cursors.Hand;
                //播放按钮
                DuiButton btn_Download = new DuiButton();
                btn_Download.Size                  = new Size(35, 35);
                btn_Download.Radius                = 35;
                btn_Download.Name                  = "btn_Download_" + imgInfo.videoID.ToString();
                btn_Download.Text                  = "";
                btn_Download.Location              = new Point((zWidth - 20 - 35) / 2, (zHeight - 20 - 35) / 2);
                btn_Download.Cursor                = System.Windows.Forms.Cursors.Hand;
                btn_Download.AdaptImage            = false;
                btn_Download.IsPureColor           = true;
                btn_Download.BaseColor             = Color.Transparent;
                btn_Download.BackgroundImage       = Properties.Resources.play1;
                btn_Download.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
                btn_Download.ShowBorder            = false;
                btn_Download.MouseClick           += Btn_Download_MouseClick;
                btn_Download.Tag         = imgInfo;
                btn_Download.MouseEnter += Btn_Download_MouseEnter;
                btn_Download.MouseLeave += Btn_Download_MouseLeave;
                //收藏次数
                DuiButton btn_sc = new DuiButton();
                btn_sc.Location   = new Point(0, 0);
                btn_sc.Size       = new Size(30, 30);
                btn_sc.Text       = "";
                btn_sc.Cursor     = System.Windows.Forms.Cursors.Hand;
                btn_sc.AdaptImage = false;
                btn_sc.Name       = "btn_Sc_" + imgInfo.videoID.ToString();
                btn_sc.BaseColor  = Color.Transparent;//Color.FromArgb(100, 0, 0, 0);
                //btn_sc.Radius = 35;
                btn_sc.ShowBorder            = false;
                btn_sc.BackgroundImage       = Properties.Resources.sc0;
                btn_sc.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
                btn_sc.IsPureColor           = true;
                btn_sc.Tag         = imgInfo;
                btn_sc.MouseEnter += Btn_Download_MouseEnter;
                btn_sc.MouseLeave += Btn_Download_MouseLeave;
                DuiLabel dltxt = new DuiLabel();
                dltxt.Text      = imgInfo.actorName.ToString();
                dltxt.Size      = new Size(30, 16);
                dltxt.ForeColor = Color.White;
                dltxt.Location  = new Point(30, 7);
                dltxt.BackColor = Color.Transparent;
                DuiBaseControl scControl = new DuiBaseControl();
                scControl.Name     = "scControl_" + imgInfo.videoID.ToString();
                scControl.Size     = new Size(60, 30);
                scControl.Location = new Point(zWidth - 20 - 60, zHeight - 20 - 30);
                scControl.Controls.Add(btn_sc);
                scControl.Controls.Add(dltxt);
                //查看次数
                DuiButton btn_Setting = new DuiButton();
                btn_Setting.Location   = new Point(0, 0);
                btn_Setting.Size       = new Size(30, 30);
                btn_Setting.Text       = "";
                btn_Setting.Cursor     = System.Windows.Forms.Cursors.Hand;
                btn_Setting.AdaptImage = false;
                btn_Setting.Name       = "btn_Setting_" + imgInfo.videoID.ToString();
                btn_Setting.BaseColor  = Color.Transparent;//Color.FromArgb(100, 0, 0, 0);
                //btn_Setting.Radius = 35;
                btn_Setting.Tag                   = imgInfo;
                btn_Setting.ShowBorder            = false;
                btn_Setting.BackgroundImage       = Properties.Resources.eye;
                btn_Setting.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
                btn_Setting.IsPureColor           = true;
                btn_Setting.MouseEnter           += Btn_Download_MouseEnter;
                btn_Setting.MouseLeave           += Btn_Download_MouseLeave;
                DuiLabel dlatxt = new DuiLabel();
                dlatxt.Text      = imgInfo.videoTypeID.ToString();
                dlatxt.Size      = new Size(30, 16);
                dlatxt.Location  = new Point(30, 7);
                dlatxt.BackColor = Color.Transparent;
                dlatxt.ForeColor = Color.White;
                DuiBaseControl seeControl = new DuiBaseControl();
                seeControl.Name     = "seeControl_" + imgInfo.videoID.ToString();
                seeControl.Size     = new Size(60, 30);
                seeControl.Location = new Point(0, zHeight - 20 - 30);
                seeControl.Controls.Add(btn_Setting);
                seeControl.Controls.Add(dlatxt);
                //按钮底层控件
                DuiBaseControl btnBaseControl = new DuiBaseControl();
                btnBaseControl.Size        = new Size(zWidth - 20, zHeight - 20);
                btnBaseControl.Cursor      = System.Windows.Forms.Cursors.Hand;
                btnBaseControl.Location    = new Point(10, 10);
                btnBaseControl.BackColor   = Color.Transparent;
                btnBaseControl.MouseLeave += Dp_MouseLeave;
                btnBaseControl.MouseMove  += BtnBaseControl_MouseMove;
                btnBaseControl.Controls.Add(btn_Download);
                btnBaseControl.Controls.Add(scControl);
                btnBaseControl.Controls.Add(seeControl);
                btnBaseControl.Name    = "btnBaseControl_" + imgInfo.videoID.ToString();
                btnBaseControl.Visible = false;

                Borders baseBorder = new Borders(baseControl);
                baseBorder.BottomWidth = 2;
                baseBorder.TopWidth    = 2;
                baseBorder.LeftWidth   = 2;
                baseBorder.RightWidth  = 2;

                abaseControl.Borders = baseBorder;
                abaseControl.Controls.Add(dp);
                abaseControl.Controls.Add(imgTag);
                abaseControl.Controls.Add(tvLength);
                abaseControl.Controls.Add(btnBaseControl);
                baseControl.Controls.Add(abaseControl);
                i++;
            }
            baseControl.Name = "imgListBaseControl_" + baseID;
            Items.Add(baseControl);
            //更新列表
            RefreshList();
            GC.Collect();
            return(true);
        }