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; }
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); }
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); }
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); } }
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); } }
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; }