private void axMapControl_Main_OnExtentUpdated(object sender, IMapControlEvents2_OnExtentUpdatedEvent e) { if (axMapControl_HawkEye.Visible) { AeUtils.DrawExtent(e.newEnvelope as IEnvelope, axMapControl_HawkEye); } }
private void axMapControl_Main_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e) { if (e.button == 4) { AeUtils.Pan(); } }
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 = "↙"; } }
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); } }
private void 保存地图文档ToolStripMenuItem_Click(object sender, EventArgs e) { AeUtils.SaveMxd(); }
private void FormMain_Load(object sender, EventArgs e) { AeUtils.SetMapControl(m_pMapC2); AeUtils.SetMapDocument(m_pMapDoc); AeUtils.SetPageLayoutCtl(axPageLayoutControl_Main); }