コード例 #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
ファイル: MainEngine.cs プロジェクト: wxjwz/PBSCAnalyzer
        private void NavigateToLineInSource(SearchInFileLineItem searchInFileLineItem)
        {
            var doc = MainForm.ActiveMdiChild as SourceContainerDocument;

            doc.SourceEditorPanel.NavigateToSourceLine(searchInFileLineItem.LineNum);
        }