示例#1
0
 public GMarkerRect(GMarkerRadar marker) : base(marker.Position)
 {
     IsHitTestVisible = true;
     InnerMarker      = marker;
     Size             = new Size(30, 30);
     Offset           = new Point(-Size.Width / 2, -Size.Height / 2);
 }
示例#2
0
        private void radarHandler_RadarCreate(RadarSite radar)
        {
            GMarkerRadar marker = new GMarkerRadar(radar);
            GMarkerRect  rect   = new GMarkerRect(marker);

            radarOverlay.Markers.Add(marker);
            radarOverlay.Markers.Add(rect);
            radarMarkers.Add(radar.Name, rect);
        }
示例#3
0
        private void radarHandler_RadarRemove(RadarSite radar)
        {
            GMarkerRect  rect   = radarMarkers[radar.Name];
            GMarkerRadar marker = rect.InnerMarker as GMarkerRadar;

            if (marker.IsRadiusShow)
            {
                radarOverlay.Polygons.Remove(marker.RadiusPolygon);
            }
            trackOverlay.Markers.Remove(marker);
            trackOverlay.Markers.Remove(rect);
            rect.Dispose();
            radarMarkers.Remove(radar.Name);
        }
示例#4
0
        private void radarHandler_RadarUpdate(RadarSite radar)
        {
            GMarkerRect  rect   = radarMarkers[radar.Name];
            GMarkerRadar marker = rect.InnerMarker as GMarkerRadar;

            radarOverlay.Polygons.Remove(marker.RadiusPolygon);
            marker.RenewRadius();
            if (marker.IsRadiusShow)
            {
                radarOverlay.Polygons.Add(marker.RadiusPolygon);
            }
            rect.SetPosition(radar.Position);
            mainMap.Invalidate();
        }
示例#5
0
 private void radarHandler_RadarClear()
 {
     radarHandler.Radars.ForEach(x =>
     {
         GMarkerRect rect    = radarMarkers[x.Name];
         GMarkerRadar marker = rect.InnerMarker as GMarkerRadar;
         if (marker.IsRadiusShow)
         {
             radarOverlay.Polygons.Remove(marker.RadiusPolygon);
         }
         radarOverlay.Markers.Remove(marker);
         radarOverlay.Markers.Remove(rect);
         rect.Dispose();
     });
     radarMarkers.Clear();
 }