private void axMapControl1_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e) { if (e.button == 4) { AeUtils.Pan(); } }
private void btn_Eye_Click(object sender, EventArgs e) { axMapControl_Eye.Visible = !axMapControl_Eye.Visible; if (axMapControl_Eye.Visible) { AddLayersToMapEye(); AeUtils.DrawExtent(m_pMapC2.Extent, axMapControl_Eye.Object as IMapControl2); } }
private void FormMain_Load(object sender, EventArgs e) { tabControl1.SelectedIndex = 1; tabControl1.SelectedIndex = 0; AeUtils.SetMapControl(m_pMapC2); AeUtils.SetMapDocument(m_pMapDoc); AeUtils.SetPageLayoutControl(axPageLayoutControl1); m_pToolbarMenu = new ToolbarMenuClass(); m_pToolbarMenu.AddItem(new OpenAttributeTable()); m_pToolbarMenu.SetHook(m_pMapC2); }
private void btn_OpenMxd_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 axMapControl1_OnExtentUpdated(object sender, IMapControlEvents2_OnExtentUpdatedEvent e) { AeUtils.DrawExtent(m_pMapC2.Extent, axMapControl_Eye.Object as IMapControl2); }
private void axMapControl1_OnAfterScreenDraw(object sender, IMapControlEvents2_OnAfterScreenDrawEvent e) { AeUtils.CopyMapToLayoutView(); }