示例#1
0
 ISearchComparer CreateSearchComparer()
 {
     if (SelectedSearchTypeVM.SearchType == SearchType.Literal)
     {
         return(SearchComparerFactory.CreateLiteral(SearchText, SearchSettings.CaseSensitive, SearchSettings.MatchWholeWords, SearchSettings.MatchAnySearchTerm));
     }
     return(SearchComparerFactory.Create(SearchText, SearchSettings.CaseSensitive, SearchSettings.MatchWholeWords, SearchSettings.MatchAnySearchTerm));
 }
示例#2
0
 void StartSearch()
 {
     CancelSearch();
     if (string.IsNullOrEmpty(SearchText))
     {
         SearchResults.Clear();
     }
     else
     {
         var options = new DocumentSearcherOptions {
             SearchComparer       = SearchComparerFactory.Create(SearchText, CaseSensitive, MatchWholeWords, MatchAnySearchTerm),
             Filter               = filter,
             SearchDecompiledData = false,
         };
         fileSearcher = fileSearcherProvider.Create(options, documentTreeView);
         fileSearcher.SyntaxHighlight     = SyntaxHighlight;
         fileSearcher.Decompiler          = Language.Decompiler;
         fileSearcher.OnSearchCompleted  += FileSearcher_OnSearchCompleted;
         fileSearcher.OnNewSearchResults += FileSearcher_OnNewSearchResults;
         fileSearcher.Start(documentTreeView.TreeView.Root.DataChildren.OfType <DsDocumentNode>());
     }
 }
示例#3
0
 void StartSearch()
 {
     CancelSearch();
     if (string.IsNullOrEmpty(SearchText))
     {
         SearchResults.Clear();
     }
     else
     {
         var options = new FileSearcherOptions {
             SearchComparer       = SearchComparerFactory.Create(SearchText, CaseSensitive, MatchWholeWords, MatchAnySearchTerm),
             Filter               = filter,
             SearchDecompiledData = false,
         };
         fileSearcher = fileSearcherCreator.Create(options);
         fileSearcher.SyntaxHighlight     = SyntaxHighlight;
         fileSearcher.Language            = Language;
         fileSearcher.BackgroundType      = BackgroundType.Search;
         fileSearcher.OnSearchCompleted  += FileSearcher_OnSearchCompleted;
         fileSearcher.OnNewSearchResults += FileSearcher_OnNewSearchResults;
         fileSearcher.Start(fileTreeView.TreeView.Root.DataChildren.OfType <IDnSpyFileNode>());
     }
 }