Exemplo n.º 1
0
        public override bool Init(IEnumerable<IFreeDocument> datas)
        {
            crawler =
             processManager.CurrentProcessCollections.FirstOrDefault(d => d.Name == CrawlerSelector) as SmartCrawler;
            if (crawler != null)
            {
                IsMultiYield = crawler?.IsMultiData == ListType.List;
            }
            else
            {
                var task = processManager.CurrentProject.Tasks.FirstOrDefault(d => d.Name == CrawlerSelector);
                if (task == null)
                    return false;
                ControlExtended.UIInvoke(() => { task.Load(false); });
                crawler =
                    processManager.CurrentProcessCollections.FirstOrDefault(d => d.Name == CrawlerSelector) as
                        SmartCrawler;
            }

            return crawler != null && base.Init(datas);
        }
Exemplo n.º 2
0
 public override bool Init(IEnumerable<IFreeDocument> datas)
 {
     crawler =
         processManager.CurrentProcessCollections.FirstOrDefault(d => d.Name == CrawlerSelector) as SmartCrawler;
     if (crawler != null)
     {
     }
     else
     {
         var task = processManager.CurrentProject.Tasks.FirstOrDefault(d => d.Name == CrawlerSelector);
         if (task == null)
             return false;
         ControlExtended.UIInvoke(() => { task.Load(false); });
         crawler =
             processManager.CurrentProcessCollections.FirstOrDefault(d => d.Name == CrawlerSelector) as
                 SmartCrawler;
     }
     helper = new HttpHelper();
     return base.Init(datas);
 }