Exemplo n.º 1
0
        public static void SaveGameData(GameData gameData)
        {
            using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication())
            {
                if (isf.FileExists(gameDataFileName))
                    isf.DeleteFile(gameDataFileName);

                using (var stream = isf.OpenFile(gameDataFileName, System.IO.FileMode.CreateNew))
                {
                    Serializer.Serialize<GameData>(stream, gameData);
                }
            }
        }
Exemplo n.º 2
0
 private static void LoadGameData()
 {
     LoadIsTrial();
     if (GameData == null)
     {
         GameData = GameData.LoadGameData();
     }
 }