public void LoadNewSongPack(SongPack songPack) { if (form.listSongPacks.SelectedIndex < 0) { return; } form.grpMaps.Visible = true; songPack.ReloadMapsListInCurrentSongPack(form.listMap); }
public void DeleteMap(SongPack songPack) { try { string directory = songPack.CustomMaps[form.listMap.SelectedIndex].directoryPath; if (Directory.Exists(directory)) { Directory.Delete(directory, true); } else { MessageBox.Show("This map doesn't exist!"); } songPack.ReloadMapsListInCurrentSongPack(form.listMap); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }