public void saveGame() { safeClass.Start(); safeClass.Save(); allItems.SaveStolenItems(); SavedGame(safeClass); tempLoad = Load(); }
public void SavedGame(SaveClass toSave) { var serializer = new XmlSerializer(typeof(SaveClass)); using (var stream = new System.IO.FileStream(Application.dataPath + "/SavedGame.xml", FileMode.Create)) { serializer.Serialize(stream, toSave); } toSave.Save(); }
public void SaveTo(SaveClass cl) { System.Windows.Forms.SaveFileDialog openfile = new System.Windows.Forms.SaveFileDialog(); openfile.Filter = "Post files|*.mpst"; var result = openfile.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { cl.Save(openfile.FileName); } }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { SaveClass.Save(viewModel); }