Пример #1
0
 private void Marker_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
 {
     if (e.RightButton == MouseButtonState.Pressed)
     {
         IsMouseDown   = true;
         mousePoint    = e.GetPosition(MainMap);
         mouseCtrl     = sender;
         dragMarker    = (PositionMarker)mouseCtrl;
         currentMarker = dragMarker.getGmapMarker();
     }
 }
Пример #2
0
 public void marker_Click(object sender, MouseButtonEventArgs e)
 {
     Console.WriteLine("点击了一下marker");
     if (e.LeftButton == MouseButtonState.Released)
     {
         Dictionary <string, Building> globalMapForBuiding = GlobalMapForShow.globalMapForBuiding;
         PositionMarker       marker = (PositionMarker)sender;
         System.Windows.Point p      = e.GetPosition(MainMap);
         mainWindow.setClickPoint(MainMap.FromLocalToLatLng((int)p.X, (int)p.Y));
         mainWindow.setCurrentMarker(marker.getGmapMarker());
         Building   b    = marker.building;
         SystemPage page = new SystemPage(mainWindow, b);
         mainWindow.getMainPage().Content = page;
     }
 }