Пример #1
0
        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);
        }
Пример #2
0
        private void FiltersChanged()
        {
            if (_updatesSuspended)
            {
                return;
            }

            AppMessenger.SendMessage(AppAction.FiltersChanged);
        }
Пример #3
0
 private void AddTag(string tag)
 {
     AppMessenger.SendMessage(AppAction.TagSelected, tag);
 }
Пример #4
0
 private void MetroWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     AppMessenger.SendMessage(AppAction.AppClosing);
 }
Пример #5
0
 private void TextBox_GotFocus_1(object sender, RoutedEventArgs e)
 {
     AppMessenger.SendMessage(AppAction.HasTagsFocused);
 }