예제 #1
0
 internal void SetMapCenter(object sender, MapLocationEventArgs e)
 {
     if (LocationChanged != null)
     {
         LocationChanged(sender, e);
     }
 }
예제 #2
0
 private void EventPublisher_MainMapLocationChanged(object sender, MapLocationEventArgs e)
 {
     if (sender != this)
     {
         if (e.OldLocation == null)
         {
             // First time the main map has been set
             var miniMapStart = new Location(DisplayTypes.Shape, e.NewLocation.Point, MiniMapDrawerFactory.MaxZoomLevel);
             _map.SetCenter(miniMapStart);
         }
         else if (e.NewLocation.Zoom != e.OldLocation.Zoom || GetDistance(e.NewLocation, _map.Location) > MoveVisibleRectangleDistance)
         {
             _map.SetCenter(e.NewLocation.Point, GetZoomLevel());
             _map.Invalidate(false);
         }
         else
         {
             _map.Invalidate(false);
         }
     }
     else
     {
         _map.Invalidate(false);
     }
 }
예제 #3
0
 /// <summary>
 /// New location
 /// </summary>
 private void EventPublisher_LocationChanged(object sender, MapLocationEventArgs e)
 {
     _updatingZoom       = true;
     ZoomControl.Minimum = e.ZoomInfo.Minimum;
     ZoomControl.Maximum = e.ZoomInfo.Maximum;
     ZoomControl.Value   = e.NewLocation.Zoom;
     _updatingZoom       = false;
 }
예제 #4
0
        /// <summary>
        /// Update visibility of villages after map move
        /// </summary>
        private void EventPublisher_LocationChanged(object sender, MapLocationEventArgs e)
        {
            var villageDs = (PolygonDataSet)GridExVillage.DataSource;

            foreach (var record in villageDs.VILLAGE.Rows.OfType <PolygonDataSet.VILLAGERow>())
            {
                record.ISVISIBLE = World.Default.Map.Display.IsVisible(record.Village);
            }
        }
예제 #5
0
 private void EventPublisher_LocationChanged(object sender, MapLocationEventArgs e)
 {
     foreach (var row in Table.TableModel.Rows.OfType <Row>())
     {
         var twRow = row as ITwContextMenu;
         if (twRow != null)
         {
             row.Cells[0].Image = GetVisibleImage(twRow.GetVillages());
         }
     }
 }
예제 #6
0
 private void EventPublisher_OwnLocationChanged(object sender, MapLocationEventArgs e)
 {
     if (sender != _map)
     {
         _mainMap.SetCenter(new Location(e.NewLocation.Display, e.NewLocation.Point, _mainMap.Location.Zoom));
         _map.Invalidate(false);
     }
     else
     {
         _map.Invalidate(false);
     }
 }
예제 #7
0
        private void EventPublisher_LocationChanged(object sender, MapLocationEventArgs e)
        {
            if (e.IsDisplayChange)
            {
                bool isInShapeDisplay = e.NewLocation.Display == DisplayTypes.Shape;

                ToolStripIconDisplay.CheckState  = !isInShapeDisplay ? CheckState.Checked : CheckState.Unchecked;
                ToolStripShapeDisplay.CheckState = isInShapeDisplay ? CheckState.Checked : CheckState.Unchecked;

                MenuMapIconDisplay.CheckState  = ToolStripIconDisplay.CheckState;
                MenuMapShapeDisplay.CheckState = ToolStripShapeDisplay.CheckState;
            }
        }
예제 #8
0
 private void EventPublisher_LocationChanged(object sender, MapLocationEventArgs e)
 {
     Invalidate();
 }
예제 #9
0
 private void EventPublisherOnLocationChanged(object sender, MapLocationEventArgs mapLocationEventArgs)
 {
     GridExVillage.Refresh();
 }
예제 #10
0
 private void EventPublisher_LocationChanged(object sender, MapLocationEventArgs e)
 {
     _ruler.ClearCache();
     XRuler.Invalidate();
     YRuler.Invalidate();
 }