Ejemplo n.º 1
0
        public void DoRefresh( int id )
        {
            if (id <= 0) {
                echoRedirect( "请先选择模板" );
                return;
            }

            set( "processLink", to( Process, id ) );

            SpiderTemplate s = templateService.GetById( id );
            TemplateAndLog tl = new TemplateAndLog();
            tl.Template = s;

            StringBuilder sb = LogCacher.GetNewSpiderLog( "log" + ctx.viewer.Id );
            tl.log = sb;

            new Thread( beginRefresh ).Start( tl );
        }
Ejemplo n.º 2
0
        public void DoRefresh(int id)
        {
            if (id <= 0)
            {
                echoRedirect("请先选择模板");
                return;
            }

            set("processLink", to(Process, id));

            SpiderTemplate s  = templateService.GetById(id);
            TemplateAndLog tl = new TemplateAndLog();

            tl.Template = s;

            StringBuilder sb = LogCacher.GetNewSpiderLog("log" + ctx.viewer.Id);

            tl.log = sb;

            new Thread(beginRefresh).Start(tl);
        }
Ejemplo n.º 3
0
        private void beginRefresh(object obj)
        {
            TemplateAndLog tl = obj as TemplateAndLog;

            spiderTool.DownloadPage(tl.Template, tl.log, new int[] { 100, 100 });
        }