Beispiel #1
0
        public override void 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
            {
                //绑定事件
                //m_MapView.CurrentTool = this;
            }

            m_MapControl = m_App.CurrentMapControl;

            m_FocusMap = m_App.CurrentMapControl.ActiveView.FocusMap;

            CommonFunction.StartEditing(m_FocusMap);
            m_App.IsModifyWorkSpace = true;

            UltraToolbarsManager tbManager;

            tbManager      = m_App.Workbench.CommandBarManager;
            this.isEnabled = false;
            tbManager.Tools["2dmap.DFEditorTool.Start"].SharedProps.Enabled = false;
            tbManager.Tools["2dmap.DFEditorTool.Save"].SharedProps.Enabled  = true;
            tbManager.Tools["2dmap.DFEditorTool.Stop"].SharedProps.Enabled  = true;
            tbManager.Tools["2dmap.DFEditorTool.CurrentEditLayerLabel"].SharedProps.Enabled = true;
            tbManager.Tools["2dmap.DFEditorTool.CurrentEditLayer"].SharedProps.Enabled      = true;
            //tbManager.Tools["2dmap.DFEditorTool.Modi.ConstructGeoObj"].SharedProps.Enabled = true;
            //tbManager.Tools["2dmap.DFEditorTool.Modi.ConstructGeoObjSelect"].SharedProps.Enabled = true;
            tbManager.Tools["2dmap.Select.Layer.EditFeature"].SharedProps.Enabled = true;

            tbManager2dmapeditEnabledOrNot();

            //记录用户操作
            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();
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
        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();
        }
Beispiel #5
0
        public override void 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
            {
                //绑定事件
                //m_MapView.CurrentTool = this;
            }

            m_MapControl = m_App.CurrentMapControl;

            m_FocusMap = m_App.CurrentMapControl.ActiveView.FocusMap;


            SaveEditing(m_FocusMap);
            m_App.IsModifyWorkSpace = false;

            tbManager2dmapeditEnabledOrNot();

            //记录用户操作
            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 ESRI.ArcGIS.Geodatabase.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_pStatusBarService = m_App.StatusBarService;//获得状态服务

            CurrentTool.m_CurrentToolName = CurrentTool.CurrentToolName.CalculateDistance;

            CommonFunction.MapRefresh(m_pActiveView);

            //记录用户操作
            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();
        }
Beispiel #7
0
        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();
        }