/// <summary>
 /// 1.开始列表获取
 /// </summary>
 /// <param name="pageNum"></param>
 /// <param name="typeNum"></param>
 /// <param name="iType"></param>
 public ListStart(int pageNum, int typeNum, LiuXingType iType)
 {
     // 得到地址
     var path = ListPath.GetListHttpPath(pageNum, typeNum, iType);
     if (String.IsNullOrEmpty(path)) return;
     // 开始载入
     StartList(path, iType);
 }
        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()));

            }
        }
        public DisPlayList(LiuXingType iType)
        {
            Size = new System.Drawing.Size(400, 60);
            BackColor = PublicStatic.FontColor[1];
            if (iType.Data.IsEmpty()) return;
            Tag = iType.Data;

            // 影片海报
            if (!iType.Img.IsEmpty())
            {
                try
                {
                    Controls.Add(new EPicBox
                    {
                        Size = new System.Drawing.Size(40, 60),
                        BackColor = PublicStatic.FontColor[1],
                        Image = iType.Img,
                        SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
                    });
                }
                catch
                {
                }
            }

            // 影片标题
            if (iType.Data.Name.IsNotNullOrEmpty())
            {
                var tempname = iType.Data.Name;
                if (tempname.Contains("/"))
                {
                    tempname = tempname.Split("/".ToCharArray())[0];
                }
                new HDarge(
                    this,
                    tempname,
                    new System.Drawing.Font(PublicStatic.MainFont, 22F),
                    new System.Drawing.Size(244, 42),
                    new System.Drawing.Point(60, 10),
                    PublicStatic.MainColor[PublicStatic.MainIndex], System.Drawing.Color.Transparent,
                    System.Drawing.ContentAlignment.BottomLeft, System.Windows.Forms.AnchorStyles.Top
                    );
            }

            // 滚轮聚焦
            if (string.IsNullOrEmpty(PublicStatic.SearchBox.Text))
            {
                PublicStatic.LiuXingCon.Invoke(
                new System.Windows.Forms.MethodInvoker
                    (() => PublicStatic.LiuXingCon.Focus()));

            }
        }
 /// <summary>
 /// 2.开始列表获取
 /// </summary>
 /// <param name="path"></param>
 /// <param name="iType"></param>
 public static void StartList(string path, LiuXingType iType)
 {
     if (!String.IsNullOrEmpty(path))
     {
         // 解析数据
         using (
             var datadown = new WebClient
                 {
                     Encoding = iType.Encoding,
                     Proxy = iType.Proxy
                 })
         {
             datadown.DownloadStringAsync(new Uri(path), iType);
             datadown.DownloadStringCompleted += Datadown_DownloadStringCompleted;
         }
     }
 }
 /// <summary>
 /// 解析地址并启动复制或者点播
 /// </summary>
 /// <param name="resultstr"></param>
 /// <param name="iType"></param>
 public static void GetThisDrl(string resultstr, LiuXingType iType)
 {
     if (string.IsNullOrEmpty(resultstr) || iType == null) return;
     // 二次解析地址
     iType.Data.Drl = ListFile.JieUrls(resultstr, iType);
     if (iType.Data.Drl == null || iType.Data.Drl.Count <= 0) return;
     // 判断是否是执行复制地址
     if (iType.IsCopy)
     {
         Pub.CopyThisUrl(iType.Data.Drl);
     }
         // 判断是否是执行点播地址
     else
     {
         // 智能判断适当的点播地址
         var currentUrl = ListVod.GetVodUrl(iType);
         if (!string.IsNullOrEmpty(currentUrl))
         {
             // 启动点播
             Pub.StartToVod(currentUrl);
         }
     }
 }
 /// <summary>
 /// 开始下载链接地址页面数据
 /// </summary>
 /// <param name="isCopy"></param>
 /// <param name="iType"></param>
 public static void GetThisUrl(bool isCopy, LiuXingType iType)
 {
     if (iType == null) return;
     if (iType.Data == null) return;
     if (string.IsNullOrEmpty(iType.Data.Url)) return;
     using (
         var urldown = new System.Net.WebClient
             {
                 Encoding = iType.Encoding,
                 Proxy = iType.Proxy
             })
     {
         var iClass = new LiuXingType
             {
                 Type = iType.Type,
                 Encoding = iType.Encoding,
                 Proxy = iType.Proxy,
                 Data = iType.Data,
                 IsCopy = isCopy
             };
         urldown.DownloadStringAsync(new System.Uri(iType.Data.Url), iClass);
         urldown.DownloadStringCompleted += urldown_DownloadStringCompleted;
     }
 }
        /// <summary>
        /// 二次解析资源地址
        /// </summary>
        /// <param name="vodUrlStr"></param>
        /// <param name="iType"></param>
        /// <returns></returns>
        public static System.Collections.Generic.List<string> JieUrls(string vodUrlStr, LiuXingType iType)
        {
            var tagurls = new System.Collections.Generic.List<string>();
            switch (iType.Type)
            {
                    // 迅播影院正常列表
                case LiuXingEnum.XunboListItem:
                    {
                        #region case LiuXingEnum.XunboListItem:

                        var urllists = vodUrlStr.GetSingle("<script>var GvodUrls = \"", "\";</script>");
                        if (string.IsNullOrEmpty(urllists)) return null;
                        if (urllists.Contains("###"))
                        {
                            var urltemps = urllists.Split("###".ToCharArray());
                            for (var i = 0; i < urltemps.Length; i++)
                            {
                                tagurls.Add(System.Web.HttpUtility.HtmlDecode(urltemps[i]));
                            }
                        }
                        else
                        {
                            tagurls.Add(System.Web.HttpUtility.HtmlDecode(urllists));
                        }

                        #endregion
                    }
                    break;
                    // 人人影视正常列表
                case LiuXingEnum.YYetListItem:
                    {
                        #region case LiuXingEnum.YYetListItem:

                        var urllists =
                            vodUrlStr.GetSingle("<ul class=\"resod_list\" season=\"0\" style=\"display:none;\">",
                                                "</ul>");
                        if (string.IsNullOrEmpty(urllists)) return null;
                        if (urllists.Contains("type=\"ed2k\""))
                        {
                            var orignli = urllists.GetValue("type=\"ed2k\" href=\"",
                                                            "\" target=\"_blank\">");
                            if (orignli == null || orignli.Count <= 0) return null;
                            foreach (var v in orignli)
                            {
                                tagurls.Add(System.Web.HttpUtility.HtmlDecode(v));
                            }
                        }
                        if (urllists.Contains("thunder=\""))
                        {
                            var orignli = urllists.GetValue("thunder=\"", "\" king=\"\">");
                            if (orignli == null || orignli.Count <= 0) return null;
                            foreach (var v in orignli)
                            {
                                tagurls.Add(System.Web.HttpUtility.HtmlDecode(v));
                            }
                        }

                        #endregion
                    }
                    break;
            }
            return tagurls;
        }
        /// <summary>
        /// 点击观看按钮 - Playbtn_MouseClick
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private static void Playbtn_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            #region 点击观看按钮 - Playbtn_MouseClick

            if (e.Button != System.Windows.Forms.MouseButtons.Left || e.Clicks < 0) return;
            var ser = sender as LButton;
            if (ser == null) return;
            var iType = ser.Tag as LiuXingType;
            if (iType == null) return;
            var tag = ser.Parent.Parent.Tag as LiuXingData;
            if (tag == null) return;
            // 如果有点播资源就直接点播
            if (tag.Drl != null && tag.Drl.Count > 0)
            {
                var currentUrl = tag.Drl[tag.Drl.Count - 1];
                if (!string.IsNullOrEmpty(currentUrl))
                {
                    Pub.StartToVod(currentUrl);
                }
            }
            else
            {
                // 否则直接执行获取连接并点播
                var iClass = new LiuXingType
                    {
                        Type = iType.Type,
                        Proxy = iType.Proxy,
                        Encoding = iType.Encoding,
                        Data = tag
                    };
                ListUrl.GetThisUrl(false, iClass);
            }

            #endregion
        }
        /// <summary>
        /// 点击复制按钮 - Copybtn_MouseClick
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private static void Copybtn_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            #region 点击复制按钮 - Copybtn_MouseClick

            if (e.Button != System.Windows.Forms.MouseButtons.Left || e.Clicks < 0) return;
            var ser = sender as LButton;
            if (ser == null) return;
            var iType = ser.Tag as LiuXingType;
            if (iType == null) return;
            var tag = ser.Parent.Parent.Tag as LiuXingData;
            if (tag == null) return;
            // 如果有复制的就直接复制
            if (tag.Drl != null && tag.Drl.Count > 0)
            {
                Pub.CopyThisUrl(tag.Drl);
            }
            else
            {
                // 否则执行获取连接并复制链接
                var iClass = new LiuXingType
                    {
                        Type = iType.Type,
                        Proxy = iType.Proxy,
                        Encoding = iType.Encoding,
                        Data = tag
                    };
                ListUrl.GetThisUrl(true, iClass);
            }

            #endregion
        }
        public DisPlayTile(LiuXingType iType)
        {
            Size = new System.Drawing.Size(406, 210);
            BackColor = PublicStatic.FontColor[1];
            if (iType.Data.IsEmpty()) return;
            Tag = iType.Data;

            // 影片得分
            if (iType.Data.Cos.IsNotNullOrEmpty())
            {
                new HDarge(
                    this,
                    iType.Data.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),
                    PublicStatic.FontColor[1], PublicStatic.MainColor[PublicStatic.MainIndex],
                    System.Drawing.ContentAlignment.MiddleCenter, System.Windows.Forms.AnchorStyles.Top
                    );
            }

            // 影片海报
            if (!iType.Img.IsEmpty())
            {
                try
                {
                    Controls.Add(new EPicBox
                        {
                            Size = new System.Drawing.Size(150, 210),
                            BackColor = PublicStatic.FontColor[1],
                            Image = iType.Img,
                            SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
                        });
                }
                catch
                {
                }
            }

            // 影片标题
            if (iType.Data.Name.IsNotNullOrEmpty())
            {
                var tempname = iType.Data.Name;
                if (tempname.Contains("/"))
                {
                    tempname = tempname.Split("/".ToCharArray())[0];
                }
                new HDarge(
                    this,
                    tempname,
                    new System.Drawing.Font(PublicStatic.MainFont, 22F),
                    new System.Drawing.Size(244, 42),
                    new System.Drawing.Point(150, 10),
                    PublicStatic.MainColor[PublicStatic.MainIndex], System.Drawing.Color.Transparent,
                    System.Drawing.ContentAlignment.BottomCenter, System.Windows.Forms.AnchorStyles.Top
                    );
                // 影片横线
                new HDarge(
                    this,
                    "",
                    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, PublicStatic.MainColor[PublicStatic.MainIndex],
                    System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top
                    );
            }

            // 影片演员
            if (iType.Data.Car.IsNotNullOrEmpty())
            {
                new HDarge(
                    this,
                    "主演:" + iType.Data.Car,
                    new System.Drawing.Font(PublicStatic.MainFont, 12F),
                    new System.Drawing.Size(248, 45),
                    new System.Drawing.Point(150 + 6, 44 + 24),
                    PublicStatic.FontColor[0], System.Drawing.Color.Transparent,
                    System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top
                    );
            }

            // 影片年代
            if (iType.Data.Tim.IsNotNullOrEmpty())
            {
                new HDarge(
                    this,
                    "年代:" + iType.Data.Tim,
                    new System.Drawing.Font(PublicStatic.MainFont, 12F),
                    new System.Drawing.Size(120, 25),
                    new System.Drawing.Point(150 + 6, 44 + 24 + 45),
                    PublicStatic.FontColor[0], System.Drawing.Color.Transparent,
                    System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top
                    );
            }

            // 影片地区
            if (iType.Data.Loc.IsNotNullOrEmpty())
            {
                new HDarge(
                    this,
                    "地区:" + iType.Data.Loc,
                    new System.Drawing.Font(PublicStatic.MainFont, 12F),
                    new System.Drawing.Size(120, 25),
                    new System.Drawing.Point(150 + 6 + 120, 44 + 24 + 45),
                    PublicStatic.FontColor[0], System.Drawing.Color.Transparent,
                    System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top
                    );
            }

            // 影片类型
            if (iType.Data.Typ.IsNotNullOrEmpty())
            {
                new HDarge(
                    this,
                    "类型:" + iType.Data.Typ,
                    new System.Drawing.Font(PublicStatic.MainFont, 12F),
                    new System.Drawing.Size(120, 25),
                    new System.Drawing.Point(150 + 6, 44 + 24 + 45 + 25),
                    PublicStatic.FontColor[0], System.Drawing.Color.Transparent,
                    System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top
                    );
            }

            // 影片更新
            if (iType.Data.Upt.IsNotNullOrEmpty())
            {
                new HDarge(
                    this,
                    "更新:" + iType.Data.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),
                    PublicStatic.FontColor[0], System.Drawing.Color.Transparent,
                    System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top
                    );
            }

            // 影片点播
            if (iType.Data.HDs.IsNotNullOrEmpty())
            {
                new LButton
                    (
                    this,
                    1,
                    iType.Data.HDs,
                    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),
                    PublicStatic.MainColor[PublicStatic.MainIndex],
                    PublicStatic.FontColor[1],
                    PublicStatic.FontColor[1],
                    PublicStatic.MainColor[PublicStatic.MainIndex],
                    PublicStatic.MainColor[PublicStatic.MainIndex],
                    PublicStatic.FontColor[1],
                    System.Windows.Forms.AnchorStyles.Top
                    ) {Tag = iType}.MouseClick += Playbtn_MouseClick;

                // 影片复制
                new LButton
                    (
                    this,
                    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),
                    PublicStatic.MainColor[PublicStatic.MainIndex],
                    PublicStatic.FontColor[1],
                    PublicStatic.FontColor[1],
                    PublicStatic.MainColor[PublicStatic.MainIndex],
                    PublicStatic.MainColor[PublicStatic.MainIndex],
                    PublicStatic.FontColor[1],
                    System.Windows.Forms.AnchorStyles.Top
                    ) {Tag = iType}.MouseClick += Copybtn_MouseClick;
            }

            // 滚轮聚焦
            if (string.IsNullOrEmpty(PublicStatic.SearchBox.Text))
            {
                PublicStatic.LiuXingCon.Invoke(
                new System.Windows.Forms.MethodInvoker
                    (() => PublicStatic.LiuXingCon.Focus()));

            }
        }
        /// <summary>
        /// AnalyzeData - 解析数据数据模型
        /// </summary>
        /// <param name="celllistr"></param>
        /// <param name="iType"></param>
        /// <returns></returns>
        public static LiuXingData AnalyzeData(string celllistr, LiuXingType iType)
        {
            #region AnalyzeData - 解析数据数据模型

            if (string.IsNullOrEmpty(celllistr)) return null;
            if (iType == null) return null;
            var cellitem = new LiuXingData();
            try
            {
                switch (iType.Type)
                {
                        // 迅播影院正常列表
                    case LiuXingEnum.XunboListItem:
                        {
                            #region case LiuXingEnum.XunboListItem:

                            // 电影名称
                            var tempname = celllistr.GetSingle("alt=\"", "\" /><em");
                            if (!string.IsNullOrEmpty(tempname))
                            {
                                cellitem.Name = tempname;
                            }
                            // 电影网址
                            var tempurl = celllistr.GetSingle("<a href=\"", "\" class=\"i\"><img");
                            if (!string.IsNullOrEmpty(tempurl))
                            {
                                cellitem.Url = PublicStatic.LiuXingYuName + tempurl;
                            }
                            // 电影封面
                            var tempimg = celllistr.GetSingle("src=\"", "\" alt=");
                            if (!string.IsNullOrEmpty(tempimg))
                            {
                                cellitem.Img = tempimg;
                            }
                            // 电影质量
                            var tempHDs = celllistr.GetSingle("class=\"v\">", "</em></a");
                            if (!string.IsNullOrEmpty(tempHDs))
                            {
                                cellitem.HDs = tempHDs;
                            }
                            // 电影评分
                            var tempCos = celllistr.GetSingle("<em class=\"fenshu\">", "</sup></em>");
                            if (!string.IsNullOrEmpty(tempCos))
                            {
                                cellitem.Cos = tempCos.Replace("<sup>", "");
                            }
                            // 电影地区
                            var tempLoc = celllistr.GetSingle("<b>地区:", "</b></p>");
                            if (!string.IsNullOrEmpty(tempLoc))
                            {
                                cellitem.Loc = tempLoc.Replace(" ", "");
                            }
                            // 电影年代
                            var tempTim = celllistr.GetSingle("</a><em>", "</em></h1>");
                            if (!string.IsNullOrEmpty(tempTim))
                            {
                                cellitem.Tim = tempTim.Replace(" ", "");
                            }
                            // 电影演员
                            var tempCar = celllistr.GetSingle("<p>主演:", "</p>");
                            if (!string.IsNullOrEmpty(tempCar))
                            {
                                cellitem.Car = tempCar.Replace(',', '、');
                            }
                            // 电影类型
                            var tempTyp = celllistr.GetSingle("类型:", "</b><b>");
                            if (!string.IsNullOrEmpty(tempTyp))
                            {
                                cellitem.Typ = tempTyp;
                            }
                            // 电影更新
                            var tempUpt = celllistr.GetSingle("<b>更新:", "</b></p>");
                            if (!string.IsNullOrEmpty(tempUpt))
                            {
                                cellitem.Upt = tempUpt.Replace("-", "~");
                            }

                            #endregion
                        }
                        break;
                        // 人人影视正常列表
                    case LiuXingEnum.YYetListItem:
                        {
                            #region case LiuXingEnum.YYetListItem:

                            // 影片大类
                            var tempmpe = celllistr.GetSingle(">【", "】<strong>");
                            if (!string.IsNullOrEmpty(tempmpe))
                            {
                                cellitem.Mpe = tempmpe;
                            }
                            // 电影名称
                            var tempname = celllistr.GetSingle("<strong>", "》");
                            if (!string.IsNullOrEmpty(tempname))
                            {
                                cellitem.Name = tempname.Replace("《", "")
                                                        .Replace("【", "")
                                                        .Replace("】", "")
                                                        .Replace("》", "");
                            }
                            // 电影网址
                            var tempurl = celllistr.GetSingle("href=\"", "\"><img");
                            if (!string.IsNullOrEmpty(tempurl))
                            {
                                cellitem.Url = tempurl;
                            }
                            // 电影封面
                            var tempimg = celllistr.GetSingle("<img src=\"", "\"></a>");
                            if (!string.IsNullOrEmpty(tempimg))
                            {
                                cellitem.Img = tempimg.Replace("m_", "b_");
                            }
                            // 电影质量
                            const string tempHDs = @"HR-HDTV";
                            if (!string.IsNullOrEmpty(tempHDs))
                            {
                                cellitem.HDs = tempHDs;
                            }
                            // 电影评分
                            var tempCos = celllistr.GetSingle("【人气】</font>", "分</span>");
                            if (!string.IsNullOrEmpty(tempCos))
                            {
                                var tempCoss = tempCos.Split('|');
                                if (tempCoss.Length >= 3)
                                {
                                    cellitem.Cos = tempCos.Split('|')[2].Trim().Substring(0, 3);
                                }
                            }
                            // 电影地区
                            var tempLoc = celllistr.GetSingle("【说明】", "</span><span><font");
                            if (!string.IsNullOrEmpty(tempLoc))
                            {
                                cellitem.Loc = JieXiYYetsDiQu(tempLoc);
                            }
                            // 电影年代
                            var tempTim = celllistr.GetSingle("》", "</strong>");
                            if (!string.IsNullOrEmpty(tempTim))
                            {
                                cellitem.Tim = tempTim;
                            }
                            // 电影演员
                            var tempCar = celllistr.GetSingle("【说明】</font>", "</span><span><f");
                            if (!string.IsNullOrEmpty(tempCar))
                            {
                                cellitem.Car = tempCar.Length >= 25 ? tempCar.Substring(0, 25) : tempCar;
                            }
                            // 电影类型
                            var tempTyp = celllistr.GetSingle("【类型】</font>", "</span><span><f");
                            if (!string.IsNullOrEmpty(tempTyp))
                            {
                                cellitem.Typ = JieXiYYetsType(tempTyp);
                            }
                            // 电影更新
                            var tempUpt = celllistr.GetSingle("【更新】</font>", "</span></dd>");
                            if (!string.IsNullOrEmpty(tempUpt))
                            {
                                var tempUpts = tempUpt.Split('|');
                                if (tempUpts.Length >= 1)
                                {
                                    cellitem.Upt = tempUpt.Split('|')[0].Trim().Substring(5, 5).Replace("-", "~");
                                }
                            }

                            #endregion
                        }
                        break;
                }
                return cellitem;
            }
            catch (System.Exception exception)
            {
                System.Windows.Forms.MessageBox.Show(exception.Message);
            }
            return null;

            #endregion
        }
        /// <summary>
        /// 4.一级数据解析
        /// </summary>
        /// <param name="resultstr"></param>
        /// <param name="iType"></param>
        private static void JieXiOne(string resultstr, LiuXingType iType)
        {
            switch (iType.Type)
            {
                    // 迅播影院正常列表
                case LiuXingEnum.XunboListItem:
                    {
                        #region case LiuXingEnum.XunboListItem:

                        // 得到 <ul class=\"piclist\"> ~ </ul>
                        var orignlis = resultstr.GetSingle("<ul class=\"piclist\">", "</ul>");
                        if (String.IsNullOrEmpty(orignlis))
                        {
                            return;
                        }
                        // 得到 <li> ~ </li>
                        var orignli = orignlis.GetValue("<li>", "</li>");
                        if (orignli == null || orignli.Count <= 0) return;
                        // 解析数据
                        var zuiReDatas = new List<LiuXingData>();
                        for (var i = 0; i < orignli.Count; i++)
                        {
                            var celllistr = orignli[i];
                            if (String.IsNullOrEmpty(celllistr)) continue;
                            var tempcell = ListData.AnalyzeData(celllistr, iType);
                            if (tempcell != null)
                            {
                                zuiReDatas.Add(tempcell);
                            }
                        }
                        if (zuiReDatas.Count <= 0) return;

                        // 遍历数据中的图片
                        for (var i = 0; i < zuiReDatas.Count; i++)
                        {
                            if (String.IsNullOrEmpty(zuiReDatas[i].Img)) continue;
                            using (
                                var imgdown = new WebClient
                                    {
                                        Encoding = iType.Encoding,
                                        Proxy = iType.Proxy
                                    })
                            {
                                if (!String.IsNullOrEmpty(zuiReDatas[i].Img))
                                {
                                    var iClass = new LiuXingType
                                        {
                                            Encoding = iType.Encoding,
                                            Proxy = iType.Proxy,
                                            Type = iType.Type,
                                            Data = zuiReDatas[i]
                                        };
                                    try
                                    {
                                        var imguri = new Uri(zuiReDatas[i].Img);
                                        imgdown.DownloadDataAsync(imguri, iClass);
                                        imgdown.DownloadDataCompleted += Imgdown_DownloadDataCompleted;
                                    }
                                    catch (Exception exception)
                                    {
                                        // System.Windows.Forms.MessageBox.Show(exception.Message+zuiReDatas[i].Name+zuiReDatas[i].Img+i);
                                    }
                                }
                            }
                        }

                        #endregion
                    }
                    break;
                    // 人人影视正常列表
                case LiuXingEnum.YYetListItem:
                    {
                        #region case LiuXingEnum.YYetListItem:

                        // 得到<ul class="boxPadd dashed"> ~ </ul>
                        var orignlis = resultstr.GetSingle("<ul class=\"boxPadd dashed\">", "</ul>");
                        if (String.IsNullOrEmpty(orignlis))
                        {
                            return;
                        }
                        // 得到 <li> ~ </li>
                        var orignli = orignlis.GetValue("<li ", "</li>");
                        if (orignli == null || orignli.Count <= 0)
                        {
                            return;
                        }
                        // 解析数据
                        var zuiReDatas = new List<LiuXingData>();
                        for (var i = 0; i < orignli.Count; i++)
                        {
                            var celllistr = orignli[i];
                            if (!String.IsNullOrEmpty(celllistr))
                            {
                                var tag = ListData.AnalyzeData(celllistr, iType);
                                if (tag != null)
                                {
                                    zuiReDatas.Add(tag);
                                }
                            }
                        }
                        if (zuiReDatas.Count <= 0)
                        {
                            return;
                        }

                        // 遍历数据中的图片
                        for (var i = 0; i < zuiReDatas.Count; i++)
                        {
                            if (String.IsNullOrEmpty(zuiReDatas[i].Img)) continue;
                            using (
                                var imgdown = new WebClient
                                    {
                                        Encoding = iType.Encoding,
                                        Proxy = iType.Proxy
                                    })
                            {
                                var iClass = new LiuXingType
                                    {
                                        Encoding = iType.Encoding,
                                        Proxy = iType.Proxy,
                                        Type = iType.Type,
                                        Data = zuiReDatas[i]
                                    };
                                if (iClass.Data != null)
                                {
                                    imgdown.DownloadDataAsync(new Uri(zuiReDatas[i].Img), iClass);
                                    imgdown.DownloadDataCompleted += Imgdown_DownloadDataCompleted;
                                }
                            }
                        }

                        #endregion
                    }
                    break;
            }
        }
        /// <summary>
        /// ������Ѳ��ŵ�ַ - GetVodUrl
        /// </summary>
        /// <param name="iType"></param>
        /// <returns></returns>
        public static string GetVodUrl(LiuXingType iType)
        {
            #region ������Ѳ��ŵ�ַ - GetVodUrl

            var vodUrl = string.Empty;
            switch (iType.Type)
            {
                    // Ѹ��ӰԺ�����б�
                case LiuXingEnum.XunboListItem:
                    {
                        #region case LiuXingEnum.XunboListItem:

                        var longer = GetLongerWithXunbo(iType.Data);
                        if (!string.IsNullOrEmpty(longer))
                        {
                            vodUrl = longer;
                        }
                        else
                        {
                            var h1080P = Get1080PWithXunbo(iType.Data);
                            if (!string.IsNullOrEmpty(h1080P))
                            {
                                vodUrl = h1080P;
                            }
                            else
                            {
                                var h1024P = Get1024PWithXunbo(iType.Data);
                                if (!string.IsNullOrEmpty(h1024P))
                                {
                                    vodUrl = h1024P;
                                }
                                else
                                {
                                    vodUrl = iType.Data.Drl[iType.Data.Drl.Count - 1];
                                }
                            }
                        }

                        #endregion
                    }
                    break;
                    // ����Ӱ�������б�
                case LiuXingEnum.YYetListItem:
                    {
                        #region case LiuXingEnum.YYetListItem:

                        var hrhdtv = GetHrHdtvWithYYet(iType.Data);
                        if (!string.IsNullOrEmpty(hrhdtv))
                        {
                            vodUrl = hrhdtv;
                        }
                        else
                        {
                            var h720P = Get720PWithYYet(iType.Data);
                            if (!string.IsNullOrEmpty(h720P))
                            {
                                vodUrl = h720P;
                            }
                            else
                            {
                                var h1080P = Get1080PWithYYet(iType.Data);
                                if (!string.IsNullOrEmpty(h1080P))
                                {
                                    vodUrl = h1080P;
                                }
                                else
                                {
                                    var ed2K = GetEd2KWithYYet(iType.Data);
                                    if (!string.IsNullOrEmpty(ed2K))
                                    {
                                        vodUrl = ed2K;
                                    }
                                    else
                                    {
                                        vodUrl = iType.Data.Drl[iType.Data.Drl.Count - 1];
                                    }
                                }
                            }
                        }

                        #endregion
                    }
                    break;
            }
            return vodUrl;

            #endregion
        }
        /// <summary>
        /// GetListHttpPath - 合成正常列表所需的请求地址
        /// </summary>
        /// <param name="pageNum"></param>
        /// <param name="typeNum"></param>
        /// <param name="iType"></param>
        /// <returns></returns>
        public static string GetListHttpPath(int pageNum, int typeNum, LiuXingType iType)
        {
            #region GetListHttpPath - 合成正常列表所需的请求地址

            var pathtemp = new System.Text.StringBuilder();
            switch (iType.Type)
            {
                    // 迅播影院正常列表
                case LiuXingEnum.XunboListItem:
                    {
                        #region case LiuXingType.XunboListItem:

                        if (pageNum == 1)
                        {
                            switch (PublicStatic.AnSortType)
                            {
                                case SortType.AnGengXin:
                                    {
                                        pathtemp.Append(string.Format("{0}{1}.html", PublicStatic.AnGengXin, typeNum));
                                    }
                                    break;
                                case SortType.AnReDu:
                                    {
                                        pathtemp.Append(string.Format("{0}{1}.html", PublicStatic.AnReDu, typeNum));
                                    }
                                    break;
                                case SortType.AnPengFeng:
                                    {
                                        pathtemp.Append(string.Format("{0}{1}.html", PublicStatic.AnPengFeng, typeNum));
                                    }
                                    break;
                                case SortType.AnShiJian:
                                    {
                                        pathtemp.Append(string.Format("{0}{1}", PublicStatic.AnShiJian, pageNum));
                                    }
                                    break;
                            }
                        }
                        else
                        {
                            switch (PublicStatic.AnSortType)
                            {
                                case SortType.AnGengXin:
                                    {
                                        pathtemp.Append(string.Format("{0}{1}_{2}.html", PublicStatic.AnGengXin, typeNum,
                                                                      pageNum));
                                    }
                                    break;
                                case SortType.AnReDu:
                                    {
                                        pathtemp.Append(string.Format("{0}{1}_{2}.html", PublicStatic.AnReDu, typeNum,
                                                                      pageNum));
                                    }
                                    break;
                                case SortType.AnPengFeng:
                                    {
                                        pathtemp.Append(string.Format("{0}{1}_{2}.html", PublicStatic.AnPengFeng,
                                                                      typeNum, pageNum));
                                    }
                                    break;
                                case SortType.AnShiJian:
                                    {
                                        pathtemp.Append(string.Format("{0}{1}", PublicStatic.AnShiJian, pageNum));
                                    }
                                    break;
                            }
                        }

                        #endregion
                    }
                    break;
                    // 人人影视正常列表
                case LiuXingEnum.YYetListItem:
                    {
                        #region case LiuXingType.YYetListItem:

                        switch (PublicStatic.AnSortType)
                        {
                            case SortType.AnGengXin:
                                {
                                    pathtemp.Append(string.Format("{0}{1}&channel=movie&format=HR-HDTV&sort=update",
                                                                  PublicStatic.YYetsListHost, pageNum));
                                }
                                break;
                            case SortType.AnReDu:
                                {
                                    pathtemp.Append(string.Format("{0}{1}&channel=movie&format=HR-HDTV&sort=views",
                                                                  PublicStatic.YYetsListHost, pageNum));
                                }
                                break;
                            case SortType.AnPengFeng:
                                {
                                    pathtemp.Append(string.Format("{0}{1}&channel=movie&format=HR-HDTV&sort=score",
                                                                  PublicStatic.YYetsListHost, pageNum));
                                }
                                break;
                        }

                        #endregion
                    }
                    break;
            }
            return pathtemp.ToString();

            #endregion
        }