Ejemplo n.º 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();
        }
        public static Form AddProgressBarToForm(Form _form, ProgressBarSerialization _progressBar, string _formText)
        {
            //_form = new Form();

            _form.Text = _formText;
            _form.Controls.Add(_progressBar);
            _form.Show();
            _progressBar.Anchor = AnchorStyles.None;
            _progressBar.Show();
            return(_form);
        }
        public static ProgressBarSerialization CreateProgressBar(ProgressBarSerialization _progressBar, int _maxValue, int _step)
        {
            _progressBar           = new ProgressBarSerialization();
            _progressBar.EditValue = 0;
            _progressBar.BringToFront();
            _progressBar.Name = "Progress Bar";
            _progressBar.Properties.Maximum = _maxValue;
            _progressBar.Properties.Step    = _step;
            _progressBar.Hide();
            _progressBar.Dock = DockStyle.Right;


            return(_progressBar);
        }
 public void AddProgressBarToRibbonStatusBar(Kinematics_Software_New r1, ProgressBarSerialization _progressBar)
 {
     r1.ribbonStatusBar.Controls.Clear();
     r1.ribbonStatusBar.Controls.Add(_progressBar);
 }