public void removeMeteorite(MeteoriteLib.Meteorite meteo) { MeteoVizPushpin mvp = (MeteoVizPushpin)(this.Values.OfType <MeteoVizPushpin>().Select(m => m.Meteorite.Id == meteo.Id)); mvp.MapVizSelected -= Mvp_MapVizSelected; this.Remove(mvp.Id); }
public void addMeteorite(MeteoriteLib.Meteorite meteo) { if (meteo == null) { return; } MeteoVizPushpin mvp = new MeteoVizPushpin(meteo); mvp.Location = new Location(meteo.RectLat, meteo.RectLong); mvp.MapVizSelected += Mvp_MapVizSelected; this.Add(mvp.Id, mvp); }
public KeyValuePair <Guid, IMapViz> getKeyValuePair(MeteoriteLib.Meteorite meteo) { KeyValuePair <Guid, IMapViz> kvpOut = new KeyValuePair <Guid, IMapViz>(); foreach (KeyValuePair <Guid, IMapViz> kvp in this) { if (kvp.Value is MeteoVizPushpin) { if (((MeteoVizPushpin)kvp.Value).Meteorite.Equals(meteo)) { return(kvp); } } } return(kvpOut); }