public WheelAlignment(WheelAlignmentGUI _waGUI) { //Sign Convention is same as that mentioned in the Optimum Kinematics File WADataTable = _waGUI.WADataTableGUI; #region Static Camber and Toe Initialization StaticCamber = _waGUI._StaticCamber /** (Math.PI / 180)*/; StaticToe = _waGUI._StaticToe /** (Math.PI / 180)*/; SteeringRatio = _waGUI._SteeringRatio; #endregion }
public void CreateNewWheelAlignment(int l_create_wa, WheelAlignmentGUI create_waGUI_list) { ///<<summary> ///This section of the code creates a new tire and addes it to the List of tire objects ///</summary> #region Adding the new Wheel Alignment object to the list of Wheel Alignment objects WheelAlignmentGUI waGUI = create_waGUI_list; Assy_List_WA.Insert(l_create_wa, new WheelAlignment(waGUI)); Assy_List_WA[l_create_wa]._WAName = "WA " + Convert.ToString(l_create_wa + 1); Assy_List_WA[l_create_wa].WheelAlignmentID = l_create_wa + 1; Assy_List_WA[l_create_wa]._UndocommandsWheelAlignment = new Stack <ICommand>(); Assy_List_WA[l_create_wa]._RedocommandsWheelAlignment = new Stack <ICommand>(); #endregion }
public void ModifyObjectData(int l_modify_wa, object modify_wa_list, bool redo_Identifier) { ///<summary> ///In this section of the code, the tire is bring modified and it is placed under the method called Execute because it is an Undoable operation ///</summary> #region Editing the Wheel Alignment Object WheelAlignment wa_list; if (redo_Identifier == false) { wa_list = new WheelAlignment((WheelAlignmentGUI)modify_wa_list); } else { wa_list = (WheelAlignment)modify_wa_list; } ICommand cmd = Assy_List_WA[l_modify_wa]; Assy_List_WA[l_modify_wa]._UndocommandsWheelAlignment.Push(cmd); wa_list._UndocommandsWheelAlignment = Assy_List_WA[l_modify_wa]._UndocommandsWheelAlignment; wa_list._RedocommandsWheelAlignment = Assy_List_WA[l_modify_wa]._RedocommandsWheelAlignment; wa_list._WAName = Assy_List_WA[l_modify_wa]._WAName; Assy_List_WA[l_modify_wa] = wa_list; Assy_List_WA[l_modify_wa].WADataTable = wa_list.WADataTable; Assy_List_WA[l_modify_wa].WheelAlignmentID = l_modify_wa + 1; Assy_List_WA[l_modify_wa].WheelAlignmentIsModified = true; PopulateDataTable(l_modify_wa); if (redo_Identifier == false) { _RedocommandsWheelAlignment.Clear(); } WheelAlignmentGUI.DisplayWheelAlignmentItem(Assy_List_WA[l_modify_wa]); Kinematics_Software_New.WA_ModifyInVehicle(l_modify_wa, Assy_List_WA[l_modify_wa]); #endregion }
public void Undo_ModifyObjectData(int l_unexcute_wa, ICommand command) { ///<summary> /// This code is to undo the modification action which the user has performed /// </summary> try { #region Undo the wheel alignment modification ICommand cmd = Assy_List_WA[l_unexcute_wa]; Assy_List_WA[l_unexcute_wa]._RedocommandsWheelAlignment.Push(cmd); Assy_List_WA[l_unexcute_wa] = (WheelAlignment)command; PopulateDataTable(l_unexcute_wa); WheelAlignmentGUI.DisplayWheelAlignmentItem(Assy_List_WA[l_unexcute_wa]); Kinematics_Software_New.WA_ModifyInVehicle(l_unexcute_wa, Assy_List_WA[l_unexcute_wa]); #endregion } catch (Exception) { } }