private void btn_Load_Click(object sender, EventArgs e) { List <string> allLevels = StorageManagement.StorageManagement.getLevelList(); using (var levelSelect = new LevelSelect(allLevels)) { levelSelect.ShowDialog(); if (levelSelect.selectedLevelName != null) { if (StorageManagement.StorageManagement.loadLevel(levelSelect.selectedLevelName) != null) { LevelDesigner.MyLevel = StorageManagement.StorageManagement.loadLevel(levelSelect.selectedLevelName); createGameBoard(LevelDesigner.MyLevel.Height, LevelDesigner.MyLevel.Width, true); comboBox1.Visible = false; btn_Load.Visible = false; isloaded = true; minotaur = new Minotaur(); theseus = new Theseus(); loadGameBoard(LevelDesigner.MyLevel, sender, theseus, minotaur); } } } }
private void btn_Load_Click(object sender, EventArgs e) { List<string> allLevels = StorageManagement.StorageManagement.getLevelList(); using (var levelSelect = new LevelSelect(allLevels)) { levelSelect.ShowDialog(); if (levelSelect.selectedLevelName != null) { if (StorageManagement.StorageManagement.loadLevel(levelSelect.selectedLevelName) != null){ LevelDesigner.MyLevel = StorageManagement.StorageManagement.loadLevel(levelSelect.selectedLevelName); createGameBoard(LevelDesigner.MyLevel.Height, LevelDesigner.MyLevel.Width, true); comboBox1.Visible = false; btn_Load.Visible = false; isloaded = true; minotaur = new Minotaur(); theseus = new Theseus(); loadGameBoard(LevelDesigner.MyLevel, sender, theseus, minotaur); } } } }