private void btnAddMap_Click(object sender, EventArgs e) { IExtZone zone = (IExtZone)worldmap.GetSelectedZone(); frmLocation location = new frmLocation(zone.EncounterLocations); location.ShowDialog(); if (location.Locations.Count == 0) { return; } if (zone.EncounterLocations == null) { zone.EncounterLocations = new List <EncounterZoneLocation>(); } zone.EncounterLocations.AddRange(location.Locations); RefreshLocationList(); }
private void btnAddMap_Click(object sender, EventArgs e) { IExtZone zone = (IExtZone)worldmap.GetSelectedZone(); frmLocation location = new frmLocation(zone.EncounterLocations); location.ShowDialog(); if (location.Locations.Count == 0) return; if (zone.EncounterLocations == null) zone.EncounterLocations = new List<EncounterZoneLocation>(); zone.EncounterLocations.AddRange(location.Locations); RefreshLocationList(); }