示例#1
0
        public override void Run(object sender, EventArgs e)
        {
            bool _isAuth = Authority3DService.Instance.IsAuthorized;

            if (!_isAuth)
            {
                XtraMessageBox.Show("此功能需要USB Key。", "提示");
                return;
            }
            DF3DApplication app = DF3DApplication.Application;

            if (app == null || app.Current3DMapControl == null || app.Workbench == null)
            {
                return;
            }
            Map3DCommandManager.Push(this);
            RenderControlEditServices.Instance().StopGeometryEdit(true);
            System.DateTime birthDay = System.DateTime.Now;
            if (CommonUtils.Instance().EnableTemproalEdit)
            {
                using (DateSettingDialog dateSettingDialog = new DateSettingDialog(true))
                {
                    if (dateSettingDialog.ShowDialog() != DialogResult.OK)
                    {
                        return;
                    }
                    birthDay = dateSettingDialog.Time;
                }
            }
            app.Workbench.SetMenuEnable(false);
            dlg = new FrmAddPipeBuild();
            dlg.SetBirthDay(birthDay);
            dlg.Show();
            dlg.FormClosed += new FormClosedEventHandler(dlg_FormClosed);
        }
示例#2
0
        public override void Run(object sender, System.EventArgs e)
        {
            bool _isAuth = Authority3DService.Instance.IsAuthorized;

            if (!_isAuth)
            {
                XtraMessageBox.Show("此功能需要USB Key。", "提示");
                return;
            }
            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 UCEditFacilityStyle();
            this._uc.Dock = System.Windows.Forms.DockStyle.Fill;
            this._uPanel.RegisterEvent(new PanelClose(this.Close));
            this._dockPanel.Controls.Add(this._uc);

            SelectCollection.Instance().FacStyleClassChangedEvent += new Delegate.FacStyleClassChangedHandle(CmdEditFacilityStyle_FacStyleClassChangedEvent);
        }
        public override void Run(object sender, System.EventArgs e)
        {
            RenderControlEditServices.Instance().StopGeometryEdit(true);
            System.DateTime temproalTime = System.DateTime.Now;
            if (CommonUtils.Instance().EnableTemproalEdit)
            {
                using (DateSettingDialog dateSettingDialog = new DateSettingDialog())
                {
                    if (dateSettingDialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
                    {
                        return;
                    }
                    temproalTime = dateSettingDialog.Time;
                }
            }
            DF3DFeatureClass featureClassInfo = null;

            System.Collections.IEnumerator enumerator = SelectCollection.Instance().FeatureClassInfoMap.Keys.GetEnumerator();
            try
            {
                if (enumerator.MoveNext())
                {
                    DF3DFeatureClass featureClassInfo2 = (DF3DFeatureClass)enumerator.Current;
                    featureClassInfo = featureClassInfo2;
                }
            }
            finally
            {
                System.IDisposable disposable = enumerator as System.IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
            if (featureClassInfo == null)
            {
                return;
            }
            int            count          = SelectCollection.Instance().GetCount(false);
            EditParameters editParameters = new EditParameters(featureClassInfo.GetFeatureClass().Guid.ToString());

            editParameters.connectionInfo = CommonUtils.Instance().GetCurrentFeatureDataset().DataSource.ConnectionInfo.ToConnectionString();
            editParameters.datasetName    = CommonUtils.Instance().GetCurrentFeatureDataset().Name;
            editParameters.TemproalTime   = temproalTime;
            IBatcheEdit batcheEdit = BatchEditFactory.CreateBatchEdit(count);

            batcheEdit.BeginEdit();
            batcheEdit.DoWork(EditType.ET_DELETE_SELCTION, editParameters);
            batcheEdit.EndEdit();
        }
示例#4
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);
        }
示例#5
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);
        }
示例#6
0
        public override void Run(object sender, 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 > 1)
            {
                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._InteractaMode = app.Current3DMapControl.InteractMode;
            app.Current3DMapControl.InteractMode        = gviInteractMode.gviInteractEdit;
            app.Current3DMapControl.RcObjectEditing    += new Gvitech.CityMaker.Controls._IRenderControlEvents_RcObjectEditingEventHandler(Current3DMapControl_RcObjectEditing);
            app.Current3DMapControl.RcObjectEditFinish += new EventHandler(Current3DMapControl_RcObjectEditFinish);
            this.SetVertexProperty(SelectCollection.Instance().GetSelectGeometrys());
        }