Ejemplo n.º 1
0
 private void Editing_Click(object sender, EventArgs e)
 {
     Edit editing = new Edit(this.mapControl);
     editing.Show();
     editing.StartPosition = FormStartPosition.CenterScreen;
     editing.TopMost = true;
 }
Ejemplo n.º 2
0
        //画线+测量
        private void axMapControl1_OnMouseDown(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent e)
        {
            //this.Cursor = Cursors.Default;
            if (e.button==1) //== MouseButtons.Left)
            {
                if (isMeasure)
                {
                    GISHandler.GISTools.CreatLine(this.axMapControl1);
                    isMeasure = false;
                }
                if (areaMeasure)
                {
                   GISHandler.GISTools.MeasureArea(this.axMapControl1);
                    //

                    areaMeasure = false;
                }
                if(polygonSt)
                {
                    GISHandler.GISTools.FreePolygonSt(this.axMapControl1, SystemSet.Base_Map+"\\处理数据库\\图层数据");
                    polygonSt = false;
                }
                if (attribute)
                {
                   // GISHandler.GISTools.IdentifyTool(this.axMapControl1);
                    if (identifyDialog.IsDisposed)
                    {
                        ShowIdentifyDialog();
                    }
                    identifyDialog.OnMouseDown(e.button, e.mapX, e.mapY);

                    //attribute = false;
                }
                if (edit)
                {
                    Edit et = new Edit(this.axMapControl1);
                    et.Show();
                    et.TopMost = true;
                    edit = false;
                }

            }

            if (e.button == 2)
            {

                GISHandler.GISTools.setNull(this.axMapControl1);
                    //弹出右键菜单
                IMapControl3 m_mapControl = (IMapControl3)this.axMapControl1.Object;

                m_menuMap.PopupMenu(e.x, e.y, m_mapControl.hWnd);

            }
        }