internal void searchWith(ISearcher searcher, SearchCriteria searchCriteria) { XDocument resultsPageXDocument = null; IndefiniteProcessingForm.process( (cancellationRequestedChecker, log) => { log.WriteLine("Searching..."); resultsPageXDocument = new [] { searcher.search(searchCriteria.fileSystemInfos, cancellationRequestedChecker, log) }.toXDocument(); return(false); }, "Searching...", this ); if (null == resultsPageXDocument) { this.error("An error occured whilst searching."); return; } // note: resultsPage has to be constructed in this UI thread ResultsPage resultsPage = new ResultsPage(resultsPageXDocument); tabControl.appendControls(resultsPage); tabControl.SelectedTab = resultsPage; }
public ResultsPageObjectForScripting(ResultsPage resultsPage) { this.resultsPage = resultsPage; }