Esempio n. 1
0
        public Lazy<BitmapSource> RefreshBanner(int gameId)
        {
            Lazy<BitmapSource> banner = GetBannerlazy(gameId);
            if (_games.ContainsKey(gameId))
            {

                var game = _games[gameId];

                var newGame = new SteamGameData(game.Id, game.IsInstalled, game.Name, GetBannerlazy(game.Id));

                _games[gameId] = newGame;
            }
            return banner;
        }
Esempio n. 2
0
        public bool RefreshIsInstalled(int gameId)
        {
            bool isInstalled = GetIsInstalled(gameId);

            if (_games.ContainsKey(gameId))
            {
                var game = _games[gameId];

                var newGame = new SteamGameData(game.Id, isInstalled, game.Name, game.Banner);

                _games[gameId] = newGame;
            }
            return(isInstalled);
        }
Esempio n. 3
0
        public Lazy <BitmapSource> RefreshBanner(int gameId)
        {
            Lazy <BitmapSource> banner = GetBannerlazy(gameId);

            if (_games.ContainsKey(gameId))
            {
                var game = _games[gameId];

                var newGame = new SteamGameData(game.Id, game.IsInstalled, game.Name, GetBannerlazy(game.Id));

                _games[gameId] = newGame;
            }
            return(banner);
        }
Esempio n. 4
0
        public void Refresh()
        {
            _games.Clear();

            var ownedGames = GetOwnedGameIds();
            var installedGames = GetInstalledGameIds();
            var toName = GetIdsToNames();

            foreach(var ownedGame in ownedGames)
            {
                string name;
                if (!toName.TryGetValue(ownedGame, out name))
                    name = $"Unknown GameID : {ownedGame.ToString()}";

                bool isInstalled = installedGames.Contains(ownedGame);

                var banner = GetBannerlazy(ownedGame);

                _games[ownedGame]=new SteamGameData(ownedGame,isInstalled, name,banner);
            }
        }
Esempio n. 5
0
        public void Refresh()
        {
            _games.Clear();

            var ownedGames     = GetOwnedGameIds();
            var installedGames = GetInstalledGameIds();
            var toName         = GetIdsToNames();

            foreach (var ownedGame in ownedGames)
            {
                string name;
                if (!toName.TryGetValue(ownedGame, out name))
                {
                    name = $"Unknown GameID : {ownedGame.ToString()}";
                }

                bool isInstalled = installedGames.Contains(ownedGame);

                var banner = GetBannerlazy(ownedGame);

                _games[ownedGame] = new SteamGameData(ownedGame, isInstalled, name, banner);
            }
        }
Esempio n. 6
0
        public bool RefreshIsInstalled(int gameId)
        {
            bool isInstalled = GetIsInstalled(gameId);
            if (_games.ContainsKey(gameId))
            {
                var game = _games[gameId];

                var newGame = new SteamGameData(game.Id, isInstalled, game.Name, game.Banner);

                _games[gameId] = newGame;
            }
            return isInstalled;
        }