Ejemplo n.º 1
0
        private void MapFrame_LayerSelected(object sender, LayerSelectedEventArgs e)
        {
            if (!e.IsSelected && e.Layer == _activeLayer)
            {
                _activeLayer = null;
                if (_moveVertexFunction != null)
                {
                    _moveVertexFunction.DeselectFeature();
                }
                return;
            }

            _activeLayer = e.Layer as IFeatureLayer;
            if (_activeLayer == null)
            {
                return;
            }

            if (_moveVertexFunction != null)
            {
                UpdateMoveVertexFunctionLayer();
            }
            else if (_addShapeFunction != null)
            {
                UpdateAddShapeFunctionLayer();
            }
        }
Ejemplo n.º 2
0
        private void MapFrameLayerSelected(object sender, LayerSelectedEventArgs e)
        {
            if (!e.IsSelected && e.Layer == _activeLayer)
            {
                _activeLayer = null;
                _moveVertexFunction?.ClearSelection(); // changed by jany_ (2016-02-24) make sure highlighted features are reset too to prevent exception

                return;
            }

            _activeLayer = e.Layer as IFeatureLayer;
            if (_activeLayer == null)
            {
                return;
            }

            if (_moveVertexFunction != null)
            {
                UpdateMoveVertexFunctionLayer();
            }
            if (_addShapeFunction != null) // changed by jany_ (2016-02-24) update both because moveFeature might not be the active function just because it is not null
            {
                UpdateAddShapeFunctionLayer();
            }
        }
Ejemplo n.º 3
0
 private void LayersLayerSelected(object sender, LayerSelectedEventArgs e)
 {
     if (e.IsSelected)
     {
         _selection.Add(e.Layer);
     }
     else
     {
         _selection.Remove(e.Layer);
     }
 }
 private void onLayerSelectionChanged(Object o, LayerSelectedEventArgs e)
 {
     if (e.IsSelected == false)
     {
         if (e.Layer is IFeatureLayer)
         {
             //ExtFunctions.UpdateDataTable(
             this.UpdateDataTable((IFeatureSet)e.Layer.DataSet);
             tcTableLog.SelectedTab = TableTab;
         }
     }
 }
Ejemplo n.º 5
0
        private void LayersLayerSelected(object sender, LayerSelectedEventArgs e)
        {
            LegendBox lb = BoxFromItem(e.Layer);

            if (lb == null)
            {
                return;
            }
            if (e.IsSelected)
            {
                _selection.Add(lb);
            }
            else
            {
                if (_selection.Contains(lb))
                {
                    _selection.Remove(lb);
                }
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 맵프레임에서 레이어를 선택하면, 편집 레이어로 설정한다.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MapFrameLayerSelected(object sender, LayerSelectedEventArgs e)
        {
            if (!e.IsSelected && e.Layer == _activeLayer)
            {
                _activeLayer = null;

                // 예외를 방지하기 위해 강조 표시된 상태를 재설정합니다.
                _moveVertexFunction?.ClearSelection();

                return;
            }

            _activeLayer = e.Layer as IFeatureLayer;

            if (_activeLayer == null)
            {
                _addShapeBtn.Enabled   = false;
                _moveVertexBtn.Enabled = false;

                return;
            }

            // [20200409] fdragons
            _geoMap.FunctionMode = FunctionMode.Pan;
            _geoMap.Cursor       = Cursors.Hand;

            // 편집중인 도형이 널이 아니기 때문에 둘 다 업데이트한다.
            if (_moveVertexFunction != null)
            {
                UpdateMoveVertexFunctionLayer();
            }

            if (_addShapeFunction != null)
            {
                UpdateAddShapeFunctionLayer();
            }
        }
Ejemplo n.º 7
0
 private void Layers_LayerSelected(object sender, LayerSelectedEventArgs e)
 {
     SetActiveLayer(e.Layer);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Handles the LayerSelected event of the <see cref="EditorTileMap"/> class.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="LayerSelectedEventArgs"/> instance containing the event data.</param>
 private void LayerSelected(object sender, LayerSelectedEventArgs e)
 {
     if (GetSelectedItem() != e.Layer.Name)
         SetSelectedItem(e.Layer.Name);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// De-/activates the zoom to layer button depending on a layer being selected.
 /// </summary>
 /// <param name="sender">Sender that raised the event.</param>
 /// <param name="e">The event args.</param>
 private void LayersLayerSelected(object sender, LayerSelectedEventArgs e)
 {
     _zoomToLayer.Enabled = App.Map.Layers.SelectedLayer != null;
 }
Ejemplo n.º 10
0
 private void MapFrameLayerSelected(object sender, LayerSelectedEventArgs e)
 {
     UpdateStatus();
 }
Ejemplo n.º 11
0
 private void MapFrameLayerSelected(object sender, LayerSelectedEventArgs e)
 {
     Debug.WriteLine("Layer Selected");
     OnMapPropertyChanged();
 }
Ejemplo n.º 12
0
 private void MapFrame_LayerSelected(object sender, LayerSelectedEventArgs e)
 {
     this.LayerSelected();
 }
Ejemplo n.º 13
0
 private void Layers_LayerSelected(object sender, LayerSelectedEventArgs e)
 {
     this.LayerSelected();
 }