예제 #1
0
 public static DataModel Load()
 {
     if (File.Exists(DataPath))
     {
         return(DataSerializer.DeserializeItem(DataPath));
     }
     return(new DataModel());
 }
예제 #2
0
        private void ContinueGame_MouseDown(object sender, MouseButtonEventArgs e)
        {
            Form form = new GameWind();

            form.Show();
            form.FormClosing += Frm2_Closing;
            this.Hide();
            Game dgame = DataSerializer.DeserializeItem("save.dat");

            Game.SCORE = dgame.scoreForSerialization;
            Game.KILLS = dgame.killsForSerialization;
            Game.MISS  = dgame.missForSerialization;
        }
예제 #3
0
 public PatternsUserControl(MainWindow window)
 {
     InitializeComponent();
     mWindow = window;
     if (!File.Exists("conventions.dat"))
     {
         Conventions = new ConventionSet();
         DataSerializer.SerializeData("conventions.dat", Conventions);
     }
     else
     {
         Conventions = DataSerializer.DeserializeItem("conventions.dat");
     }
     ReloadConventions();
 }
 public void TestMethodDeserialize()
 {
     var model = DataSerializer.DeserializeItem(fileName);
 }
 public void TestMethodDeSerialize()
 {
     var model = DataSerializer.DeserializeItem(@"C:\MyProject\nulp.pist-21.sem1.SoftwareConstruction\lab_5\out\organizer.dat");
 }
예제 #6
0
 public void TestMethod2()
 {
     var model = DataSerializer.DeserializeItem(@"C:\My files\Hunting.dat");
 }