private void RemoveCurrentResultHighlight() { if (_currentResultRange != null) { _currentResultRange.BackgroundColour = System.Windows.Media.Colors.LemonChiffon; _highlighter.Redraw(_currentResultRange); _currentResultRange = null; } }
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); } }
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); } }