public static DataModel Load() { if (File.Exists(DataPath)) { return(DataSerializer.DeserializeItem(DataPath)); } return(new DataModel()); }
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; }
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"); }
public void TestMethod2() { var model = DataSerializer.DeserializeItem(@"C:\My files\Hunting.dat"); }