bool MapWindowInstance_TrackPointClicked(DrawAbleTrack drawAbleTrack, DateTime time, bool LeftOrRight) { if (LeftOrRight == false) { Tracks.Remove (drawAbleTrack); return true; } return false; }
private static void LoadTracks(Track[] TrackEntriesToUse, List<DrawAbleTrack> TracksToProcess, Pen PenToUseParameter = null) { String ProcessedTrack = String.Empty; DrawAbleTrack actuallDrawAbleTrack = null; foreach (Track TrackEntry in TrackEntriesToUse) { if (ProcessedTrack != TrackEntry.TrackName) { ProcessedTrack = TrackEntry.TrackName; actuallDrawAbleTrack = new DrawAbleTrack() { PenToUse = PenToUseParameter }; TracksToProcess.Add(actuallDrawAbleTrack); } if ((TrackEntry["Longitude"] == Convert.DBNull) || (TrackEntry["Latitude"] == Convert.DBNull)) continue; TrackPoint NewPoint = new TrackPoint(); actuallDrawAbleTrack.Points.Add(NewPoint); NewPoint.Lon = Convert.ToDouble(TrackEntry["Longitude"]); NewPoint.Lat = Convert.ToDouble(TrackEntry["Latitude"]); NewPoint.Tag = TrackEntry.Id; } }