示例#1
0
 private void UpdatePolygons()
 {
     if (Outlines == null)
     {
         return;
     }
     if (AreOutlinesVisible)
     {
         foreach (MapPolygon polygon in Outlines.Keys)
         {
             RhitLocation.ShowOutline(polygon);
         }
     }
     else
     {
         foreach (MapPolygon polygon in Outlines.Keys)
         {
             RhitLocation.HideOutline(polygon);
         }
     }
 }
示例#2
0
 private void CurrentLocationChanged(object sender, LocationEventArgs e)
 {
     if (!AreOutlinesVisible)
     {
         if (e.NewLocation == null)
         {
             RhitLocation.HideOutline(e.OldLocation.OutLine);
         }
         else
         {
             if (e.OldLocation != null)
             {
                 RhitLocation.HideOutline(e.OldLocation.OutLine);
             }
             RhitLocation.ShowOutline(e.NewLocation.OutLine);
         }
     }
     if (e.NewLocation != null)
     {
         MapControl.Center = e.NewLocation.Center;
     }
 }