public void Undo_ModifyObjectData(int l_unexcute_scrl, ICommand command)
        {
            ///<summary>
            /// This code is to undo the modification action which the user has performed
            /// </summary>

            #region Undoing the modification
            try
            {
                SuspensionCoordinatesRear _scrl_forUndo = (SuspensionCoordinatesRear)command;

                ICommand cmd = Assy_List_SCRL[l_unexcute_scrl];
                Assy_List_SCRL[l_unexcute_scrl]._RedocommandsSCRL.Push(cmd);

                Assy_List_SCRL[l_unexcute_scrl] = _scrl_forUndo;

                PopulateDataTable(l_unexcute_scrl);

                SuspensionCoordinatesRearGUI.DisplaySCRLItem(Assy_List_SCRL[l_unexcute_scrl]);

                #region Calling Undo method for Opposite Suspension if symmetric
                if (Assy_List_SCRL[l_unexcute_scrl].RearSymmetry == true && IsUndoRedoCalledByRight == false)
                {
                    SuspensionCoordinatesRearRight.IsUndoRedoCalledByLeft_IdentifierMethod(true);// This method sets the IsUndoRedoCalledByLeft variable to true and prevents an infinte loop

                    UndoRedo undoRedo = new UndoRedo();
                    undoRedo.Identifier(SuspensionCoordinatesRearRight.Assy_List_SCRR[l_unexcute_scrl]._UndocommandsSCRR, SuspensionCoordinatesRearRight.Assy_List_SCRR[l_unexcute_scrl]._RedocommandsSCRR,
                                        l_unexcute_scrl + 1, SuspensionCoordinatesRearRight.Assy_List_SCRR[l_unexcute_scrl].SCRRIsModified);
                    undoRedo.Undo(1);
                    SuspensionCoordinatesRearRight.IsUndoRedoCalledByLeft_IdentifierMethod(false);//This method sets the value of IsUndoRedoCalledByLeft to false so that the Right Suspension coordinate can also be Undone
                }
                #endregion

                Kinematics_Software_New.EditRearCAD(l_unexcute_scrl);

                Kinematics_Software_New.SCRL_ModifyInVehicle(l_unexcute_scrl, Assy_List_SCRL[l_unexcute_scrl]);
            }
            catch (Exception) { }
            #endregion
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="l_modify_scrl"></param>
        /// <param name="modify_scrl_list"></param>
        /// <param name="redo_Identifier"></param>
        public void ModifyObjectData(int l_modify_scrl, object modify_scrl_list, bool redo_Identifier)
        {
            ///<summary>
            ///In this section of the code, the Suspension is bring modified and it is placed under the method called ModifyObjectData because it is an Undoable operation
            ///</summary>

            #region Redoing the modification
            SuspensionCoordinatesRear _scrl_forRedo = (SuspensionCoordinatesRear)modify_scrl_list;

            ICommand cmd = Assy_List_SCRL[l_modify_scrl];
            Assy_List_SCRL[l_modify_scrl]._UndocommandsSCRL.Push(cmd);

            Assy_List_SCRL[l_modify_scrl] = _scrl_forRedo;

            PopulateDataTable(l_modify_scrl);

            Assy_List_SCRL[l_modify_scrl].SCRLIsModified = true;

            SuspensionCoordinatesRearGUI.DisplaySCRLItem(Assy_List_SCRL[l_modify_scrl]);

            #region Calling Redo method for Opposite Suspension if symmetric
            if (Assy_List_SCRL[l_modify_scrl].RearSymmetry == true && IsUndoRedoCalledByRight == false)
            {
                SuspensionCoordinatesRearRight.IsUndoRedoCalledByLeft_IdentifierMethod(true);
                UndoRedo undoRedo = new UndoRedo();
                undoRedo.Identifier(SuspensionCoordinatesRearRight.Assy_List_SCRR[l_modify_scrl]._UndocommandsSCRR, SuspensionCoordinatesRearRight.Assy_List_SCRR[l_modify_scrl]._RedocommandsSCRR,
                                    l_modify_scrl + 1, SuspensionCoordinatesRearRight.Assy_List_SCRR[l_modify_scrl].SCRRIsModified);
                undoRedo.Redo(1);
                SuspensionCoordinatesRearRight.IsUndoRedoCalledByLeft_IdentifierMethod(false);
            }
            #endregion

            Kinematics_Software_New.EditRearCAD(l_modify_scrl);

            Kinematics_Software_New.SCRL_ModifyInVehicle(l_modify_scrl, Assy_List_SCRL[l_modify_scrl]);


            #endregion
        }
        public void ModifyObjectData(int l_modify_scrr, object modify_scrr_list, bool redo_Identifier)
        {
            ///<summary>
            ///In this section of the code, the Suspension is bring modified and it is placed under the method called ModifyObjectData because it is an Undoable operation
            ///</summary>

            #region Redoing the modification
            SuspensionCoordinatesRearRight _scrr_forRedo = (SuspensionCoordinatesRearRight)modify_scrr_list;

            ICommand cmd = Assy_List_SCRR[l_modify_scrr];
            Assy_List_SCRR[l_modify_scrr]._UndocommandsSCRR.Push(cmd);

            Assy_List_SCRR[l_modify_scrr] = _scrr_forRedo;

            PopulateDataTable(l_modify_scrr);

            Assy_List_SCRR[l_modify_scrr].SCRRIsModified = true;

            SuspensionCoordinatesRearRightGUI.DisplaySCRRItem(Assy_List_SCRR[l_modify_scrr]);

            #region Calling Redo method for Opposite Suspension if symmetric
            if (Assy_List_SCRR[l_modify_scrr].RearSymmetry == true && IsUndoRedoCalledByLeft == false)
            {
                SuspensionCoordinatesRear.IsUndoRedoCalledByRight_IdentifierMethod(true);// This method sets the IsUndoRedoCalledByRight variable to true and prevents an infinte loop
                UndoRedo undoRedo = new UndoRedo();
                undoRedo.Identifier(SuspensionCoordinatesRear.Assy_List_SCRL[l_modify_scrr]._UndocommandsSCRL, SuspensionCoordinatesRear.Assy_List_SCRL[l_modify_scrr]._RedocommandsSCRL,
                                    l_modify_scrr + 1, SuspensionCoordinatesRear.Assy_List_SCRL[l_modify_scrr].SCRLIsModified);
                undoRedo.Redo(1);
                SuspensionCoordinatesRear.IsUndoRedoCalledByRight_IdentifierMethod(false);// This method sets the IsUndoRedoCalledByRight variable to false and allows the left suspenson coordinate to be undone
            }
            #endregion

            Kinematics_Software_New.EditRearCAD(l_modify_scrr);

            Kinematics_Software_New.SCRR_ModifyInVehicle(l_modify_scrr, Assy_List_SCRR[l_modify_scrr]);


            #endregion
        }
        public void EditRearLeftSuspension(int l_edit_scrl, SuspensionCoordinatesRearGUI _scrlGUI)
        {
            ICommand cmd = Assy_List_SCRL[l_edit_scrl];

            Assy_List_SCRL[l_edit_scrl]._UndocommandsSCRL.Push(cmd);

            #region Rear Left coordinates editing
            SuspensionCoordinatesRear scrl_list = new SuspensionCoordinatesRear(_scrlGUI);
            scrl_list._UndocommandsSCRL = Assy_List_SCRL[l_edit_scrl]._UndocommandsSCRL;
            scrl_list._RedocommandsSCRL = Assy_List_SCRL[l_edit_scrl]._RedocommandsSCRL;
            scrl_list._SCName           = Assy_List_SCRL[l_edit_scrl]._SCName;

            Assy_List_SCRL[l_edit_scrl] = scrl_list;
            Assy_List_SCRL[l_edit_scrl].SCRLDataTable = scrl_list.SCRLDataTable;
            Assy_List_SCRL[l_edit_scrl].SCRL_ID       = l_edit_scrl + 1;
            Assy_List_SCRL[l_edit_scrl].RearSuspensionType(_scrlGUI);
            Assy_List_SCRL[l_edit_scrl].SCRLIsModified = true;

            PopulateDataTable(l_edit_scrl);

            #endregion

            _RedocommandsSCRL.Clear();
        }
Exemple #5
0
        public void SuspensionPlotterInvoker(SuspensionCoordinatesFront _scfl, SuspensionCoordinatesFrontRight _scfr, SuspensionCoordinatesRear _scrl, SuspensionCoordinatesRearRight _scrr)
        {
            #region Invoking the Plotter for all the four corners of the Suspension

            PlotSuspension(_scfl);

            PlotSuspension(_scfr);

            PlotSuspension(_scrl);

            PlotSuspension(_scrr);

            viewportLayout1.SetView(viewType.Isometric);

            viewportLayout1.ZoomFit();
            #endregion
        }
Exemple #6
0
 public void CreateRearCAD(CAD _susCADRear, SuspensionCoordinatesRearGUI _scrlGUI, SuspensionCoordinatesRear _sCRL, SuspensionCoordinatesRearRight _sCRR)
 {
     try
     {
         //_scrlGUI.CADRear.InitializeEntities();
         _susCADRear.ClearViewPort(false, false, null);
         _susCADRear.InitializeLayers();
         _susCADRear.SuspensionPlotterInvoker(_sCRL, 3, null, true, true, null, 0, 0, 0);
         _susCADRear.SuspensionPlotterInvoker(_sCRR, 4, null, true, true, null, 0, 0, 0);
         _susCADRear.ARBConnector(_susCADRear.CoordinatesRL.InboardPickUp, _susCADRear.CoordinatesRR.InboardPickUp);
         _susCADRear.RefreshViewPort();
     }
     catch (Exception)
     {
         // Keeping this code in try and catch block will help during Open operation. If the method is called without a Suspension or SuspensionGUI item being present, then the software won't crash
     }
 }
Exemple #7
0
        public static void DisplaySCRLItem(SuspensionCoordinatesRear _scrl)
        {
            r1.gridControl2.DataSource = _scrl.SCRLDataTable;

            #region Delete
            //r1.A1xRL.Text = Convert.ToString(_scrl.A1x);
            //r1.A1yRL.Text = Convert.ToString(_scrl.A1y);
            //r1.A1zRL.Text = Convert.ToString(_scrl.A1z);

            //r1.B1xRL.Text = Convert.ToString(_scrl.B1x);
            //r1.B1yRL.Text = Convert.ToString(_scrl.B1y);
            //r1.B1zRL.Text = Convert.ToString(_scrl.B1z);

            //r1.C1xRL.Text = Convert.ToString(_scrl.C1x);
            //r1.C1yRL.Text = Convert.ToString(_scrl.C1y);
            //r1.C1zRL.Text = Convert.ToString(_scrl.C1z);

            //r1.D1xRL.Text = Convert.ToString(_scrl.D1x);
            //r1.D1yRL.Text = Convert.ToString(_scrl.D1y);
            //r1.D1zRL.Text = Convert.ToString(_scrl.D1z);

            //r1.E1xRL.Text = Convert.ToString(_scrl.E1x);
            //r1.E1yRL.Text = Convert.ToString(_scrl.E1y);
            //r1.E1zRL.Text = Convert.ToString(_scrl.E1z);

            //r1.F1xRL.Text = Convert.ToString(_scrl.F1x);
            //r1.F1yRL.Text = Convert.ToString(_scrl.F1y);
            //r1.F1zRL.Text = Convert.ToString(_scrl.F1z);

            //r1.G1xRL.Text = Convert.ToString(_scrl.G1x);
            //r1.G1yRL.Text = Convert.ToString(_scrl.G1y);
            //r1.G1zRL.Text = Convert.ToString(_scrl.G1z);

            //r1.H1xRL.Text = Convert.ToString(_scrl.H1x);
            //r1.H1yRL.Text = Convert.ToString(_scrl.H1y);
            //r1.H1zRL.Text = Convert.ToString(_scrl.H1z);

            //r1.I1xRL.Text = Convert.ToString(_scrl.I1x);
            //r1.I1yRL.Text = Convert.ToString(_scrl.I1y);
            //r1.I1zRL.Text = Convert.ToString(_scrl.I1z);

            //r1.J1xRL.Text = Convert.ToString(_scrl.J1x);
            //r1.J1yRL.Text = Convert.ToString(_scrl.J1y);
            //r1.J1zRL.Text = Convert.ToString(_scrl.J1z);

            //r1.JO1xRL.Text = Convert.ToString(_scrl.JO1x);
            //r1.JO1yRL.Text = Convert.ToString(_scrl.JO1y);
            //r1.JO1zRL.Text = Convert.ToString(_scrl.JO1z);

            //r1.K1xRL.Text = Convert.ToString(_scrl.K1x);
            //r1.K1yRL.Text = Convert.ToString(_scrl.K1y);
            //r1.K1zRL.Text = Convert.ToString(_scrl.K1z);

            //r1.M1xRL.Text = Convert.ToString(_scrl.M1x);
            //r1.M1yRL.Text = Convert.ToString(_scrl.M1y);
            //r1.M1zRL.Text = Convert.ToString(_scrl.M1z);

            //r1.N1xRL.Text = Convert.ToString(_scrl.N1x);
            //r1.N1yRL.Text = Convert.ToString(_scrl.N1y);
            //r1.N1zRL.Text = Convert.ToString(_scrl.N1z);

            //r1.O1xRL.Text = Convert.ToString(_scrl.O1x);
            //r1.O1yRL.Text = Convert.ToString(_scrl.O1y);
            //r1.O1zRL.Text = Convert.ToString(_scrl.O1z);

            //r1.P1xRL.Text = Convert.ToString(_scrl.P1x);
            //r1.P1yRL.Text = Convert.ToString(_scrl.P1y);
            //r1.P1zRL.Text = Convert.ToString(_scrl.P1z);

            //r1.Q1xRL.Text = Convert.ToString(_scrl.Q1x);
            //r1.Q1yRL.Text = Convert.ToString(_scrl.Q1y);
            //r1.Q1zRL.Text = Convert.ToString(_scrl.Q1z);

            //r1.R1xRL.Text = Convert.ToString(_scrl.R1x);
            //r1.R1yRL.Text = Convert.ToString(_scrl.R1y);
            //r1.R1zRL.Text = Convert.ToString(_scrl.R1z);

            //r1.W1xRL.Text = Convert.ToString(_scrl.W1x);
            //r1.W1yRL.Text = Convert.ToString(_scrl.W1y);
            //r1.W1zRL.Text = Convert.ToString(_scrl.W1z);

            //r1.RideHeightRefRLx.Text = Convert.ToString(_scrl.RideHeightRefx);
            //r1.RideHeightRefRLy.Text = Convert.ToString(_scrl.RideHeightRefy);
            //r1.RideHeightRefRLz.Text = Convert.ToString(_scrl.RideHeightRefz);
            #endregion
        }