Esempio n. 1
0
 public Form1()
 {
     InitializeComponent();
     INotifier notifier = new ConfigurableNotifier((notification) =>
         {
             progressTextBox.BeginInvoke((MethodInvoker)(() => progressTextBox.AppendText(notification)));
         },
         (completedMessage) =>
         {
             resultsTextBox.BeginInvoke((MethodInvoker)(() => resultsTextBox.AppendText(completedMessage)));
         },
         (percentage) =>
         {
             progressBarBackgroundWorker.ReportProgress(percentage);
         });
     _spider = new SearchEngine(notifier);
 }
Esempio n. 2
0
        public Form1()
        {
            InitializeComponent();
            INotifier notifier = new ConfigurableNotifier((notification) =>
            {
                progressTextBox.BeginInvoke((MethodInvoker)(() => progressTextBox.AppendText(notification)));
            },
                                                          (completedMessage) =>
            {
                resultsTextBox.BeginInvoke((MethodInvoker)(() => resultsTextBox.AppendText(completedMessage)));
            },
                                                          (percentage) =>
            {
                progressBarBackgroundWorker.ReportProgress(percentage);
            });

            _spider = new SearchEngine(notifier);
        }