public static ThirdPartyGames Load() { XmlSerializer deserialize = new XmlSerializer(typeof(ThirdPartyGames)); if (File.Exists(envFolderPath)) { FileStream stream = new FileStream(envFolderPath, FileMode.Open, FileAccess.Read); ThirdPartyGames thirdGames = (ThirdPartyGames)deserialize.Deserialize(stream); stream.Close(); return(thirdGames); } return(new ThirdPartyGames()); }
public Games(String steamInstallDir) { gameListingParsers = new List <IGameListingParser>(); games = new Dictionary <String, Game>(); IGameListingParser parser = new SimpleValveGameParser(steamInstallDir); gameListingParsers.Add(parser); var thirdPartyParser = new ThirdPartyGameParser(); thirdParty = thirdPartyParser.thirdPartyGames; gameListingParsers.Add(thirdPartyParser); MergeGamesLists(); }
public Games() { gameListingParsers = new List <IGameListingParser>(); games = new Dictionary <String, Game>(); IGameListingParser parser = new SimpleValveGameParser(Properties.Settings.Default.SteamInstallDirectory); gameListingParsers.Add(parser); var thirdPartyParser = new ThirdPartyGameParser(); thirdParty = thirdPartyParser.thirdPartyGames; gameListingParsers.Add(thirdPartyParser); MergeGamesLists(); }
public ThirdPartyGameParser() { thirdPartyGames = ThirdPartyGames.Load(); }