Exemple #1
0
 void searcher_OnSearchStarted(object sender, EventArgs e)
 {
     lock (_syncRoot)
     {
         var worker = SearchWorkers.SingleOrDefault(w => w.Id == ((FileSearcher)sender).Id);
         if (worker != null)
         {
             worker.Status = WorkerStatus.Running.ToString();
         }
     }
 }
Exemple #2
0
 private void searcher_OnFileFound(object sender, FileFoundArgs e)
 {
     lock (_syncRoot)
     {
         var worker = SearchWorkers.SingleOrDefault(w => w.Id == e.SearcherId);
         if (worker != null)
         {
             worker.FilesFound++;
         }
         FileFound(e.SearcherId, e.FileName);
     }
 }