src/Misc/EFTools/XmlCore/UI/ViewModels/Explorer/ExplorerSearchResults.cs
/// <summary>
///     Get next Search Result and update Next and Previous items
/// </summary>
Get next Search Result and update Next and Previous items
Get next Search Result and update Next and Previous items
internal ExplorerEFElement SelectNextSearchResult()
        {
            var itemToBeReturned = _nextSearchResultItem;
            if (null != _nextSearchResultItem)
            {
                if (_currentSelectionIsInResults)
                {
                    if (null == _previousSearchResultItem)
                    {
                        _previousSearchResultItemIndex = 0;
                    }
                    else
                    {
                        _previousSearchResultItemIndex++;
                    }
                    _previousSearchResultItem = _results[_previousSearchResultItemIndex];
                }
                else
                {
                    _currentSelectionIsInResults = true;
                }
                _nextSearchResultItemIndex++;
                if (_nextSearchResultItemIndex >= _results.Count)
                {
                    _nextSearchResultItem = null;
                    _nextSearchResultItemIndex = -1;
                }
                else
                {
                    _nextSearchResultItem = _results[_nextSearchResultItemIndex];
                }
            }
            return itemToBeReturned;
        }
internal ExplorerEFElement SelectNextSearchResult ( ) { var itemToBeReturned = _nextSearchResultItem ; if ( null != _nextSearchResultItem ) { if ( _currentSelectionIsInResults ) { if ( null == _previousSearchResultItem ) { _previousSearchResultItemIndex = 0 ; } else { _previousSearchResultItemIndex ++ ; } _previousSearchResultItem = _results [ _previousSearchResultItemIndex ] ; } else { _currentSelectionIsInResults = true ; } _nextSearchResultItemIndex ++ ; if ( _nextSearchResultItemIndex >= _results . Count ) { _nextSearchResultItem = null ; _nextSearchResultItemIndex = - 1 ; } else { _nextSearchResultItem = _results [ _nextSearchResultItemIndex ] ; } } return itemToBeReturned ; }
Get next Search Result and update Next and Previous items
Get next Search Result and update Next and Previous items
// there was no previous search item - make the previous item the start of the list // the currently selected item is now in the results // but Previous does not need to be updated