コード例 #1
0
 private void axMapControl_Main_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e)
 {
     if (e.button == 4)
     {
         AeUtils.Pan();
     }
 }
コード例 #2
0
        private void btn_Eye_Click(object sender, EventArgs e)
        {
            bool isShowing = (axMapControl_Eye.Visible = !axMapControl_Eye.Visible);

            if (isShowing)
            {
                btn_Eye.Text = "↗";
                AddLayersToEye();
                AeUtils.DrawExtent(m_pMapC2.Extent, axMapControl_Eye.Object as IMapControl2);
            }
            else
            {
                btn_Eye.Text = "↙";
            }
        }
コード例 #3
0
        private void btn_OpenMxd_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofg = new OpenFileDialog()
            {
                Title            = "选择地图文档",
                Filter           = "地图文档 (*.mxd)|*.mxd",
                InitialDirectory = Application.StartupPath + @"\Data"
            };

            if (ofg.ShowDialog() == DialogResult.OK)
            {
                string mxdPath = ofg.FileName;
                AeUtils.LoadMxd(mxdPath);
                if (mxdPath != Application.StartupPath + @"\Data\Map.mxd")
                {
                    MessageBox.Show("当前地图文档与该系统所需文档不匹配", "提醒", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }
コード例 #4
0
 private void axMapControl_Main_OnExtentUpdated(object sender, IMapControlEvents2_OnExtentUpdatedEvent e)
 {
     AeUtils.DrawExtent(e.newEnvelope as IEnvelope, axMapControl_Eye.Object as IMapControl2);
 }
コード例 #5
0
 private void FormMain_Load(object sender, EventArgs e)
 {
     AeUtils.SetMapControl(m_pMapC2);
     AeUtils.SetMapDocument(m_pMapDoc);
 }
コード例 #6
0
 private void btn_Info_Click(object sender, EventArgs e)
 {
     IFeatureLayer pFeatureLayer = AeUtils.GetLayerByName("A_ZD") as IFeatureLayer;
     FormInfo      f_Info        = new FormInfo(pFeatureLayer);
 }