예제 #1
0
        private void SaveGame(object sender, EventArgs e)
        {
            SaveFileDialog saveDialog = new SaveFileDialog();

            saveDialog.Filter           = "txt files (*.txt)|*.txt";
            saveDialog.InitialDirectory = @".\Saves";
            saveDialog.RestoreDirectory = true;
            if (saveDialog.ShowDialog() == DialogResult.OK)
            {
                model.SaveGame(saveDialog.FileName);
            }
        }
예제 #2
0
 public void SaveGameTest()
 {
     model.NewGame(29);
     Assert.AreEqual(true, model.SaveGame(@"..\..\..\..\TestFiles\test1.txt"));
 }