Esempio n. 1
0
        private void HotComic(string url, PublicThing comicDecoder)
        {
            mainFrame.SelectedPageIndex = 0;
            tabControl1.TabPages.Clear();
            SetGifVisable();

            Task task = new Task(() =>
            {
                try
                {
                    lock (getLock)
                    {
                        var response = AnalyseTool.HttpGet(url);

                        if (response == "")
                        {
                            SetGifHidden();
                            return;
                        }
                        var comicTop = comicDecoder.GetTopComic(response);
                        SetProgressBar(comicTop);
                    }
                }
                catch (Exception ex)
                {
                }
            });

            task.Start();
        }
Esempio n. 2
0
        private void HotComic(string url, PublicThing comicDecoder)
        {
            mainFrame.SelectedPageIndex = 0;
            tabControl1.TabPages.Clear();
            runGif.Visible = true;

            Task task = new Task(() =>
            {
                var response = AnalyseTool.HttpGet(url);

                if (response == "")
                {
                    runGif.Invoke(new Action(() =>
                    {
                        runGif.Visible = false;
                    }));
                    return;
                }
                var comicTop = comicDecoder.GetTopComic(response);
                SetProgressBar(comicTop);
            });

            task.Start();
        }