} // This constructor is created here only so that the Vehicle object can be initialized without having to pass any arguments. // This is needed because otherwise the Vehicle object will not be instantiated untill a Vehicle item is created. // If the user wants to save the file without creating a Vehicle object he will not be able to do so unless this constructor is used to create the Vehicle object public VehicleGUI(Kinematics_Software_New _r1, VehicleVisualizationType _vVisualizationType) { r1 = _r1; //IS.Kinematics_Software_New_ObjectInitializer(r1); ProgressBarVehicleGUI = r1.progressBar; //Vehicle_MotionExists = Vehicle.List_Vehicle[Vehicle.VehicleCounter].sc_FL.SuspensionMotionExists; IndexOfOutput = 0; ///<summary>Constructing the <see cref="CAD"/> usercontrol here to prevent overcrowding the memory by initializing the controls in the declaration itself</summary> if (_vVisualizationType == VehicleVisualizationType.Generic) { CADVehicleInputs = new CAD(); CadIsTobeImported = false; VisualizationType = VehicleVisualizationType.Generic; } else if (_vVisualizationType == VehicleVisualizationType.ImportedCAD) { importCADForm = new XUC_ImportCAD(); CadIsTobeImported = true; VisualizationType = VehicleVisualizationType.ImportedCAD; } ocGUI_FL = new OutputClassGUI(); ocGUI_FR = new OutputClassGUI(); ocGUI_RL = new OutputClassGUI(); ocGUI_RR = new OutputClassGUI(); }
public VehicleGUI(SerializationInfo info, StreamingContext context) { _VehicleGUIName = (string)info.GetValue("VehicleGUI_Name", typeof(string)); _VehicleID = (int)info.GetValue("_VehicleID", typeof(int)); navBarItem_Vehicle_Results = (List <CusNavBarItem>)info.GetValue("navBarItemResults", typeof(List <CusNavBarItem>)); navBarGroup_Vehicle_Result = (CusNavBarGroup)info.GetValue("navBarGroupResults", typeof(CusNavBarGroup)); TabPages_Vehicle = (List <CustomXtraTabPage>)info.GetValue("TabPages", typeof(List <CustomXtraTabPage>)); TabPage_VehicleInputCAD = (CustomXtraTabPage)info.GetValue("TabPage_VehicleInputCAD", typeof(CustomXtraTabPage)); AssemblyChecker_GUI = (int)info.GetValue("AssemblyChecker_GUI", typeof(int)); SuspensionIsAssembled_GUI = (bool)info.GetValue("SuspensionIsAssembled_GUI", typeof(bool)); TireIsAssembled_GUI = (bool)info.GetValue("TireIsAssembled_GUI", typeof(bool)); SpringIsAssembled_GUI = (bool)info.GetValue("SpringIsAssembled_GUI", typeof(bool)); DamperIsAssembled_GUI = (bool)info.GetValue("DamperIsAssembled_GUI", typeof(bool)); ARBIsAssembled_GUI = (bool)info.GetValue("ARBIsAssembled_GUI", typeof(bool)); ChassisIsAssembled_GUI = (bool)info.GetValue("ChassisIsAssembled_GUI", typeof(bool)); WAIsAssembled_GUI = (bool)info.GetValue("WAIsAssembled_GUI", typeof(bool)); VehicleHasBeenValidated_GUI = (bool)info.GetValue("VehicleHasBeenValidated_GUI", typeof(bool)); _OutputOriginX = (double)info.GetValue("OutputOriginX", typeof(double)); _OutputOriginY = (double)info.GetValue("OutputOriginY", typeof(double)); _OutputOriginZ = (double)info.GetValue("OutputOriginZ", typeof(double)); Vehicle_MotionExists = (bool)info.GetValue("Vehicle_MotionExists", typeof(bool)); IndexOfOutput = (int)info.GetValue("IndexOfOutput", typeof(int)); ocGUI_FL = (OutputClassGUI)info.GetValue("ocGUI_FL", typeof(OutputClassGUI)); ocGUI_FR = (OutputClassGUI)info.GetValue("ocGUI_FR", typeof(OutputClassGUI)); ocGUI_RL = (OutputClassGUI)info.GetValue("ocGUI_RL", typeof(OutputClassGUI)); ocGUI_RR = (OutputClassGUI)info.GetValue("ocGUI_RR", typeof(OutputClassGUI)); CadIsTobeImported = (bool)info.GetValue("CadIsTobeImported", typeof(bool)); FileHasBeenImported = (bool)info.GetValue("FileHasBeenImported", typeof(bool)); OutputIGESPlotted = (bool)info.GetValue("OutputIGESPlotted", typeof(bool)); IGESFIleName = (string)info.GetValue("IGESFIleName", typeof(string)); //CADVehicleInputs = (CAD)info.GetValue("CADVehicleInputs", typeof(CAD)); //CADVehicleOutputs = (CAD)info.GetValue("CADVehicleOutputs", typeof(CAD)); }