/// <summary> /// Filters the game list, this gets called whenever the Filter Property is set and should not be called directly /// </summary> internal void FilterGames() { if (SelectedGame != null) { Settings.Default.last_game = SelectedGame.Name; SelectedGame = null; } // Clear out the game collection before filtering. Games.Clear(); if (_games != null && _games.Count > 0) { SuspendLayout(); LoadGamesAndFavorites(); if (Games.Count > 0) { Games.Last().Value.NextGame = null; } //Sets up our scrolling AutoScroll = true; AutoScrollMinSize = new Size(ClientRectangle.Width, Games.Count * RowHeight); VerticalScroll.Value = AutoScrollMinSize.Height < _prevScrollValue ? 0 : _prevScrollValue; VerticalScroll.SmallChange = RowHeight; // SelectedGame = null; Refresh(); //VerticalScroll.Maximum = Games.Count*RowHeight; //Initalizes the list searcher and locates the last game. _search = new GameListSearch(this); ResumeLayout(); GoToLastGame(); //Raise the Gamelist event if (GameListChanged != null) { GameListChanged(null, null); } } }
/// <summary> /// Filters the game list, this gets called whenever the Filter Property is set and should not be called directly /// </summary> internal void FilterGames() { if (SelectedGame != null) { Settings.Default.last_game = SelectedGame.Name; SelectedGame = null; } // Clear out the game collection before filtering. Games.Clear(); if (_games != null && _games.Count > 0) { SuspendLayout(); LoadGamesAndFavorites(); if (Games.Count > 0) Games.Last().Value.NextGame = null; //Sets up our scrolling AutoScroll = true; AutoScrollMinSize = new Size(ClientRectangle.Width, Games.Count * RowHeight); VerticalScroll.Value = AutoScrollMinSize.Height < _prevScrollValue ? 0 : _prevScrollValue; VerticalScroll.SmallChange = RowHeight; // SelectedGame = null; Refresh(); //VerticalScroll.Maximum = Games.Count*RowHeight; //Initalizes the list searcher and locates the last game. _search = new GameListSearch(this); ResumeLayout(); GoToLastGame(); //Raise the Gamelist event if (GameListChanged != null) GameListChanged(null, null); } }