Beispiel #1
0
        private void comicNavBar_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            string url = "";

            if (e.Link.Caption == "分类")
            {
                switch (e.Link.Group.Name)
                {
                case "jingmingyan": url = "http://www.jmydm.com/ManhuaClass-LangmanAiqing/"; break;

                case "kanmanhua": url = "https://www.manhuagui.com/list/wanjie/"; break;

                case "hanhanmanhua": url = "http://www.hhimm.com/comic/class_1.html"; break;

                case "dongman": url = "http://www.dmzx.com/rexue-all-all-all-all/"; break;

                case "yylsmanhua": url = "http://8comic.se/category/%E6%BC%AB%E7%95%AB%E5%88%86%E9%A1%9E/%E5%86%92%E9%9A%AA/"; break;

                case "k886": url = "https://www.k886.net/index-html-status-0-typeid-0-sort-"; break;

                case "feichangaiman": url = "http://comic.veryim.com/all/"; break;

                case "manhuaren": url = "http://www.1kkk.com/manhua-list/"; break;

                case "jiu0ManHua": url = "http://m.90mh.com/search/"; break;

                case "veryDm": url = "http://www.veryimapp.com/index.php?r=comic/list&show=grid&sort=update"; break;

                case "huhumanhua": url = "http://www.huhudm.com/comic/"; break;

                case "manhuadui": url = "https://www.manhuadui.com/list/riben/"; break;

                case "mangabzName": url = "http://www.mangabz.com/manga-list/"; break;
                }

                if (url.Length > 0)
                {
                    decoder = DecoderDistrution.GiveDecoder(url);
                    FenLei(url, decoder);
                }
            }
            else
            {
                if (e.Link.Caption == "热门")
                {
                    switch (e.Link.Group.Name)
                    {
                    //case "jingmingyan": url = "http://www.jmydm.com"; break;
                    case "kanmanhua": url = "https://www.manhuagui.com"; break;

                    case "hanhanmanhua": url = "http://www.hhimm.com/"; break;

                    case "yylsmanhua": url = "http://8comic.se/"; break;

                    case "dongman": url = "http://www.dmzx.com/"; break;

                    case "k886": url = "https://www.k886.net/"; break;

                    case "feichangaiman": url = "http://www.verydm.com/"; break;

                    case "manhuaren": url = "http://www.1kkk.com/manhua-jp/"; break;

                    case "manhuadui": url = "https://www.manhuadui.com/list/riben/"; break;

                    case "huhumanhua": url = "http://www.huhudm.com/"; break;

                    case "veryDm": url = "http://www.veryimapp.com/"; break;

                    case "jiu0ManHua": url = "http://m.90mh.com/update/"; break;

                    case "mangabzName": url = "http://www.mangabz.com"; break;
                        //case "jiu0ManHua": url = "http://m.90mh.com/update/"; break;
                    }

                    if (url.Length > 0)
                    {
                        decoder = DecoderDistrution.GiveDecoder(url);
                        HotComic(url, decoder);
                    }
                }
            }
        }
Beispiel #2
0
        private void FillComicInfo(ListView selectView)
        {
            var receive = "";
            var url     = "";

            if (selectView.SelectedItems == null)
            {
                return;
            }

            ListViewItemInfo item = null;

            this.Invoke(new Action(() =>
            {
                item = selectView.SelectedItems[0] as ListViewItemInfo;
                mainFrame.SelectedPageIndex = 1;
                comicNameLabel.Text         = "漫画名:" + item.Text;
                comicPicBox.Image           = showImageList.Images[selectView.SelectedItems[0].Index];
                url = item.ReferUrl;
                resource.ComicName = item.Text;
                resource.ComicHref = url;
                currentItem        = item;
            }));

            //ShowWait(checkPanel);
            decoder = DecoderDistrution.GiveDecoder(url);
            receive = AnalyseTool.HttpGet(url);
            //RemoveWait(checkPanel);

            if (receive == "")
            {
                MessageBox.Show("网络错误,获取失败");
                return;
            }

            var comicInfo = decoder.GetComicInfo(receive);

            item.UrlDictronary = comicInfo.URLDictionary;

            this.Invoke(new Action(() =>
            {
                authorLab.Text = (comicInfo.Author == null || comicInfo.Author.Length == 0) ? "略" : comicInfo.Author;
                tagLabe.Text   = "标签:  " + comicInfo.Tag;
                descLable.Text = "简介:" + comicInfo.Description;
                statusLab.Text = "连载状态:" + comicInfo.HasFinished;
                checkPanel.Controls.Clear();

                if (comicInfo.URLDictionary == null)
                {
                    descLable.Text = "简介:" + "该漫画已经下架!";
                    return;
                }

                List <Controls.CheckBoxEx> list = new List <Controls.CheckBoxEx>();

                foreach (var i in comicInfo.URLDictionary)
                {
                    var checkBox  = new Controls.CheckBoxEx();
                    checkBox.Text = i.Key;
                    list.Add(checkBox);
                }
                checkPanel.Controls.AddRange(list.ToArray());
                SetGifHidden();
            }));
        }
Beispiel #3
0
        private void FillComicInfo(ListView selectView)
        {
            int x       = 0;
            int y       = 0;
            var receive = "";

            mainFrame.SelectedPageIndex = 1;
            comicNameLabel.Text         = "漫画名:" + selectView.SelectedItems[0].Text;
            var url = resourse.SearchResultURL[selectView.SelectedItems[0].Text];

            resourse.ComicName = selectView.SelectedItems[0].Text;
            resourse.ComicHref = url;
            decoder            = DecoderDistrution.GiveDecoder(url);
            receive            = AnalyseTool.HttpGet(url);

            if (receive == "")
            {
                MessageBox.Show("网络错误,获取失败");
                return;
            }
            var comicInfo = decoder.GetComicInfo(receive);

            downUrlDic        = new Dictionary <string, string>();//存储当前漫画所有图片链接
            downUrlDic        = comicInfo.URLDictionary;
            comicPicBox.Image = showImageList.Images[selectView.SelectedItems[0].Index];
            authorLab.Text    = (comicInfo.Author == null || comicInfo.Author.Length == 0)? "略":comicInfo.Author;
            tagLabe.Text      = "标签:  " + comicInfo.Tag;
            descLable.Text    = "简介:" + comicInfo.Description;
            statusLab.Text    = "连载状态:" + comicInfo.HasFinished;
            CheckBox check;

            checkPanel.Controls.Clear();

            Task task = new Task(() =>
            {
                foreach (var i in comicInfo.URLDictionary)
                {
                    check          = new CheckBox();
                    check.AutoSize = true;
                    check.Text     = i.Key;
                    check.Location = new Point(x, y);

                    this.Invoke(new Action(() =>
                    {
                        checkPanel.Controls.Add(check);
                    }));


                    if (x + check.Width + 5 > checkPanel.Width - check.Width - 10)//如果
                    {
                        x = 0;
                        y = y + check.Height + 20;
                    }
                    else
                    {
                        x = x + check.Width + 5;
                    }
                }
            });

            task.Start();
        }