private void searchResultChanged(object sender, FixedSearchResult searchResult) { this.Invoke(delegate { var lines = searchResult.HasSyntaxErrors ? (IEnumerable <string>)searchResult.SyntaxErrors : searchResult.FileNames.OrderBy(_ => _, PathString.Comparer); _textBoxSearchResult.Text = string.Join(Environment.NewLine, lines); updateDirectoryStructure(); }); }
private void updateSearchResult() { if (!string.IsNullOrWhiteSpace(_currentText)) { var query = _searcher.GetQuery(_currentText); var searchResult = _searcher.Search(query); SearchResult = new FixedSearchResult(searchResult); } else { SearchResult = FixedSearchResult.Empty; } SearchResultChanged?.Invoke(this, SearchResult); }