private void ShowPage(int page) { if (PagesCount == 0) { Page = 0; Games = new List <Game>(); return; } if (page < 1 || page > PagesCount) { Games = new List <Game>(); return; } Page = page; var skip = (page - 1) * gamesPerPage; var games = _filteredGames.Skip(skip).Take(gamesPerPage).ToList(); Games = new List <Game>(games); AppMessenger.SendMessage(AppAction.GamesListChanged); }
private void FiltersChanged() { if (_updatesSuspended) { return; } AppMessenger.SendMessage(AppAction.FiltersChanged); }
private void AddTag(string tag) { AppMessenger.SendMessage(AppAction.TagSelected, tag); }
private void MetroWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { AppMessenger.SendMessage(AppAction.AppClosing); }
private void TextBox_GotFocus_1(object sender, RoutedEventArgs e) { AppMessenger.SendMessage(AppAction.HasTagsFocused); }