Esempio n. 1
0
        private void MoveVertexButton_Click(object sender, EventArgs e)
        {
            if (_geoMap == null)
            {
                return;
            }
            if (_activeLayer == null)
            {
                return;
            }
            if (_moveVertexFunction == null)
            {
                _moveVertexFunction = new MoveVertexFunction(_geoMap)
                {
                    Name = "MoveVertex"
                };
            }

            if (_geoMap.MapFunctions.Contains(_moveVertexFunction) == false)
            {
                _geoMap.MapFunctions.Add(_moveVertexFunction);
            }
            _geoMap.FunctionMode      = FunctionMode.None;
            _geoMap.Cursor            = Cursors.Cross;
            _moveVertexFunction.Layer = _activeLayer;
            UpdateMoveVertexFunctionLayer();
            _moveVertexFunction.Activate();
        }
Esempio n. 2
0
        private void MoveVertexButtonClick(object sender, EventArgs e)
        {
            if (_geoMap == null)
            {
                return;
            }

            if (_activeLayer == null)
            {
                return;
            }

            if (_moveVertexFunction == null)
            {
                _moveVertexFunction = new MoveVertexFunction(_geoMap, this)
                {
                    Name = "MoveVertex"
                };
                _moveVertexFunction.MoveVertexCulture = _handlerCulture;
            }

            if (_geoMap.MapFunctions.Contains(_moveVertexFunction) == false)
            {
                _geoMap.MapFunctions.Add(_moveVertexFunction);
            }

            _geoMap.FunctionMode = FunctionMode.None;
            _geoMap.Cursor       = Cursors.Cross;
            _shapeDraggingActivButton.Enabled = true;
            _moveVertexFunction.Layer         = _activeLayer;
            UpdateMoveVertexFunctionLayer();
            _moveVertexFunction.Activate();
            UpdateShowVerticesActivCheck();
        }
Esempio n. 3
0
        /// <summary>
        /// 도형요소 구성좌표 편집하기, MoveVertexFunction을 Activate한다.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MoveVertexButtonClick(object sender, EventArgs e)
        {
            if (_geoMap == null)
            {
                return;
            }

            if (_geoMap.Layers.SelectedLayer != null)
            {
                _activeLayer = _geoMap.Layers.SelectedLayer as IFeatureLayer;
            }

            if (_activeLayer == null)
            {
                MessageBox.Show("편집 대상 레이어를 선택하여 주십시요.");
                return;
            }

            // 편집함수가 없으면 편집함수를 생성한다.
            if (_moveVertexFunction == null)
            {
                _moveVertexFunction = new MoveVertexFunction(_geoMap)
                {
                    Name = "MoveVertex"
                };
            }

            // 현재 맵 컨트롤에 편집함수를가 없으면, 생성한 편집함수를 추가한다.
            if (_geoMap.MapFunctions.Contains(_moveVertexFunction) == false)
            {
                _geoMap.MapFunctions.Add(_moveVertexFunction);
            }

            _geoMap.FunctionMode = FunctionMode.None;
            _geoMap.Cursor       = Cursors.Cross;

            _moveVertexFunction.Layer = _activeLayer;

            UpdateMoveVertexFunctionLayer();
            _moveVertexFunction.Activate();
        }
Esempio n. 4
0
        /// <summary>
        /// 이 처리기를 삭제하여 추가를 담당하는 모든 단추를 제거합니다.
        /// </summary>
        /// <param name="disposeManagedResources">Disposes of the resources.</param>
        protected virtual void Dispose(bool disposeManagedResources)
        {
            if (!_disposed)
            {
                // 추가 된 컨트롤을 제거합니다.
                RemoveControls();

                if (disposeManagedResources)
                {
                    if (_addShapeFunction != null && !_addShapeFunction.IsDisposed)
                    {
                        _addShapeFunction.Dispose();
                    }

                    _geoMap             = null;
                    _activeLayer        = null;
                    _moveVertexFunction = null;
                }

                _disposed = true;
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Disposes this handler, removing any buttons that it is responsible for adding.
        /// </summary>
        /// <param name="disposeManagedResources">Disposes of the resources.</param>
        protected virtual void Dispose(bool disposeManagedResources)
        {
            if (!_disposed)
            {
                // One option would be to leave the non-working tools,
                // but if this gets disposed we should clean up after
                // ourselves and remove any added controls.
                RemoveControls();

                if (disposeManagedResources)
                {
                    if (_addShapeFunction != null && !_addShapeFunction.IsDisposed)
                    {
                        _addShapeFunction.Dispose();
                    }

                    _geoMap             = null;
                    _activeLayer        = null;
                    _moveVertexFunction = null;
                }

                _disposed = true;
            }
        }
Esempio n. 6
0
        /// <summary>
        /// Disposes this handler, removing any buttons that it is responsible for adding.
        /// </summary>
        /// <param name="disposeManagedResources">Disposes of the resources.</param>
        protected virtual void Dispose(bool disposeManagedResources)
        {
            if (!_disposed)
            {
                // One option would be to leave the non-working tools,
                // but if this gets disposed we should clean up after
                // ourselves and remove any added controls.
                RemoveControls();

                if (disposeManagedResources)
                {
                    if (_addShapeFunction != null && !_addShapeFunction.IsDisposed)
                    {
                        _addShapeFunction.Dispose();
                    }

                    _geoMap = null;
                    _activeLayer = null;
                    _moveVertexFunction = null;
                }

                _disposed = true;
            }
        }
Esempio n. 7
0
        private void MoveVertexButton_Click(object sender, EventArgs e)
        {
            if (_geoMap == null) { return; }
            if (_activeLayer == null) { return; }
            if (_moveVertexFunction == null)
            {
                _moveVertexFunction = new MoveVertexFunction(_geoMap) { Name = "MoveVertex" };
            }

            if (_geoMap.MapFunctions.Contains(_moveVertexFunction) == false)
            {
                _geoMap.MapFunctions.Add(_moveVertexFunction);
            }
            _geoMap.FunctionMode = FunctionMode.None;
            _geoMap.Cursor = Cursors.Cross;
            _moveVertexFunction.Layer = _activeLayer;
            UpdateMoveVertexFunctionLayer();
            _moveVertexFunction.Activate();
        }