public void GeometryEditStart(DF3DFeatureClass fcInfo, IRenderGeometry renderGeo, gviGeoEditType editType) { if (this._app == null || this._app.Current3DMapControl == null) { return; } if (this._geoEditor.IsEditing) { this.StopEdit(true); } this.curGeoField = fcInfo.GetFeatureLayer().GeometryFieldName; this._renderGeometry = renderGeo; this._FeatureClass = fcInfo; Gvitech.CityMaker.FdeCore.IFeatureClass featureClass = fcInfo.GetFeatureClass(); this._row = featureClass.CreateRowBuffer(); int num = this._row.FieldIndex(this.curGeoField); if (num != -1 && this._renderGeometry != null) { this._row.SetValue(num, this._renderGeometry.GetFdeGeometry()); } this._geoEditType = editType; this._InteractaMode = this._app.Current3DMapControl.InteractMode; this._app.Current3DMapControl.InteractMode = gviInteractMode.gviInteractEdit; if (!this._geoEditor.StartEditRenderGeometry(renderGeo, editType)) { this._app.Current3DMapControl.InteractMode = this._InteractaMode; XtraMessageBox.Show("暂不支持该类型的编辑"); } //System.Runtime.InteropServices.Marshal.ReleaseComObject(featureClass); }
public void GeometryEditStart(IRenderGeometry renderGeo) { if (this._app == null || this._app.Current3DMapControl == null) { return; } this._isSpatialQuery = true; this._InteractaMode = this._app.Current3DMapControl.InteractMode; this._app.Current3DMapControl.InteractMode = gviInteractMode.gviInteractEdit; this._geoEditor.StartEditRenderGeometry(renderGeo, gviGeoEditType.gviGeoEditCreator); }
public SplitDlg() { DF3DApplication app = DF3DApplication.Application; if (app == null || app.Current3DMapControl == null || app.Workbench == null) { return; } this.InitializeComponent(); app.Workbench.SetMenuEnable(false); this._interactaMode = app.Current3DMapControl.InteractMode; app.Current3DMapControl.InteractMode = gviInteractMode.gviInteractNormal; GeometryEdit.Instance().SpatialQueryEditStopEvent += new SpatialQueryEditStopHandle(this.SpatialQueryEditStopEvent); }
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); }
public void GeometryEditStart(DF3DFeatureClass fcInfo, Gvitech.CityMaker.FdeCore.IRowBuffer row, gviGeoEditType editType) { if (this._app == null || this._app.Current3DMapControl == null) { return; } if (this._geoEditor.IsEditing) { this.StopEdit(true); } this.curGeoField = fcInfo.GetFeatureLayer().GeometryFieldName; this._FeatureClass = fcInfo; this._row = row; this._geoEditType = editType; this._InteractaMode = this._app.Current3DMapControl.InteractMode; this._app.Current3DMapControl.InteractMode = gviInteractMode.gviInteractEdit; if (!this._geoEditor.StartEditFeatureGeometry(row, fcInfo.GetFeatureLayer(), editType)) { this._app.Current3DMapControl.InteractMode = this._InteractaMode; XtraMessageBox.Show("暂不支持该类型的编辑"); } }
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()); }