Exemple #1
0
        void work(Object obj)
        {
            AsynObj asycObj = (AsynObj)obj;
            string  content = Sis001DlTool.GetHtml(asycObj.Url, true, "GB2312");

            DlTool.SaveFile(content, asycObj.Path);
        }
Exemple #2
0
        public override void Download(object obj)
        {
            AsynObj o = (AsynObj)obj;


            string content = Sis001DlTool.GetHtml(o.Url, true, "GB2312");

            if (content != "")
            {
                if (o.Path != null)
                {
                    DlTool.SaveFile(content, Path.Combine(o.Path, DlTool.ReplaceUrl(o.Url) + ".html"));
                }
                JavBusSgDl sgDl    = new JavBusSgDl();
                AsynObj    asynObj = new AsynObj();
                asynObj.Path    = o.Path;
                asynObj.Content = content;
                ThreadPool.QueueUserWorkItem(sgDl.Download, asynObj);
            }
        }
Exemple #3
0
        public override void Download(object obj)
        {
            AsynObj o = (AsynObj)obj;


            string content = Sis001DlTool.GetHtml(o.Url, true, "GB2312");

            if (content != "")
            {
                //string[] contents = content.Split(new string[] { "<td align=\"center\">" }, StringSplitOptions.RemoveEmptyEntries);
                //content = contents[1];
                if (o.Path != null)
                {
                    DlTool.SaveFile(content, Path.Combine(o.Path, DlTool.ReplaceUrl(o.Url) + ".htm"));
                }
                Sis001SgDl sgDl    = new Sis001SgDl();
                AsynObj    asynObj = new AsynObj();
                asynObj.Path    = o.Path;
                asynObj.Content = content;
                ThreadPool.QueueUserWorkItem(sgDl.Download, asynObj);
            }
        }