Пример #1
0
        public override void Run(object sender, System.EventArgs e)
        {
            _isAuth = Authority3DService.Instance.IsAuthorized;
            //if (!_isAuth)
            //{
            //    XtraMessageBox.Show("此功能需要USB Key。", "提示");
            //    return;
            //}

            Map3DCommandManager.Push(this);
            IMap3DView map3DView = UCService.GetContent(typeof(Map3DView)) as Map3DView;

            if (map3DView == null)
            {
                return;
            }
            bool b3DBind = map3DView.Bind(this);

            if (!b3DBind)
            {
                return;
            }
            if (DF3DApplication.Application != null && DF3DApplication.Application.Current3DMapControl != null)
            {
                DF3DApplication.Application.Current3DMapControl.InteractMode          = Gvitech.CityMaker.RenderControl.gviInteractMode.gviInteractSelect;
                DF3DApplication.Application.Current3DMapControl.MouseSelectObjectMask = Gvitech.CityMaker.RenderControl.gviMouseSelectObjectMask.gviSelectFeatureLayer;
                DF3DApplication.Application.Current3DMapControl.MouseSelectMode       = Gvitech.CityMaker.RenderControl.gviMouseSelectMode.gviMouseSelectClick | Gvitech.CityMaker.RenderControl.gviMouseSelectMode.gviMouseSelectDrag;
                this._listRender = new List <Guid>();
            }
        }
Пример #2
0
        public override void RestoreEnv()
        {
            //RenderControlEditServices.Instance().StopGeometryEdit(true);
            //FDECommand fDECommand = new FDECommand(true, false);
            //SelectCollection.Instance().Clear();
            //SelectCollection.Instance().ClearRowBuffers();
            //RenderControlEditServices.Instance().SetEditorPosition(null);
            //fDECommand.SetSelectionMap();

            IMap3DView map3DView = UCService.GetContent(typeof(Map3DView)) as Map3DView;

            if (map3DView == null)
            {
                return;
            }
            map3DView.UnBind(this);
            DF3DApplication app = DF3DApplication.Application;

            if (app == null || app.Current3DMapControl == null)
            {
                return;
            }
            app.Current3DMapControl.InteractMode          = gviInteractMode.gviInteractNormal;
            app.Current3DMapControl.MouseSelectObjectMask = gviMouseSelectObjectMask.gviSelectNone;
            app.Current3DMapControl.MouseSelectMode       = gviMouseSelectMode.gviMouseSelectHover;
        }
Пример #3
0
        public override void Run(object sender, System.EventArgs e)
        {
            Map3DCommandManager.Push(this);
            IMap3DView map3DView = UCService.GetContent(typeof(Map3DView)) as Map3DView;

            if (map3DView == null)
            {
                return;
            }
            bool b3DBind = map3DView.Bind(this);

            if (!b3DBind)
            {
                return;
            }
            DF3DApplication app = DF3DApplication.Application;

            if (app == null || app.Current3DMapControl == null)
            {
                return;
            }
            app.Current3DMapControl.InteractMode          = gviInteractMode.gviInteractSelect;
            app.Current3DMapControl.MouseSelectObjectMask = gviMouseSelectObjectMask.gviSelectFeatureLayer;
            app.Current3DMapControl.MouseSelectMode       = gviMouseSelectMode.gviMouseSelectClick;
        }
Пример #4
0
        public override void Run(object sender, System.EventArgs e)
        {
            IMap2DView map2DView = UCService.GetContent(typeof(Map2DView)) as Map2DView;

            if (map2DView == null)
            {
                return;
            }
            bool b2DBind = map2DView.Bind(this);

            if (!b2DBind)
            {
                return;
            }

            IMap3DView map3DView = UCService.GetContent(typeof(Map3DView)) as Map3DView;

            if (map3DView == null)
            {
                return;
            }
            bool b3DBind = map3DView.Bind(this);

            if (!b3DBind)
            {
                return;
            }
            b3To2 = false;
            b2To3 = false;
            _2DLink3D();
            if (DF3DApplication.Application != null && DF3DApplication.Application.Current3DMapControl != null)
            {
                DF3DApplication.Application.Current3DMapControl.InteractMode          = gviInteractMode.gviInteractNormal;
                DF3DApplication.Application.Current3DMapControl.MouseSelectObjectMask = gviMouseSelectObjectMask.gviSelectAll;
                flyTime = DF3DApplication.Application.Current3DMapControl.Camera.FlyTime;
                DF3DApplication.Application.Current3DMapControl.Camera.FlyTime = 0;
            }
        }
Пример #5
0
        public override void RestoreEnv()
        {
            IMap2DView map2DView = UCService.GetContent(typeof(Map2DView)) as Map2DView;

            if (map2DView == null)
            {
                return;
            }
            map2DView.UnBind(this);

            IMap3DView map3DView = UCService.GetContent(typeof(Map3DView)) as Map3DView;

            if (map3DView == null)
            {
                return;
            }
            map3DView.UnBind(this);
            if (DF3DApplication.Application != null && DF3DApplication.Application.Current3DMapControl != null)
            {
                DF3DApplication.Application.Current3DMapControl.InteractMode          = gviInteractMode.gviInteractNormal;
                DF3DApplication.Application.Current3DMapControl.MouseSelectObjectMask = gviMouseSelectObjectMask.gviSelectAll;
                DF3DApplication.Application.Current3DMapControl.Camera.FlyTime        = flyTime;
            }
        }
Пример #6
0
        public override void RestoreEnv()
        {
            //if (!_isAuth) return;

            IMap3DView map3DView = UCService.GetContent(typeof(Map3DView)) as Map3DView;

            if (map3DView == null)
            {
                return;
            }
            map3DView.UnBind(this);
            if (DF3DApplication.Application != null && DF3DApplication.Application.Current3DMapControl != null)
            {
                DF3DApplication.Application.Current3DMapControl.InteractMode          = Gvitech.CityMaker.RenderControl.gviInteractMode.gviInteractNormal;
                DF3DApplication.Application.Current3DMapControl.MouseSelectObjectMask = Gvitech.CityMaker.RenderControl.gviMouseSelectObjectMask.gviSelectAll;
                DF3DApplication.Application.Current3DMapControl.MouseSelectMode       = Gvitech.CityMaker.RenderControl.gviMouseSelectMode.gviMouseSelectClick;
                foreach (Guid g in this._listRender)
                {
                    DF3DApplication.Application.Current3DMapControl.ObjectManager.DeleteObject(g);
                }
                this._listRender.Clear();
            }
            Map3DCommandManager.Pop();
        }