Пример #1
0
 public void Load()
 {
     var file = IsolatedStorageFile.GetUserStoreForApplication();
     if (file.FileExists("data.dat"))
     {
         try
         {
             using (var fs = file.OpenFile("data.dat", FileMode.Open))
             {
                 var dc = new DataContractSerializer(typeof(TenSecGame));
                 this.Game = dc.ReadObject(fs) as TenSecGame;
             }
         }
         catch
         {
             this.Game = new TenSecGame();
         }
     }
     else
     {
         this.Game = new TenSecGame();
     }
 }
Пример #2
0
 public void TearDown()
 {
     this.game = null;
     this.scheduler = null;
 }
Пример #3
0
 public void SetUp()
 {
     this.scheduler = new HistoricalScheduler();
     scheduler.AdvanceTo(GameStartDateTimeOffset);
     this.game = new Okazuki.TenSecGame.Models.TenSecGame(scheduler);
 }