Пример #1
0
        public async void UpdateGameList()
        {
            await UserModel.TaskUpdateGameList();

            CustomListViewRecords.Clear();
            if (UserModel.GamesList == null)
            {
                return;
            }
            for (int i = 0; i < UserModel.GamesList.Count; i++)
            {
                if (UserModel.GamesList[i].GameState != GameStateEnum.END)
                {
                    CustomListViewRecords.Add(new GameListElement(UserModel.GamesList[i]));
                }
            }
            if (CustomListViewRecords.Count == 0)
            {
                IsGameListViewVisible         = false;
                IsListViewEmptyMessageVisible = true;
            }
            else
            {
                IsGameListViewVisible         = true;
                IsListViewEmptyMessageVisible = false;
            }
        }
Пример #2
0
        public async Task TaskUpdateGameList()
        {
            await GameHistoryModel.UpdateGameList();

            CustomListViewRecords.Clear();
            if (GameHistoryModel.GamesList != null && GameHistoryModel.GamesList.Count > 0)
            {
                for (int i = 0; i < GameHistoryModel.GamesList.Count; i++)
                {
                    if (GameHistoryModel.GamesList[i].GameState == GameStateEnum.END)
                    {
                        CustomListViewRecords.Add(new GameListElement(GameHistoryModel.GamesList[i]));
                    }
                }
            }
            if (CustomListViewRecords.Count == 0)
            {
                IsCustomListViewVisible           = false;
                IsGameListViewEmptyMessageVisible = true;
            }
            else
            {
                IsCustomListViewVisible           = true;
                IsGameListViewEmptyMessageVisible = false;
            }
        }