Exemplo n.º 1
0
        public void AddBot(string watchLink, string title, int updateTime)
        {
            SeriesWebCrawler crawler = new SeriesWebCrawler(watchLink, title, updateTime, CreateUnigueID());

            CrawlerFileHandler.WriteNewBotToFile(crawler);
            CrawlersRunning.Add(crawler);
        }
Exemplo n.º 2
0
 private CrawlerManager()
 {
     try
     {
         List <SeriesWebCrawler> temp = CrawlerFileHandler.GetAllBots();
         CrawlersRunning = new ObservableCollection <SeriesWebCrawler>(temp);
     }
     catch
     {
         CrawlersRunning = new ObservableCollection <SeriesWebCrawler>();
     }
 }
Exemplo n.º 3
0
 public void RemoveBot(SeriesWebCrawler active)
 {
     active.StopWatching();
     CrawlerFileHandler.DeleteFile(active);
     CrawlersRunning.Remove(active);
 }
Exemplo n.º 4
0
 public void EndBot(SeriesWebCrawler active)
 {
     CrawlerFileHandler.SaveShows(active);
     active.StopWatching();
 }