private void cmbox_ZoneMaps_SelectedIndexChanged(object sender, EventArgs e) { Utils.InvokeOn(this, () => { int index = cmbox_ZoneMaps.SelectedIndex; // Clear box lbox_GpsPoints.Items.Clear(); if (index == 0) { return; } var mapName = cmbox_ZoneMaps.SelectedItem.ToString(); var map = MapsHelper.GetMap(mapName); if (map == null) { return; } var gps = new Gps(Host); switch (map.MapUseType) { case MapUseType.Local: gps.LoadDataBase(map.GetMapPath()); break; case MapUseType.Internal: gps.LoadDataBase(map.GetByteMap()); break; } var points = gps.GetAllGpsPoints().Where (p => p.name.Contains("Fight")).Select(p => p.name + " : " + p.radius); if (points.Count() > 0) { lbox_GpsPoints.Items.AddRange(points.ToArray()); } }); }