public FDECommand(bool bSelectionChanged, bool bFeatureModify) { this._bSelectionChanged = bSelectionChanged; this._bFeatureModify = bFeatureModify; IVector3 vector; IEulerAngle eulerAngle; DF3DApplication.Application.Current3DMapControl.Camera.GetCamera(out vector, out eulerAngle); CameraParamter undoCamera = new CameraParamter(vector.X, vector.Y, vector.Z, eulerAngle.Heading, eulerAngle.Tilt, eulerAngle.Roll); base.UndoCamera = undoCamera; if (this._bSelectionChanged) { HashMap selectionMap = this.GetSelectionMap(); base.UndoSelectionMap = selectionMap; } }
public override bool Undo() { if (this._bSelectionChanged) { SelectCollection.Instance().Clear(); SelectCollection.Instance().UpdateSelection(base.UndoSelectionMap); RenderControlEditServices.Instance().SetEditorPosition(SelectCollection.Instance().FcRowBuffersMap); } if (this._bFeatureModify) { CommonUtils.Instance().FdeUndoRedoManager.Undo(); } IVector3 vector; IEulerAngle eulerAngle; DF3DApplication.Application.Current3DMapControl.Camera.GetCamera(out vector, out eulerAngle); CameraParamter redoCamera = new CameraParamter(vector.X, vector.Y, vector.Z, eulerAngle.Heading, eulerAngle.Tilt, eulerAngle.Roll); base.RedoCamera = redoCamera; this.SetUndoCamera(); return(true); }