예제 #1
0
 private void axMapControl_Main_OnExtentUpdated(object sender, IMapControlEvents2_OnExtentUpdatedEvent e)
 {
     if (axMapControl_HawkEye.Visible)
     {
         AeUtils.DrawExtent(e.newEnvelope as IEnvelope, axMapControl_HawkEye);
     }
 }
예제 #2
0
 private void axMapControl_Main_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e)
 {
     if (e.button == 4)
     {
         AeUtils.Pan();
     }
 }
예제 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool isShowing = (axMapControl_HawkEye.Visible = !axMapControl_HawkEye.Visible);

            if (isShowing)
            {
                btn_HawkEye.Text = "↗";
                AeUtils.AddLayersToHawkEye(axMapControl_HawkEye);
                AeUtils.DrawExtent(m_pMapC2.Extent, axMapControl_HawkEye);
            }
            else
            {
                btn_HawkEye.Text = "↙";
            }
        }
예제 #4
0
        private void 打开地图文档ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofg = new OpenFileDialog()
            {
                Title            = "选择打开地图文档",
                Filter           = "地图文档 (*.mxd)|*.mxd",
                InitialDirectory = Application.StartupPath
            };

            if (ofg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string mxdPath = ofg.FileName;
                AeUtils.LoadMxd(mxdPath);
            }
        }
예제 #5
0
 private void 保存地图文档ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     AeUtils.SaveMxd();
 }
예제 #6
0
 private void FormMain_Load(object sender, EventArgs e)
 {
     AeUtils.SetMapControl(m_pMapC2);
     AeUtils.SetMapDocument(m_pMapDoc);
     AeUtils.SetPageLayoutCtl(axPageLayoutControl_Main);
 }