Exemple #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)
     {
     }
 }
Exemple #2
0
 public void SaveHighScores()
 {
     HighScores.Serialize(mHighScores, mHighScoresPath);
 }
Exemple #3
0
 public MainWindowViewModel()
 {
     mHighScores = HighScores.Deserialize(mHighScoresPath);
 }