示例#1
0
 private void _axmapcontrol_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (!this.IsDisposed)
     {
         p1.Visible = p2.Visible = p3.Visible = p4.Visible = true;
     }
 }
示例#2
0
 private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (e.button == 1 && search)//如果是查询状态并且是左键点击
     {
         identifyDialog.OnMouseUp(e.mapX, e.mapY);
     }
 }
示例#3
0
 private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (e.button == 2)
     {
         this.contextMenuOverview.Show(this.axMapControl1, new System.Drawing.Point(e.x, e.y));
     }
 }
示例#4
0
 private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if ((e.button == 2) && (this.m_OverwindowsLayersType != OverwindowsLayersType.LayerSettings))
     {
         this.contextMenuStrip1.Show(this.axMapControl1, new System.Drawing.Point(e.x, e.y));
     }
 }
示例#5
0
 private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if ((e.button == 2) && (this.axMapControl1.ContextMenuStrip != null))
     {
         this.axMapControl1.ContextMenuStrip.Show(this.axMapControl1, e.x, e.y);
     }
 }
 private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (e.button == 2)
     {
         m_toolbarMenu.PopupMenu(e.x, e.y, axMapControl1.hWnd);
     }
 }
 private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     try
     {
         if (!_Editor.IsEditing)
         {
             return;
         }
         if (EditingFeature)
         {
             m_DisplayGeometry = _Editor.EndFeatureEdit(e.x, e.y);
             _Editor.ClearSelection();
             _Editor.SelectOnMouseDown();
             _Editor.SetMapcontrolMousePointer(esriControlsMousePointer.esriPointerArrow);
             EditingFeature    = false;
             WaitingForUpdated = true;
         }
         else if (Moving)
         {
             m_DisplayGeometry = _Editor.EndFeatureMove(e.x, e.y);
             _Editor.UpdateEdit(m_DisplayGeometry);
             _Editor.ClearSelection();
             _Editor.SelectOnMouseDown();
             Moving            = false;
             WaitingForUpdated = true;
         }
     }
     catch { }
 }
示例#8
0
        private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
        {
            if (e.button == 1)
            {
                switch (m_ToolStatus)
                {
                //case ForAR.Bus_Move:
                //    if (m_FeedBack != null)
                //    {
                //        IMovePointFeedback pointMoveFeedback = m_FeedBack;
                //        if (m_CurFeature != null)
                //        {
                //              m_CurFeature.Shape = pointMoveFeedback.Stop();
                //              m_CurFeature.Store();
                //            EngineFuntions.PartialRefresh(EngineFuntions.m_Layer_BusStation);
                //        }
                //        m_FeedBack = null;
                //    }

                //m_ToolStatus = -1;
                //axMapControl1.MousePointer = esriControlsMousePointer.esriPointerDefault;
                //    break;
                default:
                    break;
                }
            }
        }
示例#9
0
 void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (mScreenDisplay != null && 4 == e.button)
     {
         mScreenDisplay.PanStop();
         this.axMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewAll, null, this.axMapControl1.ActiveView.Extent);
     }
 }
示例#10
0
 /// <summary>
 /// 取消点击
 /// </summary>
 private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     //漫游(BaseTool方法)
     if (pan != null)
     {
         pan.OnMouseUp(e.button, e.shift, e.x, e.y);
     }
 }
示例#11
0
 //鼠标抬起!
 private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (e.button == 2)
     {
         double dRotationAngle = axMapControl1.ActiveView.ScreenDisplay.RotateStop();              //获取旋转的角度
         axMapControl1.Rotation = dRotationAngle;                                                  //赋值给 axMapControl1.Rotation,这下真的旋转了!
         axMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null); //刷新!
     }
 }
示例#12
0
 private void MainMap_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     switch (m_curTool)
     {
     case GISTool.Select:
         m_selectTool.OnMouseUp(e.button, e.shift, e.x, e.y);
         break;
     }
 }
示例#13
0
 private void axMapControl2_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (pSmallViewerEnvelope != null)
     {
         pEn = pSmallViewerEnvelope.Stop();
         axMapControl1.Extent  = pEn;
         isTrackingSmallViewer = false;
     }
 }
示例#14
0
 private void axMapControl_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (_App.CurrentTool != null)
     {
         _Tool = _ToolCol[_App.CurrentTool];
         _Tool.OnMouseUp(e.button, e.shift, (int)e.mapX, (int)e.mapY);
     }
     toolStripStatusLabel2.Text = " 当前坐标X:" + e.mapX.ToString() + "  Y:" + e.mapY.ToString();
 }
示例#15
0
 /// <summary>
 /// 鼠标左键弹起事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void mapControl_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (e.button == 1 && !isControl)
     {
         isFinish    = true;
         isMouseDown = false;
         RegistCommondExecutedEvent();
         ReleaseCommond();//修改  陈静
     }
 }
示例#16
0
 private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (pNewEnvelopeFeedback != null)
     {
         IActiveView pActiveView = null;
         pActiveView = axMap.Map as IActiveView;
         IEnvelope pEnvelope = pNewEnvelopeFeedback.Stop();
         pNewEnvelopeFeedback = null;
     }
 }
示例#17
0
 private void axMapControl2_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (e.button == 1 && pMoveRectPoint != null)
     {
         if (e.mapX == pMoveRectPoint.X && e.mapY == pMoveRectPoint.Y)
         {
             axMapControl1.CenterAt(pMoveRectPoint);
         }
     }
 }
 private void axMapControl2_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (e.button == 1 && Variable.pMoveRectPoint != null)
     {
         if (e.mapX == Variable.pMoveRectPoint.X && e.mapY == Variable.pMoveRectPoint.Y)
         {
             Variable.pMapFrm.mainMapControl.CenterAt(Variable.pMoveRectPoint);
         }
         Variable.bCanDrag = false;
     }
 }
示例#19
0
 private void eagleEyeMapControl_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (e.button == 1 && pMoveRectPoint != null)
     {
         if (e.mapX == pMoveRectPoint.X && e.mapY == pMoveRectPoint.Y)
         {
             mainMapControl.CenterAt(pMoveRectPoint);
         }
         bCanDrag = false;
     }
 }
示例#20
0
 public static void end_move(IMapControlEvents2_OnMouseUpEvent e)
 {//结束鹰眼操作
     if (e.button == 1 && pMoveRectPoint != null)
     {
         if (e.mapX == pMoveRectPoint.X && e.mapY == pMoveRectPoint.Y)
         {
             mainForm.mainform.mainMapControl.CenterAt(pMoveRectPoint);
         }
         bCanDrag = false;
     }
 }
示例#21
0
 private void EagleEyemapcontrol_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (e.button != 1 || pMoveRectPoint == null)
     {
         return;
     }
     if (e.mapX == pMoveRectPoint.X && e.mapY == pMoveRectPoint.Y)
     {
         axMapControl1.CenterAt(pMoveRectPoint);
     }
     bCanDrag = false;
 }
示例#22
0
        void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
        {
            switch (m_CurMapOperation)
            {
            case MapOperation.MapSelectByRect:
                //Map_SearchByShape();
                break;

            default:
                break;
            }
        }
示例#23
0
        ////最后定位鹰眼矩形
        private void MapIndex_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
        {
            if (RectEye == null || EyeMove == null || PtStart == null)
            {
                return;
            }

            RectEye.PutCoords(EyeMove.XMin, EyeMove.YMin, EyeMove.XMax, EyeMove.YMax);
            m_FrmActive.mapMain.Extent = EyeMove;
            MapIndex.Refresh();
            PtStart = null;
            EyeMove = null;
        }
示例#24
0
        private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
        {
            if (m_Feature == null)
            {
                return;
            }
            IGeometry resultGeometry = null;

            switch (strOperator)
            {
            case "move":
                if (m_Feature.Shape.GeometryType == esriGeometryType.esriGeometryPoint)
                {
                    //停止移动
                    resultGeometry  = m_MovePointFeedback.Stop() as IGeometry;
                    m_Feature.Shape = resultGeometry;
                }
                else if (m_Feature.Shape.GeometryType == esriGeometryType.esriGeometryPolyline)
                {
                    //停止移动
                    resultGeometry  = m_MoveLineFeedback.Stop() as IGeometry;
                    m_Feature.Shape = resultGeometry;
                }
                else if (m_Feature.Shape.GeometryType == esriGeometryType.esriGeometryPolygon)
                {
                    //停止移动
                    resultGeometry  = m_MovePolygonFeedback.Stop() as IGeometry;
                    m_Feature.Shape = resultGeometry;
                }
                IWorkspaceEdit workspaceEdit;
                IWorkspace     workspace;
                IDataset       dataset = m_FeatureLayer.FeatureClass as IDataset;
                workspace     = dataset.Workspace;
                workspaceEdit = workspace as IWorkspaceEdit;
                //开始编辑
                workspaceEdit.StartEditing(true);
                workspaceEdit.StartEditOperation();
                //保存实体
                m_Feature.Store();
                //结束编辑
                workspaceEdit.StopEditOperation();
                workspaceEdit.StopEditing(true);
                m_MovePointFeedback   = null;
                m_MoveLineFeedback    = null;
                m_MovePolygonFeedback = null;
                break;
            }
            m_activeView.Refresh();
            this.axMapControl1.Map.ClearSelection();
        }
示例#25
0
 private void axMapControl_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     try
     {
         if (_App.CurrentTool != null)
         {
             _Tool = _ToolCol[_App.CurrentTool];
             _Tool.OnMouseUp(e.button, e.shift, (int)e.mapX, (int)e.mapY);
         }
         statusButton2.Text = " 当前坐标X:" + e.mapX.ToString() + "  Y:" + e.mapY.ToString();
     }
     catch (System.Exception ex)
     {
         return;
     }
 }
示例#26
0
        private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
        {
            //移动多边形节点
            //当“编辑polygon”被勾选且标记符为2时
            if (miEditPolygon.Checked && m_marker == 2)
            {
                //删除原多边形的顶点
                if (m_list.Count != 0)
                {
                    for (int j = 0; j < m_list.Count; j++)
                    {
                        m_graphicsContainer.DeleteElement(m_list[j]);
                    }
                    m_list.Clear();
                }
                //停止绘制已选中的polygon
                m_polygon = ((IPolygonMovePointFeedback)m_DisplayFeedback).Stop();
                //如果新polygon不为空,更新被存放的多边形
                if (m_polygon != null)
                {
                    m_hitElement.Geometry = m_polygon;
                    m_graphicsContainer.UpdateElement(m_hitElement);
                }
                //将新多边形的点放入新的点集存放并显示
                m_PointColl = m_polygon as IPointCollection;
                for (int k = 1; k < m_PointColl.PointCount; k++)
                {
                    IMarkerElement      p_markerelement      = new MarkerElementClass();
                    ISimpleMarkerSymbol p_simplemarkersymbol = new SimpleMarkerSymbolClass();
                    p_simplemarkersymbol.Size = 5;

                    IElement p_element = (IElement)p_markerelement;
                    p_markerelement.Symbol = p_simplemarkersymbol as IMarkerSymbol;

                    if (p_element != null)
                    {
                        p_element.Geometry = m_PointColl.get_Point(k);

                        m_graphicsContainer.AddElement(p_element, 0);
                    }
                    m_list.Add(p_element);
                }
                this.axMapControl1.Refresh(esriViewDrawPhase.esriViewGraphics, null, null);
                //重置编辑符为零
                m_marker = 0;
            }
        }
示例#27
0
        /// <summary>
        /// 鼠标弹起结束绘制
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void mapControl_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
        {
            IPoint point = new PointClass()
            {
                X = e.mapX, Y = e.mapY
            };

            envelope = rectangleFeedback.Stop() as IEnvelope;

            int layerCount = mapControl.LayerCount;

            for (int i = 0; i < layerCount; i++)
            {
                ILayer layer = mapControl.get_Layer(i);
                CompositeGraphicsLayerClass comp = layer as CompositeGraphicsLayerClass;
                if (comp == null)
                {
                    continue;
                }
                if (envelope.IsEmpty == true)
                {
                    elementEnums = comp.LocateElements(point, 0);
                }
                else
                {
                    elementEnums = comp.LocateElementsByEnvelope(envelope);
                }
                List <IElement> list = new List <IElement>();
                if (elementEnums == null)
                {
                    return;
                }
                IElement el = null;

                do
                {
                    el = elementEnums.Next();
                    if (el != null)
                    {
                        var element = el as IMFElement;
                        listElements.Add(element);
                    }
                }while (el != null);
            }
            ReleaseCommond();
        }
示例#28
0
        /// <summary>
        /// mapControl鼠标放开事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void m_mapControl_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
        {
            switch (e.button)
            {
            case 1:    //左键
                m_mapControl.Focus();
                //执行裁剪,自定义包络线
                this.Capture = false;
                System.Windows.Forms.Cursor.Clip = Rectangle.Empty;
                MouseIsDown = false;
                DrawRectangle();
                MouseRect = Rectangle.Empty;
                //遍历当前所有已打开的窗口,查找clipform
                if (drawflag != "")
                {
                    foreach (XtraForm form in Application.OpenForms)    //遍历所有窗口,查找对应的clip窗口
                    {
                        if (form is ClipForm)
                        {
                            ClipForm clipform = form as ClipForm;
                            if (clipform.Tag.ToString() == drawflag)    //根据窗口tag值,即窗口handle,将坐标传回该clip窗口
                            {
                                (clipform.getrightbottomX()).Text = e.mapX.ToString();
                                (clipform.getrightbottomY()).Text = e.mapY.ToString();
                                clipform.Focus();
                                clipform.Refresh();
                                break;
                            }
                        }
                    }
                }
                drawflag = "";

                break;

            case 2:    //右键
                break;

            case 3:
                break;

            case 4:    //中键
                break;
            }
        }
示例#29
0
        //마우스 클릭 이벤트핸들러
        private void OnMouseClick(object sender, IMapControlEvents2_OnMouseUpEvent e)
        {
            //IPoint pQueryPoint = new PointClass();
            IPoint pQueryPoint = mapControl.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(e.x, e.y);
            var    x           = pQueryPoint.X;
            var    y           = pQueryPoint.Y;

            //클릭범위보정
            int    PxTol      = 6;                            // 6 pixels to select by
            IPoint pNextPoint = mapControl.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(e.x + PxTol, e.y);
            double pSrchDist  = pNextPoint.X - pQueryPoint.X; // measure the distance between points PxTol apart
            //IGeometry buffer = (pQueryPoint as ITopologicalOperator).Buffer(99);
            IGeometry buffer = (pQueryPoint as ITopologicalOperator).Buffer(pSrchDist);

            var XMax = buffer.Envelope.XMax;
            var XMin = buffer.Envelope.XMin;
            var YMax = buffer.Envelope.YMax;
            var YMin = buffer.Envelope.YMin;

            Console.WriteLine("XMax- " + XMax);
            Console.WriteLine("XMin- " + XMin);
            Console.WriteLine("YMax- " + YMax);
            Console.WriteLine("YMin- " + YMin);

            /// 활성화된 레이어에 대해서, 해당 클릭 영역에 존재하는 피쳐팝업을 띄운다
            //FeatureLayer layer = CmmObj.layers[GisCmm.GetLayerNm("SA117")].FL;

            foreach (KeyValuePair <string, FmsFeature> item in CmmObj.layers)
            {
                if (item.Key == "BML_GADM_AS")
                {
                    continue;                            //행정구역레이어는 제외
                }
                if (item.Value.chk)
                {
                    //최종선택 레이어에 대해서만 팝업띄우자..
                    if (sts.Peak().ToString() == item.Key)
                    {
                        findFtrByRegion(item.Value.FL, buffer);
                    }
                }
            }
        }
示例#30
0
 /// <summary>
 /// 鼠标弹起事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void mapControl_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (e.button == 1)
     {
         if (centerDot.Lng == e.mapX && centerDot.Lat == e.mapY)
         {
             if (circleElement != null)
             {
                 layer.RemoveElement(circleElement);
             }
         }
         if (!isControl && !isFinish)
         {
             isMouseDown = false;
             isFinish    = true;
             RegistCommondExecutedEvent();
             ReleaseCommond();//修改  陈静
         }
     }
 }
示例#31
0
 private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     AxMapControl MapControl = (AxMapControl)sender;
     if (e.button == 4 && axMapControl1.ActiveView != null)   //中键
     {
         MapControl.MousePointer = esriControlsMousePointer.esriPointerArrow;
         MapControl.ActiveView.ScreenDisplay.PanStop();
         MapControl.ActiveView.Refresh();
     }
 }
示例#32
0
 private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (e.button == 1 && search)//如果是查询状态并且是左键点击 
     {
         identifyDialog.OnMouseUp(e.mapX, e.mapY);
     }
 }
示例#33
0
 private void axMapControl2_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (pSmallViewerEnvelope != null)
     {
         pEn = pSmallViewerEnvelope.Stop();
         axMapControl1.Extent = pEn;
         isTrackingSmallViewer = false;
     }
 }
        private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
        {
            if (e.button == 2) m_toolbarMenu.PopupMenu(e.x, e.y, axMapControl1.hWnd);

        }  
示例#35
0
 private void axMapControl_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (_App.CurrentTool != null)
     {
         _Tool = _ToolCol[_App.CurrentTool];
         _Tool.OnMouseUp(e.button, e.shift, (int)e.mapX, (int)e.mapY);
     }
     statusButton2.Text = " 当前坐标X:" + e.mapX.ToString() + "  Y:" + e.mapY.ToString();
 }
示例#36
0
 private void mapCtlMain_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (m_bEditNode)
     {
         m_editor.EditFeatureEnd();
     }
 }
示例#37
0
 private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (m_BasicOperationTool == "isMeasure")
     {
         m_bInUse = false;
         if (m_pLineSymbol != null)
         {
             IActiveView pActiveView = axMapControl1.ActiveView.FocusMap as IActiveView;
             pActiveView.ScreenDisplay.StartDrawing(pActiveView.ScreenDisplay.hDC, -1);
             pActiveView.ScreenDisplay.SetSymbol(m_pTextSymbol as ISymbol);
             pActiveView.ScreenDisplay.DrawText(m_pTextPoint, m_pTextSymbol.Text);
             pActiveView.ScreenDisplay.SetSymbol(m_pLineSymbol as ISymbol);
             if (m_pLinePolyline.Length > 0)
                 pActiveView.ScreenDisplay.DrawPolyline(m_pLinePolyline);
             pActiveView.ScreenDisplay.FinishDrawing();
             m_pTextSymbol = null;
             m_pTextPoint = null;
             m_pLinePolyline = null;
             m_pLineSymbol = null;
         }
     }
 }
示例#38
0
        private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
        {
            IGeometry pGeometry;
            try
            {
                if (MDIApplication.ParentForm.pyBtn == 1)
                {
                    MDIApplication.ParentForm.pyBtn = 0;
                    // '检查是否存在一个元素
                    if (m_pFeature != null)
                    {
                        //'针对polygon类型

                        IMovePolygonFeedback pMovePolygonF = (IMovePolygonFeedback)m_pDisplayFeedback;
                        pGeometry = pMovePolygonF.Stop();
                        // '更新元素
                        m_pFeature.Shape = pGeometry;

                        m_pFeature.Store();
                        m_pDisplayFeedback = null;
                        this.axMapControl1.ActiveView.Refresh();
                        //'将鼠标外观还原
                        //'Set m_pMouseCursor = New MouseCursor
                        //'m_pMouseCursor.SetCursor 0
                        this.axMapControl1.ActiveView.FocusMap.FeatureSelection.Cut();
                    }
                    return;
                }
                else
                {
                    return;
                }
            }
            catch
            {
                return;
            }
        }
示例#39
0
        /// <summary>
        /// 鼠标弹起的事件处理
        /// </summary>
        public void OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
        {
            //必须在画框的过程中才调用鼠标弹起函数
            if (trackNewEnvelope == null) return;
            //显示当前位置
            DisplayCoordinates(e.mapX, e.mapY);
            //完成画框操作,获取矩形框/点
            identifyEnvelope = trackNewEnvelope.Stop();
            if (identifyEnvelope.IsEmpty)
            {
                IPoint mouseUpPoint = new PointClass();
                mouseUpPoint.PutCoords(e.mapX, e.mapY);
                mouseUpPoint.SpatialReference = pAxMapControl.SpatialReference;
                identifyEnvelope = mouseUpPoint;
            }
            identifyEnvelope.SpatialReference = pAxMapControl.SpatialReference;
            //置空对象
            trackNewEnvelope = null;

            //获取查询图层
            List<LayerFilterProperties> searchLayers = SearchIdentifyLayers();
            //没有图层时不进行任何操作返回
            if (searchLayers == null || searchLayers.Count < 1) return;
            //显示查询信息
            lblFeatureCount.Text = "正在查询...";
            Application.DoEvents();
            //对需查询的图层执行查询操作
            ExecuteIdentify(searchLayers, identifyEnvelope);
            //显示查询结果
            DisplayIdentifyResults();
            //闪烁查询到的结果
            flashObjects.FlashObjects();
        }
示例#40
0
 private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     // axMapControl1.CurrentTool = null;
 }
示例#41
0
        /// <summary>
        /// 松开鼠标
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
        {
            if (this.pDisplayFeedback != null)
            {
                if (this.btnLineMovePoint.Checked)//移动多义线节点
                {
                    IGeometry pGeometry = ((ILineMovePointFeedback)this.pDisplayFeedback).Stop();
                    if (pGeometry != null)
                    {
                        this.hitElement.Geometry = pGeometry;
                        this.pGraphicContainer.UpdateElement(this.hitElement);
                    }

                    this.hitElement = null;
                    this.pDisplayFeedback = null;
                    this.axMapControl1.Refresh(esriViewDrawPhase.esriViewGraphics, null, null);

                }
                else if (this.btnNewCircle.Checked)//画圆
                {
                    IGeometry pGeometry = ((INewCircleFeedback)this.pDisplayFeedback).Stop();

                    this.AddElement(pGeometry);
                    this.pDisplayFeedback = null;
                }
                else if (this.btnNewEnvelope.Checked)//画矩形
                {
                    IGeometry pGeometry = ((INewEnvelopeFeedback)this.pDisplayFeedback).Stop();

                    this.AddElement(pGeometry);
                    this.pDisplayFeedback = null;
                }
                else if (this.btnPolygonMovePoint.Checked)//移动多边形节点
                {
                    IGeometry pGeometry = ((IPolygonMovePointFeedback)this.pDisplayFeedback).Stop();
                    if (pGeometry != null)
                    {
                        this.hitElement.Geometry = pGeometry;
                        this.pGraphicContainer.UpdateElement(this.hitElement);
                    }

                    this.hitElement = null;
                    this.pDisplayFeedback = null;
                    this.axMapControl1.Refresh(esriViewDrawPhase.esriViewGraphics, null, null);

                }
                else if (this.btnMoveGeometry.Checked)//移动几何对象
                {
                    if (this.pEnumElement != null)
                    {
                        this.pEnumElement.Reset();
                        IElement pElement;
                        ITransform2D pTransform2D;
                        //需要用ITransform2D接口逐个逐个的移动element
                        for (pElement = this.pEnumElement.Next(); pElement != null; pElement = this.pEnumElement.Next())
                        {
                            pTransform2D = pElement as ITransform2D;
                            pTransform2D.Move(e.mapX - this.moveGeometryStartPoint.X, e.mapY - this.moveGeometryStartPoint.Y);
                            this.pGraphicContainer.UpdateElement(pElement);
                        }
                        this.moveGeometryStartPoint = null;
                        this.pEnumElement = null;
                        this.pDisplayFeedback = null;
                        this.axMapControl1.Refresh(esriViewDrawPhase.esriViewGraphics, null, null);
                    }
                }
                else if (this.btnStretchLine.Checked)//拉伸多义线
                {
                    if (this.hitElement != null)
                    {
                        IGeometry pGeometry = ((IStretchLineFeedback)this.pDisplayFeedback).Stop();
                        this.hitElement.Geometry = pGeometry;
                        this.pGraphicContainer.UpdateElement(this.hitElement);

                        this.hitElement = null;
                        this.pDisplayFeedback = null;
                        this.axMapControl1.Refresh(esriViewDrawPhase.esriViewGraphics, null, null);
                    }
                }
            }
        }
示例#42
0
        /* private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            int intRowHandle = e.FocusedRowHandle;
            int FocusedRow_id;

           object rowIdObj = gridView1.GetRowCellValue(intRowHandle,"id");

           if (DBNull.Value != rowIdObj)//做个判断否则获取不到id后报错
           {
               FocusedRow_id = Convert.ToInt32(rowIdObj);
               MessageBox.Show(FocusedRow_id.ToString());
           }

        }
        */
        private void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
        {
            identifyDialog.OnMouseUp(e.mapX, e.mapY);
        }
示例#43
0
        private void axMapControl2_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
        {
            if (e.button == 1)
            {
                IFillShapeElement fillSymbol = m_AOI as IFillShapeElement;
                fillSymbol.Symbol = m_pFillSymbol;
                IElement element = m_AOI as IElement;
                IEnvelope envelope = element.Geometry.Envelope as IEnvelope;

                IPoint point = new PointClass();
                point.PutCoords(e.mapX, e.mapY);
                envelope.CenterAt(point);

                m_AOI.Geometry = envelope;

                UpdateUI();
                Newleaf.ExtentUpdatedEventArgs args = new Newleaf.ExtentUpdatedEventArgs(envelope);
                OnExtentUpdating(args);

            }
        }