コード例 #1
0
        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());
        }
コード例 #2
0
ファイル: Games.cs プロジェクト: BlueRaja/Xogar
        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();
        }
コード例 #3
0
ファイル: Games.cs プロジェクト: BlueRaja/Xogar
        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();
        }
コード例 #4
0
ファイル: ThirdPartyGameParser.cs プロジェクト: da3ch1r/Xogar
 public ThirdPartyGameParser()
 {
     thirdPartyGames = ThirdPartyGames.Load();
 }