示例#1
0
        public override void Run(object sender, System.EventArgs e)
        {
            DF3DApplication app = DF3DApplication.Application;

            if (app == null || app.Current3DMapControl == null)
            {
                return;
            }
            RenderControlEditServices.Instance().StopGeometryEdit(true);
            int count = SelectCollection.Instance().GetCount(false);

            if (count > 10000)
            {
                XtraMessageBox.Show("批量编辑超过上限,请重新选择");
                base.HighLight = false;
                return;
            }
            if (CommonUtils.Instance().EnableTemproalEdit)
            {
                using (DateSettingDialog dateSettingDialog = new DateSettingDialog())
                {
                    if (dateSettingDialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
                    {
                        base.HighLight = false;
                        return;
                    }
                    this.time = dateSettingDialog.Time;
                }
            }
            Map3DCommandManager.Push(this);
            this._uPanel               = new UIDockPanel("对象编辑", "对象编辑", this.Location, this._width, this._height);
            this._dockPanel            = FloatPanelManager.Instance.Add(ref this._uPanel, DockingStyle.Right);
            this._dockPanel.Visibility = DockVisibility.Visible;
            this._dockPanel.FloatSize  = new System.Drawing.Size(this._width, this._height);
            this._dockPanel.Width      = this._width;
            this._dockPanel.Height     = this._height;
            this._uc      = new UCGeometryEdit();
            this._uc.Dock = System.Windows.Forms.DockStyle.Fill;
            this._uPanel.RegisterEvent(new PanelClose(this.Close));
            this._dockPanel.Controls.Add(this._uc);

            this._InteractaMode = app.Current3DMapControl.InteractMode;
            this.SetMoveProperty(SelectCollection.Instance().GetSelectGeometrys());
            SelectCollection.Instance().SelectionMovingEvent += new System.Action <IVector3>(this.SelectionMovingEvent);
            app.Current3DMapControl.RcFeaturesMoving += new Gvitech.CityMaker.Controls._IRenderControlEvents_RcFeaturesMovingEventHandler(this.AxRenderControl_RcFeaturesMoving);
        }
示例#2
0
        public override void Run(object sender, System.EventArgs e)
        {
            RenderControlEditServices.Instance().StopGeometryEdit(true);
            int count = SelectCollection.Instance().GetCount(false);

            if (count > 10000)
            {
                XtraMessageBox.Show("批量编辑超过上限,请重新选择");
                base.HighLight = false;
                return;
            }
            if (CommonUtils.Instance().EnableTemproalEdit)
            {
                using (DateSettingDialog dateSettingDialog = new DateSettingDialog())
                {
                    if (dateSettingDialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
                    {
                        base.HighLight = false;
                        return;
                    }
                    this.time = dateSettingDialog.Time;
                }
            }
            Map3DCommandManager.Push(this);
            this._uPanel               = new UIDockPanel("对象编辑", "对象编辑", this.Location, this._width, this._height);
            this._dockPanel            = FloatPanelManager.Instance.Add(ref this._uPanel, DockingStyle.Right);
            this._dockPanel.Visibility = DockVisibility.Visible;
            this._dockPanel.FloatSize  = new System.Drawing.Size(this._width, this._height);
            this._dockPanel.Width      = this._width;
            this._dockPanel.Height     = this._height;
            this._uc      = new UCGeometryEdit();
            this._uc.Dock = System.Windows.Forms.DockStyle.Fill;
            this._uPanel.RegisterEvent(new PanelClose(this.Close));
            this._dockPanel.Controls.Add(this._uc);

            RenderControlEditServices.Instance().RenderEditorType = RenderEditorType.ScaleAllType;
            this.bInit = false;
            this.BeginScale(SelectCollection.Instance().GetSelectGeometrys());
            RenderControlEditServices.Instance().SetEditorPosition(this.beginRowbufferMap);
        }