public RootWindow(URLRootData root, CrawlerBackend crawlerBE) { InitializeComponent(); this.root = root; this.crawlerBE = crawlerBE; tb_rootURL.Text = root.rootURL; tb_maxThreadNo.Text = root.maxThreadNo.ToString(); tb_extActive.Text = root.externalActivated.ToString(); timerUpdateGUI = new DispatcherTimer(); // 2019103041 timerUpdateGUI.Tick += timerUpdateGUI_Tick; timerUpdateGUI.Interval = new TimeSpan(0, 0, 0, 0, 20); // 2019103040 timerUpdateGUI.Start(); }
public CrawlerFrontend() { InitializeComponent(); ThreadPool.SetMaxThreads(100000, 100000); ThreadPool.SetMinThreads(100000, 100000); ServicePointManager.DefaultConnectionLimit = 1000; crawlerBE = new CrawlerBackend(); state = CrawlerState.Crawled; timerUpdateURLTab = new DispatcherTimer(); // 2019103041 timerUpdateURLTab.Tick += timerUpdateURLTab_Tick; timerUpdateURLTab.Interval = new TimeSpan(0, 0, 0, 0, 250); // 2019103040 timerUpdateStatisticsTab = new DispatcherTimer(); // 2019103041 timerUpdateStatisticsTab.Tick += timerUpdateStatisticsTab_Tick; timerUpdateStatisticsTab.Interval = new TimeSpan(0, 0, 0, 0, 250); // 2019103040 }