コード例 #1
0
        }                      // 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();
        }
コード例 #2
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
     }
 }
コード例 #3
0
        public void EditORCreateVehicleCAD(CAD vehicleCADDrawer, int Index, bool IsInput, bool _MotionExists, int _IndexOfOutput, bool IsCreated, bool _importCAD, bool _PlotWheel)
        {
            try
            {
                IndexOfOutput = _IndexOfOutput;


                if (IsInput)
                {
                    if (_importCAD == true)
                    {
                        importCADForm.importCADViewport.ClearViewPort(CadIsTobeImported, FileHasBeenImported, Kinematics_Software_New.M1_Global.vehicleGUI[Index].importCADForm.importCADViewport.igesEntities);
                        importCADForm.importCADViewport.InitializeLayers();
                        InputDrawer(importCADForm.importCADViewport, Index, _MotionExists, _importCAD, _PlotWheel);
                    }
                    else
                    {
                        vehicleCADDrawer.ClearViewPort(CadIsTobeImported, FileHasBeenImported, null);
                        vehicleCADDrawer.InitializeLayers();
                        InputDrawer(vehicleCADDrawer, Index, _MotionExists, _importCAD, _PlotWheel);
                    }
                }

                else if (!IsInput)
                {
                    vehicleCADDrawer.ClearViewPort(CadIsTobeImported, FileHasBeenImported, null);
                    OutputDrawer(vehicleCADDrawer, Index, _IndexOfOutput, _importCAD, _PlotWheel);
                    if (!IsCreated)
                    {
                        vehicleCADDrawer.SetupViewPort();
                    }
                }

                vehicleCADDrawer.RefreshViewPort();
            }
            catch (Exception E)
            {
                string error = E.Message;
                // Keeping this code in try and catch block will help during Open operation. If the method is called without a Vehicle or VehicleGUI item being present, then the software won't crash
            }
        }
コード例 #4
0
        /// <summary>
        /// Public Inititalizer method which Performs all the Init activites required for a fully functioning <see cref="LegendEditor"/> Form
        /// </summary>
        /// <param name="_MasterOC">Base <see cref="OutputClass"/></param>
        /// <param name="_ParentCAD"></param>
        public void InitializeLegendEditor(OutputClass _MasterOC, CAD _ParentCAD)
        {
            ///<summary>Performing the Post Processing Activies of the Legend based on whether the Max and Min Value are 0. If they are 0 then it means the User is calling the Legend Editor for the very first time and hence the <see cref="BaseOC"/> should be passed</summary>
            if (MaxValue == 0 && MinValue == 0)
            {
                BaseOC = _MasterOC;
                _ParentCAD.PostProcessing(this, BaseOC, UsersGradient1, UsersGradient2, UsersGradientStyle, NoOfSteps, StepSize);
            }

            else
            {
                OutputClass tempOC = new OutputClass();
                tempOC.MaxForce = MaxValue;
                tempOC.MinForce = MinValue;
                _ParentCAD.PostProcessing(this, tempOC, UsersGradient1, UsersGradient2, UsersGradientStyle, NoOfSteps, StepSize);
            }

            ///<summary>Method to assign the Parent <see cref="CAD"/> object</summary>
            GetParentCADControl(_ParentCAD);

            ///<summary>Method to get the <see cref="LegendDataTable"/> property of this class</summary>
            GetDataLegendDataSource(_ParentCAD.LegendDataTable);

            ///<summary>Method to condition the <see cref="gridControl1"/> of this Form</summary>
            GridControlConditioning(_ParentCAD.LegendDataTable);

            ///<summary>Method to initialize the <see cref="CellValueChangedEventArgs"/> </summary>
            InitializeGridControlEvents();

            ///<remarks>
            ///It is best if the below lines of code are inside THIS Class and not the <see cref="VehicleGUI"/> class's <see cref="VehicleGUI.OutputDrawer(CAD, int, int, bool, bool)"/> method because this way, when the
            ///user wants to see the Forces of a different Motion Percentage, the options chosen by the user through the <see cref="LegendEditor"/> will be retained.
            /// </remarks>
            ///<summary>Painting the Bars according to Force Range in between which they lie. <see cref="LegendEditor.UserNoForceWishboneColour"/> value passed as <see cref="Color.White"/></summary>
            ParentCAD.PaintBarForce(UserNoForceWishboneColour, DisplayWishboneForces);

            ///<summary>Painting the Arrows according to Force Range in between which they lie</summary>
            ///<remarks>Since by default we have <see cref="ForceArrowStyle.Both"/> I can pass any random values for Length and Colour below</remarks>
            ParentCAD.ConditionArrowForce(UserForceArrowStyle, ArrowNoForceCylLength, ArrowNoForceColor, ForcesToBeDisplayed);
        }
コード例 #5
0
 public void CreateFrontCAD(CAD _susCADFront, SuspensionCoordinatesFrontGUI _scflGUI, /*int index,*/ SuspensionCoordinatesFront _scFL, SuspensionCoordinatesFrontRight _scFR)
 {
     ///<summary>
     ///This method is called during editing of a Suspension Item
     ///</summary>
     try
     {
         //_scflGUI.CADFront.InitializeEntities();
         _susCADFront.ClearViewPort(false, false, null);
         _susCADFront.InitializeLayers();
         _susCADFront.SuspensionPlotterInvoker(_scFL, 1, null, true, true, null, 0, 0, 0);
         _susCADFront.SuspensionPlotterInvoker(_scFR, 2, null, true, true, null, 0, 0, 0);
         _susCADFront.ARBConnector(_susCADFront.CoordinatesFL.InboardPickUp, _susCADFront.CoordinatesFR.InboardPickUp);
         _susCADFront.SteeringCSystemPlotter(_scFL, _scFR, _susCADFront.CoordinatesFL.InboardPickUp, _susCADFront.CoordinatesFR.InboardPickUp);
         _susCADFront.RefreshViewPort();
     }
     catch (Exception E)
     {
         string error = E.Message;
         // 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
     }
 }
コード例 #6
0
 public void GetCADObject(CAD _cad)
 {
     CAD = _cad;
 }
コード例 #7
0
        private void OutputDrawer(CAD vehicleCADDrawer_Output, int VehicleIndex, int OutputIndex, bool _importCAD, bool _plotWheel)
        {
            try
            {
                //vehicleCADDrawer_Output = new CAD();

                vehicleCADDrawer_Output.GetCoG(Vehicle.List_Vehicle[VehicleIndex].chassis_vehicle);



                ///<remarks> Plotting the Front Left Outputs. CP Forces which are calculated are passed so that the arrows can be plotted for them <seealso cref="CAD.PlotArrows(double, double, double, double, double, double, bool)"/></remarks>
                vehicleCADDrawer_Output.SuspensionPlotterInvoker(Vehicle.List_Vehicle[VehicleIndex].oc_FL[OutputIndex].scmOP, 1, Vehicle.List_Vehicle[VehicleIndex].oc_FL[OutputIndex].waOP, false, _plotWheel, Vehicle.List_Vehicle[VehicleIndex].oc_FL[OutputIndex],
                                                                 Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.TotalLoad_FL_Fx, Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.TotalLoad_FL_Fy + Vehicle.List_Vehicle[VehicleIndex].oc_FL[OutputIndex].CW, Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.TotalLoad_FL_Fz);

                ///<remarks> Plotting the Front Right Outputs. CP Forces which are calculated are passed so that the arrows can be plotted for them <seealso cref="CAD.PlotArrows(double, double, double, double, double, double, bool)"/></remarks>
                vehicleCADDrawer_Output.SuspensionPlotterInvoker(Vehicle.List_Vehicle[VehicleIndex].oc_FR[OutputIndex].scmOP, 2, Vehicle.List_Vehicle[VehicleIndex].oc_FR[OutputIndex].waOP, false, _plotWheel, Vehicle.List_Vehicle[VehicleIndex].oc_FR[OutputIndex],
                                                                 Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.TotalLoad_FR_Fx, Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.TotalLoad_FR_Fy + Vehicle.List_Vehicle[VehicleIndex].oc_FR[OutputIndex].CW, Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.TotalLoad_FR_Fz);

                ///<remarks> Plotting the Rear Left Outputs. CP Forces which are calculated are passed so that the arrows can be plotted for them <seealso cref="CAD.PlotArrows(double, double, double, double, double, double, bool)"/></remarks>
                vehicleCADDrawer_Output.SuspensionPlotterInvoker(Vehicle.List_Vehicle[VehicleIndex].oc_RL[OutputIndex].scmOP, 3, Vehicle.List_Vehicle[VehicleIndex].oc_RL[OutputIndex].waOP, false, _plotWheel, Vehicle.List_Vehicle[VehicleIndex].oc_RL[OutputIndex],
                                                                 Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.TotalLoad_RL_Fx, Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.TotalLoad_RL_Fy + Vehicle.List_Vehicle[VehicleIndex].oc_RL[OutputIndex].CW, Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.TotalLoad_RL_Fz);

                ///<remarks> Plotting the Rear Right Outputs. CP Forces which are calculated are passed so that the arrows can be plotted for them <seealso cref="CAD.PlotArrows(double, double, double, double, double, double, bool)"/></remarks>
                vehicleCADDrawer_Output.SuspensionPlotterInvoker(Vehicle.List_Vehicle[VehicleIndex].oc_RR[OutputIndex].scmOP, 4, Vehicle.List_Vehicle[VehicleIndex].oc_RR[OutputIndex].waOP, false, _plotWheel, Vehicle.List_Vehicle[VehicleIndex].oc_RR[OutputIndex],
                                                                 Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.TotalLoad_RR_Fx, Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.TotalLoad_RR_Fy + Vehicle.List_Vehicle[VehicleIndex].oc_RR[OutputIndex].CW, Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.TotalLoad_RR_Fz);


                vehicleCADDrawer_Output.ARBConnector(vehicleCADDrawer_Output.CoordinatesFL.InboardPickUp, vehicleCADDrawer_Output.CoordinatesFR.InboardPickUp);


                vehicleCADDrawer_Output.SteeringCSystemPlotter(Vehicle.List_Vehicle[VehicleIndex].oc_FL[OutputIndex].scmOP, Vehicle.List_Vehicle[VehicleIndex].oc_FR[OutputIndex].scmOP, vehicleCADDrawer_Output.CoordinatesFL.InboardPickUp, vehicleCADDrawer_Output.CoordinatesFR.InboardPickUp);


                vehicleCADDrawer_Output.ARBConnector(vehicleCADDrawer_Output.CoordinatesRL.InboardPickUp, vehicleCADDrawer_Output.CoordinatesRR.InboardPickUp);

                Vector3D ForcePLeft, ForceQLeft, ForcePRight, ForceQRight = new Vector3D();
                ///<summary>Obtaining the Forces in the FL, FR, RL, RR Steering Rack Points of the FRONT</summary>
                GetAttachmentPointForces(Vehicle.List_Vehicle[VehicleIndex].oc_FL[OutputIndex], Vehicle.List_Vehicle[VehicleIndex].oc_FR[OutputIndex], out ForcePLeft, out ForceQLeft, out ForcePRight, out ForceQRight, true, false);
                CADVehicleOutputs.PlotLoadCase(Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.FL_BearingCoordinates, Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.FR_BearingCoordinates, false, true, false, ForcePLeft, ForceQLeft, ForcePRight, ForceQRight);

                ///<summary>Obtaining the Forces in the FL, FR, RL, RR ARB Points of the FRONT</summary>
                GetAttachmentPointForces(Vehicle.List_Vehicle[VehicleIndex].oc_FL[OutputIndex], Vehicle.List_Vehicle[VehicleIndex].oc_FR[OutputIndex], out ForcePLeft, out ForceQLeft, out ForcePRight, out ForceQRight, false, false);
                CADVehicleOutputs.PlotLoadCase(Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.FL_BearingCoordinates, Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.FR_BearingCoordinates, false, false, false, ForcePLeft, ForceQLeft, ForcePRight, ForceQRight);

                ///<summary>Obtaining the Forces in the FL, FR, RL, RR Steering Rack Points of the REAR</summary>
                GetAttachmentPointForces(Vehicle.List_Vehicle[VehicleIndex].oc_RL[OutputIndex], Vehicle.List_Vehicle[VehicleIndex].oc_RR[OutputIndex], out ForcePLeft, out ForceQLeft, out ForcePRight, out ForceQRight, false, false);
                CADVehicleOutputs.PlotLoadCase(Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.RL_BearingCoordinates, Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.RR_BearingCoordinates, false, true, false, ForcePLeft, ForceQLeft, ForcePRight, ForceQRight);

                ///<summary>Using manipulation to obtain the forces on the Left and Right Steering Column Attachment Points</summary>
                GetAttachmentPointForces(Vehicle.List_Vehicle[VehicleIndex].oc_FL[OutputIndex], Vehicle.List_Vehicle[VehicleIndex].oc_FR[OutputIndex], out ForcePLeft, out ForceQLeft, out ForcePRight, out ForceQRight, false, true);
                CADVehicleOutputs.PlotLoadCase(Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.SteeringColumnBearing, Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.SteeringColumnBearing, false, true, true, ForcePLeft, new Vector3D(), ForcePRight, new Vector3D());

                vehicleCADDrawer_Output.PlotLoadCaseInputForces(Vehicle.List_Vehicle[this._VehicleID - 1].chassis_vehicle, Vehicle.List_Vehicle[this._VehicleID - 1].vehicleLoadCase);

                vehicleCADDrawer_Output.PlotMomentArrows(Vehicle.List_Vehicle[VehicleIndex].oc_FL[OutputIndex].scmOP.W1x, Vehicle.List_Vehicle[VehicleIndex].oc_FL[OutputIndex].scmOP.W1y, Vehicle.List_Vehicle[VehicleIndex].oc_FL[OutputIndex].scmOP.W1z,
                                                         Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.NSM_FL_Mx, Vehicle.List_Vehicle[VehicleIndex].vehicleLoadCase.NSM_FL_Mz);

                ///<remarks>Order of Painting is Important</remarks>
                ///<summary>Creating a temporary Output Class Variable which will hold the Max and Min Values collated from ALL THE 4 CORNERS</summary>
                OutputClass MasterOC = new OutputClass();
                MasterOC = MasterOC.PopulateForceLists(Vehicle.List_Vehicle[VehicleIndex].oc_FL[OutputIndex], Vehicle.List_Vehicle[VehicleIndex].oc_FR[OutputIndex], Vehicle.List_Vehicle[VehicleIndex].oc_RL[OutputIndex], Vehicle.List_Vehicle[VehicleIndex].oc_RR[OutputIndex]);

                ///<summary>Calling the <see cref="LegendEditor"/> and initializing it and then calling the <see cref="CAD.PostProcessing(LegendEditor, OutputClass, Color, Color, GradientStyle, int, double)"/> method which draws the DataTable for the Legend and the Legend too </summary>
                LoadCaseLegend.InitializeLegendEditor(MasterOC, CADVehicleOutputs);

                ///<summary>This Loop exists to allow the imported files to be translated around the Suspension  </summary>
                if (_importCAD && OutputIGESPlotted && TranslateChassisToGround)
                {
                    r1 = Kinematics_Software_New.AssignFormVariable();

                    int opIndex = 0;

                    int motionInd = Vehicle.List_Vehicle[_VehicleID - 1].vehicle_Motion.MotionID - 1;

                    opIndex = MotionGUI.List_MotionGUI[motionInd].bandedGridView_Motion.FocusedRowHandle;

                    ImportedCADTranslationHistory.Add(-Vehicle.List_Vehicle[_VehicleID - 1].oc_FL[opIndex].FinalRideHeight_1);

                    for (int i = 0; i < vehicleCADDrawer_Output.viewportLayout1.Entities.Count; i++)
                    {
                        if (vehicleCADDrawer_Output.viewportLayout1.Entities[i] is BlockReference)
                        {
                            BlockReference br = vehicleCADDrawer_Output.viewportLayout1.Entities[i] as BlockReference;
                            br.Translate(0, -(ImportedCADTranslationHistory[ImportedCADTranslationHistory.Count - 1] - ImportedCADTranslationHistory[ImportedCADTranslationHistory.Count - 2]), 0);
                        }
                    }
                }

                devDept.Eyeshot.RegenOptions ro = new devDept.Eyeshot.RegenOptions();
                vehicleCADDrawer_Output.viewportLayout1.Entities.Regen(ro);
                vehicleCADDrawer_Output.viewportLayout1.Invalidate();
            }
            catch (Exception E)
            {
                MessageBox.Show(E.Message);
                // Keeping this code in try and catch block will help during Open operation. If the method is called without a Vehicle or VehicleGUI item being present, then the software won't crasha
            }
        }
コード例 #8
0
        private void InputDrawer(CAD vehicleCADDrawer_Input, int Index_Input, bool _motionExists, bool _importCAD, bool _plotWheel)
        {
            try
            {
                double CPForceX = 0, CPForceY = 0, CPForceZ = 0;

                ///<remarks>
                ///The If Loop is needed becsuse now the Vehicle can be created without the creation of the Input items.
                ///It may happen that the Suspension is not created but the <see cref="ImportCADForm.simpleButtonBrowse_Click(object, EventArgs)"/> is fired.
                ///In this case, the if method (<see cref="Kinematics_Software_New.EditVehicleCAD(CAD, int, bool, bool, bool)"/>) is called then it will fail because there is no Suspension Item created and hence <see cref="VehicleGUI.InputDrawer(CAD, int, bool, bool, bool)"/>
                ///will fail because there is no Suspension.
                ///But, the <see cref="CAD.ImportCAD(ref bool, ref bool)"/> method must be executed becase when the see cref="ImportCADForm.simpleButtonBrowse_Click(object, EventArgs)"/> is fired an Import must have heppened (Check is in place to ensure Import has happened)
                /// </remarks>
                if (Vehicle.List_Vehicle[Index_Input].sc_FL != null)
                {
                    vehicleCADDrawer_Input.GetCoG(Vehicle.List_Vehicle[Index_Input].chassis_vehicle);

                    GetCPForce(Vehicle.List_Vehicle[Index_Input].vehicleLoadCase, out CPForceX, out CPForceY, out CPForceZ, 1);
                    vehicleCADDrawer_Input.SuspensionPlotterInvoker(Vehicle.List_Vehicle[Index_Input].sc_FL, 1, Vehicle.List_Vehicle[Index_Input].wa_FL, true, _plotWheel, null, CPForceX, CPForceY, CPForceZ);

                    GetCPForce(Vehicle.List_Vehicle[Index_Input].vehicleLoadCase, out CPForceX, out CPForceY, out CPForceZ, 2);
                    vehicleCADDrawer_Input.SuspensionPlotterInvoker(Vehicle.List_Vehicle[Index_Input].sc_FR, 2, Vehicle.List_Vehicle[Index_Input].wa_FR, true, _plotWheel, null, CPForceX, CPForceY, CPForceZ);

                    GetCPForce(Vehicle.List_Vehicle[Index_Input].vehicleLoadCase, out CPForceX, out CPForceY, out CPForceZ, 3);
                    vehicleCADDrawer_Input.SuspensionPlotterInvoker(Vehicle.List_Vehicle[Index_Input].sc_RL, 3, Vehicle.List_Vehicle[Index_Input].wa_RL, true, _plotWheel, null, CPForceX, CPForceY, CPForceZ);

                    GetCPForce(Vehicle.List_Vehicle[Index_Input].vehicleLoadCase, out CPForceX, out CPForceY, out CPForceZ, 4);
                    vehicleCADDrawer_Input.SuspensionPlotterInvoker(Vehicle.List_Vehicle[Index_Input].sc_RR, 4, Vehicle.List_Vehicle[Index_Input].wa_RR, true, _plotWheel, null, CPForceX, CPForceY, CPForceZ);


                    vehicleCADDrawer_Input.ARBConnector(vehicleCADDrawer_Input.CoordinatesFL.InboardPickUp, vehicleCADDrawer_Input.CoordinatesFR.InboardPickUp);


                    vehicleCADDrawer_Input.SteeringCSystemPlotter(Vehicle.List_Vehicle[Index_Input].sc_FL, Vehicle.List_Vehicle[Index_Input].sc_FR, vehicleCADDrawer_Input.CoordinatesFL.InboardPickUp, vehicleCADDrawer_Input.CoordinatesFR.InboardPickUp);


                    vehicleCADDrawer_Input.ARBConnector(vehicleCADDrawer_Input.CoordinatesRL.InboardPickUp, vehicleCADDrawer_Input.CoordinatesRR.InboardPickUp);

                    vehicleCADDrawer_Input.SetupViewPort();
                }

                if (_importCAD && !FileHasBeenImported)
                {
                    ///<summary>
                    ///Calling the <see cref="CAD.ImportCAD(ref bool)"/> function. This function requires a string of the file name to be passed. But this string is used only in 2 conditions.
                    ///1. If the Output Vehicle is calling the import function
                    ///2. If the Input and Output Vehicles are calling the function during an Open operation
                    ///These are the only 2 conditions when the controlling IF loop will allow access to section of the code which requires the string to be passed. Hence passing null here as the below lines of code will not trigger the IF loop under norm
                    ///conditions and THIS IF LOOP will not be triggerd when Open operations is going on
                    /// </summary>
                    //vehicleCADDrawer_Input.ImportedCADPlotter(ref FileHasBeenImported, ref CadIsTobeImported, false, vehicleCADDrawer_Input.openFileDialog1.FileName/*, CADVehicleInputs.importedFile*/);
                    //IGESFIleName = vehicleCADDrawer_Input.openFileDialog1.FileName;
                }

                ///<summary>
                ///Since the Vehicle is allowed to be created without the creation of the Input Items it may happen that (since Suspension doesn't exist yet) the <see cref="VehicleGUI.Vehicle_MotionExists"/> is not yet assigned.
                /// So the <see cref="Vehicle.sc_FL"/> is evalutated to check if it is null. Only if it is not null can the decision regarding whether or not Motion exists can be taken
                /// </summary>
                if (!_motionExists && Vehicle.List_Vehicle[Index_Input].sc_FL != null)
                {
                    vehicleCADDrawer_Input.DrawStands(Vehicle.List_Vehicle[Index_Input].sc_FL, Vehicle.List_Vehicle[Index_Input].sc_FR, Vehicle.List_Vehicle[Index_Input].sc_RL, Vehicle.List_Vehicle[Index_Input].sc_RR);
                }
            }
            catch (Exception E)
            {
                string error = E.Message;
                // Keeping this code in try and catch block will help during Open operation. If the method is called without a Vehicle or VehicleGUI item being present, then the software won't crasha
            }
        }
コード例 #9
0
 /// <summary>
 /// Method to get the Parent <see cref="CAD"/> control of this Form
 /// </summary>
 /// <param name="_parentCAD">Parent <see cref="CAD"/> Control </param>
 private void GetParentCADControl(CAD _parentCAD)
 {
     ParentCAD = _parentCAD;
 }