public override void OnMouseMove(int button, int shift, int x, int y, double mapX, double mapY) { // TODO: 添加 DrawLine.OnMouseMove 实现 base.OnMouseMove(button, shift, x, y, mapX, mapY); m_MapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair; m_pPoint = m_pActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(x, y); m_pAnchorPoint = m_pPoint; //+++++++++++++开始捕捉+++++++++++++++++++++ bool flag = CommonFunction.Snap(m_MapControl, m_App.CurrentConfig.cfgSnapEnvironmentSet, (IGeometry)m_pLastPoint, m_pAnchorPoint); if (!m_bInUse) { return; } m_pFeedback.MoveTo(m_pAnchorPoint); //向系统的状态栏总转递信息:最后一段的长度 m_dblDistance = CommonFunction.GetDistance_P12(m_pAnchorPoint, m_pLastPoint); m_pStatusBarService.SetStateMessage("最后一段的长度:" + m_dblDistance.ToString(".###") + "米,总长度:" + (m_dblTotalDistance + m_dblDistance).ToString(".###") + "米"); }
public override void Execute() { base.Execute(); if (!(this.Hook is IDFApplication)) { return; } else { m_App = (IDFApplication)this.Hook; } m_MapView = m_App.Workbench.GetView(typeof(MapView)) as IMapView; if (m_MapView == null) { return; } m_MapView.CurrentTool = this; m_MapControl = m_App.CurrentMapControl; m_FocusMap = m_MapControl.ActiveView.FocusMap; m_pActiveView = (IActiveView)this.m_FocusMap; m_pDisplay = m_pActiveView.ScreenDisplay; m_pStatusBarService = m_App.StatusBarService; //获得状态服务 CurrentTool.m_CurrentToolName = CurrentTool.CurrentToolName.drawTraceLine; m_MapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair; CommonFunction.MapRefresh(m_pActiveView); frmFixLength formFixDist = new frmFixLength(); formFixDist.ShowDialog(); m_pStatusBarService.SetStateMessage("步骤:1.选择要素;2.右键/ENTER/SPACEBAR,结束选择;3.左键,确定跟踪的起点;4.左键,结束跟踪。(ESC: 取消/DEL:删除)"); //记录用户操作 clsUserLog useLog = new clsUserLog(); useLog.UserName = DFApplication.LoginUser; useLog.UserRoll = DFApplication.LoginSubSys; useLog.Operation = "绘制跟踪线"; useLog.LogTime = System.DateTime.Now; useLog.TableLog = (m_App.CurrentWorkspace as IFeatureWorkspace).OpenTable("WSGRI_LOG"); useLog.setUserLog(); }
public override void Execute() { base.Execute(); if (!(this.Hook is IDFApplication)) { return; } else { m_App = (IDFApplication)this.Hook; } m_MapView = m_App.Workbench.GetView(typeof(MapView)) as IMapView; if (m_MapView == null) { return; } m_MapView.CurrentTool = this; m_MapControl = m_App.CurrentMapControl; m_FocusMap = m_MapControl.ActiveView.FocusMap; m_pActiveView = (IActiveView)this.m_FocusMap; m_CurrentLayer = m_App.CurrentEditLayer; m_pStatusBarService = m_App.StatusBarService; //获得状态服务 CurrentTool.m_CurrentToolName = CurrentTool.CurrentToolName.drawCircle3P; CommonFunction.MapRefresh(m_pActiveView); m_dblTolerance = CommonFunction.ConvertPixelsToMapUnits(m_MapControl.ActiveView, 4); m_MapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair; m_pStatusBarService.SetStateMessage("提示:依次指定圆周上三点。(A:绝对XY/R:相对XY/P:平行尺/ESC:取消/ENTER:结束/+shift:修改坐标)"); //向状态栏传送提示信息 //记录用户操作 clsUserLog useLog = new clsUserLog(); useLog.UserName = DFApplication.LoginUser; useLog.UserRoll = DFApplication.LoginSubSys; useLog.Operation = "绘制圆形"; useLog.LogTime = System.DateTime.Now; useLog.TableLog = (m_App.CurrentWorkspace as IFeatureWorkspace).OpenTable("WSGRI_LOG"); useLog.setUserLog(); }
public override void Execute() { base.Execute(); if (!(this.Hook is IDFApplication)) { return; } else { m_App = (IDFApplication)this.Hook; } m_MapView = m_App.Workbench.GetView(typeof(MapView)) as IMapView; if (m_MapView == null) { return; } m_MapView.CurrentTool = this; m_MapControl = m_App.CurrentMapControl; m_FocusMap = m_MapControl.ActiveView.FocusMap; m_pActiveView = (IActiveView)this.m_FocusMap; m_CurrentLayer = m_App.CurrentEditLayer; m_pStatusBarService = m_App.StatusBarService; //获得状态服务 CurrentTool.m_CurrentToolName = CurrentTool.CurrentToolName.drawRectRelative2P; CommonFunction.MapRefresh(m_pActiveView); m_dblTolerance = CommonFunction.ConvertPixelsToMapUnits(m_MapControl.ActiveView, 4); m_MapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair; m_pStatusBarService.SetStateMessage("依次指定:1.对角线上两点;2.宽度。(U:回退/F:长度+方向/D:长度/O:方位角/B:边长/A:绝对XY/R:相对XY/Enter:结束/ESC:取消)"); //记录用户操作 clsUserLog useLog = new clsUserLog(); useLog.UserName = DFApplication.LoginUser; useLog.UserRoll = DFApplication.LoginSubSys; useLog.Operation = "绘制矩形"; useLog.LogTime = System.DateTime.Now; useLog.TableLog = (m_App.CurrentWorkspace as IFeatureWorkspace).OpenTable("WSGRI_LOG"); useLog.setUserLog(); }
public override void UnExecute() { // TODO: 添加 DrawCircle3P.UnExecute 实现 m_pStatusBarService.SetStateMessage("就绪"); }
public override void Execute() { base.Execute(); if (!(this.Hook is IDFApplication)) { return; } else { m_App = (IDFApplication)this.Hook; } m_MapView = m_App.Workbench.GetView(typeof(MapView)) as IMapView; if (m_MapView == null) { return; } //else //{ // //Modify by YuanHY20081112 // m_ToolbarManager = (m_App.Workbench as DefaultWorkbench).commandBarManager; // ToolBase toolBase = m_ToolbarManager.Tools["2dmap.DFEditorTool.DrawArc3P"]; // if (m_MapView.CurrentTool == this) // { // if (((StateButtonTool)toolBase).Checked == false) // { // ((StateButtonTool)toolBase).Checked = true;//按下状态 // return; // } // } //} m_MapView.CurrentTool = this; m_MapControl = m_App.CurrentMapControl; m_FocusMap = m_MapControl.ActiveView.FocusMap; m_pActiveView = (IActiveView)this.m_FocusMap; m_CurrentLayer = m_App.CurrentEditLayer; //获得状态栏的服务 m_pStatusBarService = m_App.StatusBarService; CurrentTool.m_CurrentToolName = CurrentTool.CurrentToolName.drawArc3P; CommonFunction.MapRefresh(m_pActiveView); m_dblTolerance = CommonFunction.ConvertPixelsToMapUnits(m_pActiveView, 4); m_MapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair; m_pStatusBarService.SetStateMessage("提示:依次指定圆弧上的三点(A:绝对XY/R:相对XY/P:平行尺/ESC:取消/ENTER:结束/+shift:修改坐标)"); //记录用户操作 clsUserLog useLog = new clsUserLog(); useLog.UserName = DFApplication.LoginUser; useLog.UserRoll = DFApplication.LoginSubSys; useLog.Operation = "绘制弧/扇形"; useLog.LogTime = System.DateTime.Now; useLog.TableLog = (m_App.CurrentWorkspace as IFeatureWorkspace).OpenTable("WSGRI_LOG"); useLog.setUserLog(); }
public override void UnExecute() { // TODO: 添加 CalculateZimuth.UnExecute 实现 m_pStatusBarService.SetStateMessage("就绪"); }
public override void UnExecute() { // TODO: 添加 DrawBeizerCurve.UnExecute 实现 m_pStatusBarService.SetStateMessage("就绪"); }
public override void UnExecute() { // TODO: 添加 DrawRectRelative2P.UnExecute 实现 m_pStatusBarService.SetStateMessage("就绪"); }
public override void UnExecute() { // TODO: 添加 ModifyUnion.UnExecute 实现 m_pStatusBarService.SetStateMessage("就绪"); }
public override void UnExecute() { m_pStatusBarService.SetStateMessage("就绪"); }
public override void UnExecute() { // TODO: 添加 DrawArcCenRadFATA.UnExecute 实现 m_pStatusBarService.SetStateMessage("就绪"); }