public void MoveSort(int amount) { _lastSongHash = SongList[SelectedSongIndex].GetHashCode(); var current = (int)SongSortMode + amount; const int COUNT = (int)SongSortMode.Count; if (current < 0) { current += COUNT; } if (current >= COUNT) { current -= COUNT; } SongSortMode = (SongSortMode)current; CreateBookmarkMenu(); SelectedSongIndex = SongList.IndexOf(GetByHashCode(_lastSongHash)); SetBookmark(SelectedSongIndex); }