Exemple #1
0
        private void CrawlWorker(ICrawlDaddy crawl, AsyncOperation asyncOp)
        {
            ProgressChangedEventArgs args = null;
            Exception e = null;

            // Check that the task is still active.
            // The operation may have been canceled before
            // the thread was scheduled.
            if (!_cancelPending)
            {
                try
                {
                    crawl.StartCrawl();
                }
                catch (Exception ex)
                {
                    e = ex;
                }
            }

            CrawlEnded(crawl, e, _cancelPending, asyncOp);
        }
Exemple #2
0
 private void btnStart_Click(object sender, EventArgs e)
 {
     _crawl.StartCrawl();
     btnStart.Enabled = false;
 }
        private void CrawlWorker(ICrawlDaddy crawl, AsyncOperation asyncOp)
        {
            ProgressChangedEventArgs args = null;
            Exception e = null;

            // Check that the task is still active. 
            // The operation may have been canceled before 
            // the thread was scheduled. 
            if (!_cancelPending)
            {
                try
                {
                    crawl.StartCrawl();
                }
                catch (Exception ex)
                {
                    e = ex;
                }
            }

            CrawlEnded(crawl, e, _cancelPending, asyncOp);
        }