Esempio n. 1
0
 public static void Serialize(HighScores aHighScores, string aPath)
 {
     try
     {
         using (Stream lStream = new FileStream(aPath, FileMode.Create))
         {
             IFormatter lFormatter = new BinaryFormatter();
             lFormatter.Serialize(lStream, aHighScores);
         }
     }
     catch (Exception lEx)
     {
     }
 }
Esempio n. 2
0
 public void SaveHighScores()
 {
     HighScores.Serialize(mHighScores, mHighScoresPath);
 }
Esempio n. 3
0
 public MainWindowViewModel()
 {
     mHighScores = HighScores.Deserialize(mHighScoresPath);
 }