예제 #1
0
 public void saveGame()
 {
     safeClass.Start();
     safeClass.Save();
     allItems.SaveStolenItems();
     SavedGame(safeClass);
     tempLoad = Load();
 }
예제 #2
0
    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();
    }
예제 #3
0
        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);
            }
        }
예제 #4
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     SaveClass.Save(viewModel);
 }