/// <summary>
        /// If you use the Analyzer object to move the GEOM then the GEOM is assigned a new Manifold ID every time 
        /// a Transform is used e.g.MoveHorizontally. However doing this by SQL does not require new ID.
        /// </summary>
        protected void moveGeomWithSQL()
        {
            try
            {
                //double dblStartX = this._SelectedEditManifoldPointStart.X;
                //double dblEndX = this._SelectedEditManifoldPointEnd.X;
                //double moveHorizontally = dblEndX - dblStartX;

                //double dblStartY = this._SelectedEditManifoldPointStart.Y;
                //double dblEndY = this._SelectedEditManifoldPointEnd.Y;
                //double moveVertically = dblEndY - dblStartY;

                //Utility.UtilityDrawing.moveGeomWithSQL(this.DrawingOriginalEditObject,moveHorizontally,moveVertically,this._SelectedManifoldID);

                this._GeomMovedDetails = Utility.moveGeomWithSQL(this.DrawingOriginalEditObject, this._SelectedEditManifoldPointStart, this._SelectedEditManifoldPointEnd, this._SelectedManifoldID);
                this._UserMovedGeom = true;
            }
            catch (Exception err)
            {
                throw;
            }
        }
 public static GeomMovedDetails moveGeomWithSQL(Manifold.Interop.Drawing p_Drawing, double p_MoveHorizontallyX, double p_MoveVerticallyY, Int32 p_ManifoldID)
 {
     GeomMovedDetails objReturn = new GeomMovedDetails();
     try
     {
         objReturn.MoveHorizontallyX = p_MoveHorizontallyX;
         objReturn.MoveVerticallyY = p_MoveVerticallyY;
         executeMoveGeomWithSQL(p_Drawing, p_MoveHorizontallyX, p_MoveVerticallyY, p_ManifoldID);
     }
     catch (Exception err)
     {
         throw;
     }
     return objReturn;
 }
        private void MapControl_MouseDownEvent(object sender, AxManifold.Interop.IComponentControlEvents_MouseDownEvent e)
        {
            try
            {
                if (Utility.isModeTypeEditEnabled(EditModeOperation) == true)
                {
                    this._DrawingEdit.SelectNone();
                    if (this._DrawingOriginalEditObject.Selection.Count < 1 || Convert.ToInt32(this._DrawingOriginalEditObject.Selection[0].Record.get_Data("ID").ToString()) != this._SelectedManifoldID)
                    {
                        Utility.setSelection(this._MapControl, this._DrawingOriginalEditObject, this._SelectedManifoldID);
                    }

                    if (this._DrawingEdit.Selection.Count < 1)
                    {
                        //Save the Edit object GEOM string before any EDITING is performed on it.
                        this._SelectedManifoldObjectOriginalGEOM = this._DrawingOriginalEditObject.Selection[0].get_Geom().ToTextWKT();

                        //SET SELECTION
                        Manifold.Interop.Point objPointScreen = e.pArgs.LocationScreen;
                        objPointScreen.Y += this._YCoordMapClickOffset;
                        objPointScreen = this._MapControl.ScreenToNative(objPointScreen);

                        switch (EditModeOperation)
                        {
                            case MODETYPE_OPERATION.EditDeleteCoordinate:
                                this._MouseIsClickedDown = true;
                                deleteCoordinate(objPointScreen);
                                break;
                            case MODETYPE_OPERATION.EditAddCoordinate:
                                this._MouseIsClickedDown = true;
                                if (this._AddingCoordinate == false)
                                {
                                    addCoordinate(objPointScreen);
                                }
                                break;
                            case MODETYPE_OPERATION.EditModeEnabled:
                                Utility.setNearestSelection(this._MapControl, this._DrawingEdit, objPointScreen, _SelectionTolerance);

                                if (this._DrawingEdit.Selection.Count > 0)
                                {
                                    //Record selected Point object
                                    this._MouseIsClickedDown = true;
                                    this._SelectedEditManifoldID = Convert.ToInt32(this._DrawingEdit.Selection[0].Record.get_Data("ID").ToString());

                                    this._SelectedPointBranchIndex = Convert.ToInt32(this._DrawingEdit.Selection[0].Record.get_Data("BranchIndex").ToString());
                                    this._SelectedPointIndex = Convert.ToInt32(this._DrawingEdit.Selection[0].Record.get_Data("PointIndex").ToString());
                                }
                                else
                                {
                                    this._SelectedEditManifoldID = -1;
                                }
                                break;
                            case MODETYPE_OPERATION.EditMoveGeom:
                                Utility.setNearestSelection(this._MapControl, this._DrawingEdit, objPointScreen, _SelectionTolerance);

                                if (this._DrawingEdit.Selection.Count > 0)
                                {
                                    this._GeomMovedDetails = new GeomMovedDetails();
                                    this._UserMovedGeom = false;
                                    //Record selected Point object
                                    this._MouseIsClickedDown = true;
                                    this._SelectedEditManifoldID = Convert.ToInt32(this._DrawingEdit.Selection[0].Record.get_Data("ID").ToString());
                                    this._SelectedEditManifoldPointStart = e.pArgs.LocationNative;
                                }
                                else
                                {
                                    this._SelectedEditManifoldID = -1;
                                }
                                break;
                            default:
                                this._MouseIsClickedDown = false;
                                break;
                        }
                    }
                }
            }
            catch (Exception objEx)
            {
                throw;
            }
        }
        public static GeomMovedDetails moveGeomWithSQL(Manifold.Interop.Drawing p_Drawing, Manifold.Interop.Point p_StartPoint, Manifold.Interop.Point p_EndPoint, Int32 p_ManifoldID)
        {
            GeomMovedDetails objReturn = new GeomMovedDetails();
            try
            {
                double dblStartX = p_StartPoint.X;
                double dblEndX = p_EndPoint.X;
                double moveHorizontally = dblEndX - dblStartX;

                double dblStartY = p_StartPoint.Y;
                double dblEndY = p_EndPoint.Y;
                double moveVertically = dblEndY - dblStartY;

                objReturn.StartX = dblStartX;
                objReturn.EndX = dblEndX;
                objReturn.MoveHorizontallyX = moveHorizontally;
                objReturn.StartY = dblStartY;
                objReturn.EndY = dblEndY;
                objReturn.MoveVerticallyY = moveVertically;

                Utility.moveGeomWithSQL(p_Drawing, moveHorizontally, moveVertically, p_ManifoldID);
            }
            catch (Exception err)
            {
                throw;
            }
            return objReturn;
        }