private void AxGlobeControlEx_Load(object sender, EventArgs e) { IGlobeDisplayEvents_Event m_GlobeDisplayEvents = axGlobeControl1.Globe.GlobeDisplay as IGlobeDisplayEvents_Event; this.MouseWheel += new MouseEventHandler(GlobleControl_MouseWheel); //将三维视图重绘事件委托给m_GlobeDisplayEvents_AfterDraw方法 m_GlobeDisplayEvents.AfterDraw += new IGlobeDisplayEvents_AfterDrawEventHandler(GlobeControl_DisplayEvents_AfterDraw); axMapControl1.OnMouseDown += new ESRI.ArcGIS.Controls.IMapControlEvents2_Ax_OnMouseDownEventHandler(axMapControl1_OnMouseDown); axMapControl1.Extent = axMapControl1.FullExtent; // 初始化地图框架 MapFrame.Logic.InitMapFrame mapFrame = new MapFrame.Logic.InitMapFrame(MapEngineType.ArcGlobe, axGlobeControl1); mapLogic = mapFrame.GetMapLogic(); mfMap = mapLogic.GetIMFMap(); Load3dFile(); // 加载3d文档 LoadMxdFile(); // 自定义显示鹰眼工具 ShowEagleEyeCmd showEagleEyeCmd = new ShowEagleEyeCmd(this); axToolbarControl1.AddItem(showEagleEyeCmd, -1, 22, false, -1, esriCommandStyles.esriCommandStyleIconOnly); globeBusiness = new ArcGlobeBusiness(mapLogic, trackMgr); eagleEyePanel.Visible = false; InitBookmark(); // 初始化书签 }
public ArcMapBusiness(MapFrame.Core.Interface.IMapLogic _mapLogic, ESRI.ArcGIS.Controls.AxMapControl _axMapControl1) { mapLogic = _mapLogic; axMapControl1 = _axMapControl1; elementMgr = new ArcMapElementMgr(); trackMgr = new TrackLineManager(); mapLogic.AddLayer(objLayer); mapLogic.AddLayer(trackLineLayer); EventPublisher.TSDataEvent += EventPublisher_TSDataEvent; }
private string coverLayerName = "覆盖图层"; // 覆盖图层 public ArcGlobeBusiness(MapFrame.Core.Interface.IMapLogic mapLogic, TrackLineManager _trackMgr) { beamMgr = new BeamManager(); modelMgr = new ModelManager(); tsModelMgr = new ModelManager(); trackMgr = _trackMgr; trackMgr.RemoevTrackLine += RemoveTrackLineEx; trackMgr.RemoveAllTrackLine += RemoveAllTrackLineEx; this.mapLogic = mapLogic; soundPlayer = new System.Media.SoundPlayer(); string wavFile = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\Image\warn.wav"; soundPlayer.SoundLocation = wavFile; EventPublisher.BeamDataComeEvent += new EventHandler <Model.BeamData>(EventPublisher_BeamDataComeEvent); // 卫星波束数据 ReadConfig(); // 读取配置文件,初始化 }
/// <summary> /// 构造函数 /// </summary> /// <param name="mapObject">地图对象</param> /// <param name="_mapLogic">地图逻辑类</param> public ToolBox(object mapObject, MapFrame.Core.Interface.IMapLogic _mapLogic) { mapLogic = _mapLogic; mapControl = mapObject as AxMapControl; }