private void btn_Save_Click(object sender, EventArgs e) { if (OldMinotaurButton == null && OldTheseusButton == null && OldExitButton == null) { MessageBox.Show("Please set 'Theseus' or 'Minotaur' or 'Exit' "); } else { if (isloaded == true) { StorageManagement.StorageManagement.saveLevel(LevelDesigner.MyLevel); MessageBox.Show("Level is \"Saved\""); } else { using (var levelSave = new LevelSave()) { levelSave.ShowDialog(); LevelDesigner.MyLevel.LevelName = levelSave.levelName; LevelDesigner.MyLevel.LevelPublisher = levelSave.publisherName; } if (!String.IsNullOrWhiteSpace(LevelDesigner.MyLevel.LevelName)) { StorageManagement.StorageManagement.saveLevel(LevelDesigner.MyLevel); MessageBox.Show("Level is \"Saved\""); } else { MessageBox.Show("Please give a name for the Level"); } } } }
private void btn_Save_Click(object sender, EventArgs e) { if (OldMinotaurButton == null && OldTheseusButton == null && OldExitButton == null) { MessageBox.Show("Please set 'Theseus' or 'Minotaur' or 'Exit' "); } else { if(isloaded == true) { StorageManagement.StorageManagement.saveLevel(LevelDesigner.MyLevel); MessageBox.Show("Level is \"Saved\""); } else { using (var levelSave = new LevelSave()) { levelSave.ShowDialog(); LevelDesigner.MyLevel.LevelName = levelSave.levelName; LevelDesigner.MyLevel.LevelPublisher = levelSave.publisherName; } if (!String.IsNullOrWhiteSpace(LevelDesigner.MyLevel.LevelName)) { StorageManagement.StorageManagement.saveLevel(LevelDesigner.MyLevel); MessageBox.Show("Level is \"Saved\""); } else { MessageBox.Show("Please give a name for the Level"); } } } }