예제 #1
0
 private void RemoveCurrentResultHighlight()
 {
     if (_currentResultRange != null)
     {
         _currentResultRange.BackgroundColour = System.Windows.Media.Colors.LemonChiffon;
         _highlighter.Redraw(_currentResultRange);
         _currentResultRange = null;
     }
 }
예제 #2
0
 private void AddCurrentResultHighlight()
 {
     if (_currentResultRange == null)
     {
         _currentResultRange = FindRange(_currentSearch.CurrentResult);
         if (_currentResultRange == null)
             _currentResultRange = _highlighter.AddRange(_currentSearch.CurrentResult.Location.Offset, _currentSearch.CurrentResult.Extent);
         _currentResultRange.BackgroundColour = System.Windows.Media.Colors.Cyan;
         _highlighter.Redraw(_currentResultRange);
     }
 }
예제 #3
0
 private void OnNewResult(ISearchResult result)
 {
     if (result.Location.Path == _path)
     {
         Highlighting.IHighlightedRange hr = _currentResultRange = FindRange(result);
         if(hr == null)
             hr = _highlighter.AddRange(result.Location.Offset, result.Extent);
         hr.BackgroundColour = System.Windows.Media.Colors.LemonChiffon;
         _ranges.Add(hr);
     }
 }