public void DoRefresh(int id) { set("processLink", to(Process, id)); StringBuilder sb = LogCacher.GetNewImportLog("log" + ctx.viewer.Id); ImportState ts = new ImportState(); ts.TemplateId = id; ts.Log = sb; new Thread(ImportUtil.BeginImport).Start(ts); }
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); }
public void Process(int id) { StringBuilder sb = LogCacher.GetSpiderLog("log" + ctx.viewer.Id); echoText(sb.ToString()); }