Пример #1
0
 public void FindTextAll(string textToSearch)
 {
     try
     {
         if (string.IsNullOrEmpty(textToSearch))
         {
             return;
         }
         var        searchInFileCriteria  = new SearchInFileCriteria(textToSearch);
         var        searchInFileLineItems = new List <SearchInFileLineItem>();
         List <int> findLines             = fastColoredTextBox1.FindLines(textToSearch, RegexOptions.IgnoreCase | RegexOptions.Singleline);
         foreach (int findLine in findLines)
         {
             var searchInFileLineItem = new SearchInFileLineItem();
             searchInFileLineItem.TextLine             = fastColoredTextBox1.Lines[findLine].Trim();
             searchInFileLineItem.LineNum              = findLine;
             searchInFileLineItem.SearchInFileCriteria = searchInFileCriteria;
             searchInFileLineItems.Add(searchInFileLineItem);
         }
         FindInSourcePanel.SetFindInFileResult(searchInFileLineItems);
     }
     catch (Exception ex)
     {
     }
 }
Пример #2
0
 public void SetFindInFileResult(List <SearchInFileLineItem> findResult)
 {
     _findInSourcePanel.SetFindInFileResult(findResult);
 }