public void SaveState()
        {
            if (AppQueryParameters.AppType == AppType.Application)
            {
                TopApplications.Clear();
                StoreApps.ForEach(app => TopApplications.Add(app));
            }

            if (AppQueryParameters.AppType == AppType.Game)
            {
                TopGames.Clear();
                StoreApps.ForEach(app => TopGames.Add(app));
            }
        }
Ejemplo n.º 2
0
        public async Task LoadTopGamesAsync()
        {
            IEnumerable <StoreApp> apps = null;
            var queryParams             = AppQueryParameters.TopGames(0, 1);
            var i = TopGames.Count;

            do
            {
                queryParams.PageIndex = i;
                apps = await AppManager.Instance.GetAppsAsync(queryParams);

                apps.ForEach(app => TopGames.Add(app));
                RaisePropertyChanged(nameof(ShowTopGamesSection));
                i++;
            } while (i < 5 && apps.Count() > 0);
        }