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(); } } }
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); } }