예제 #1
0
        public void PopulateSuspensionGridControl(Kinematics_Software_New _R1, VehicleGUI _vehicleGUI, Vehicle _vehicleGridControlPopulation, int OutputIndex)
        {
            _vehicleGUI.ocGUI_FL.bandedGridView_Outputs        = CustomBandedGridView.CreateNewBandedGridView(1, 4, "Front Left Suspension Coordinates");
            _vehicleGUI.GridControlOutputs_SCFL.BindingContext = new BindingContext();
            _vehicleGUI.GridControlOutputs_SCFL.DataSource     = null;
            _vehicleGUI.GridControlOutputs_SCFL.ForceInitialize();
            _vehicleGUI.GridControlOutputs_SCFL.MainView = _vehicleGUI.ocGUI_FL.bandedGridView_Outputs;
            GridControlDataSource(_vehicleGUI.GridControlOutputs_SCFL, _vehicleGridControlPopulation.oc_FL[OutputIndex].OC_SC_DataTable, _vehicleGUI.ocGUI_FL.bandedGridView_Outputs, _R1);

            _vehicleGUI.ocGUI_FR.bandedGridView_Outputs        = CustomBandedGridView.CreateNewBandedGridView(1, 4, "Front Right Suspension Coordinates");
            _vehicleGUI.GridControlOutputs_SCFR.BindingContext = new BindingContext();
            _vehicleGUI.GridControlOutputs_SCFR.DataSource     = null;
            _vehicleGUI.GridControlOutputs_SCFR.ForceInitialize();
            _vehicleGUI.GridControlOutputs_SCFR.MainView = _vehicleGUI.ocGUI_FR.bandedGridView_Outputs;
            GridControlDataSource(_vehicleGUI.GridControlOutputs_SCFR, _vehicleGridControlPopulation.oc_FR[OutputIndex].OC_SC_DataTable, _vehicleGUI.ocGUI_FR.bandedGridView_Outputs, _R1);

            _vehicleGUI.ocGUI_RL.bandedGridView_Outputs        = CustomBandedGridView.CreateNewBandedGridView(1, 4, "Rear Left Suspension Coordinates");
            _vehicleGUI.GridControlOutputs_SCRL.BindingContext = new BindingContext();
            _vehicleGUI.GridControlOutputs_SCRL.DataSource     = null;
            _vehicleGUI.GridControlOutputs_SCRL.ForceInitialize();
            _vehicleGUI.GridControlOutputs_SCRL.MainView = _vehicleGUI.ocGUI_RL.bandedGridView_Outputs;
            GridControlDataSource(_vehicleGUI.GridControlOutputs_SCRL, _vehicleGridControlPopulation.oc_RL[OutputIndex].OC_SC_DataTable, _vehicleGUI.ocGUI_RL.bandedGridView_Outputs, _R1);

            _vehicleGUI.ocGUI_RR.bandedGridView_Outputs        = CustomBandedGridView.CreateNewBandedGridView(1, 4, "Rear Right Suspension Coordinates");
            _vehicleGUI.GridControlOutputs_SCRR.BindingContext = new BindingContext();
            _vehicleGUI.GridControlOutputs_SCRR.DataSource     = null;
            _vehicleGUI.GridControlOutputs_SCRR.ForceInitialize();
            _vehicleGUI.GridControlOutputs_SCRR.MainView = _vehicleGUI.ocGUI_RR.bandedGridView_Outputs;
            GridControlDataSource(_vehicleGUI.GridControlOutputs_SCRR, _vehicleGridControlPopulation.oc_RR[OutputIndex].OC_SC_DataTable, _vehicleGUI.ocGUI_RR.bandedGridView_Outputs, _R1);
        }
예제 #2
0
        /// <summary>
        /// Method to Initalize the Grid Control, assign a Data Source and Main View to it, assign Value Change and Value Editor Methods
        /// </summary>

        #region Grid Control Initializer

        private void InitializeGridControls(int _noOfColumns, string _bandName, string _columnName1, string _columnName2, GridControl _gridControl, DataTable _dataSource, CustomBandedGridView _bandedGridView, bool Coordinate, Kinematics_Software_New _r)
        {
            float fontSize = 11;

            _bandedGridView             = CustomBandedGridView.CreateNewBandedGridView(0, _noOfColumns, _bandName);
            _gridControl.BindingContext = new BindingContext();
            _gridControl.DataSource     = null;
            _gridControl.ForceInitialize();
            _gridControl.DataSource           = _dataSource;
            _gridControl.MainView             = _bandedGridView;
            _bandedGridView.CellValueChanged += BandedGrid_LoadCase_CellValueChanged;
            _bandedGridView.ValidatingEditor += BandedGrid_LoadCase_ValidatingEditor;

            FontFamily LoadCaseFont = new FontFamily("Tahoma");

            _bandedGridView.Appearance.Row.Font = new Font(LoadCaseFont, fontSize);
            if (!Coordinate)
            {
                _bandedGridView = CustomBandedGridColumn.ColumnEditor_ForLoadCases(_bandedGridView, _columnName1, _columnName2);
            }
            else
            {
                _bandedGridView = CustomBandedGridColumn.ColumnEditor_ForSuspension(_bandedGridView, _r);
            }
        }
        /// <summary>
        /// Method to assign the <see cref="gridControlHeatMap"/> Data Source, Main View and Paint the Heat Map
        /// </summary>
        /// <param name="noOfColumns"></param>
        /// <param name="outputChannel"></param>
        private void DrawHeatMap(int noOfColumns, string outputChannel)
        {
            BatchRunGUI.bandedGridViewBatchRun = CustomBandedGridView.CreateNewBandedGridView(0, noOfColumns, outputChannel + " Heat Map");

            gridControlHeatMap.DataSource = HeatMapDataSource;

            gridControlHeatMap.MainView = BatchRunGUI.bandedGridViewBatchRun;

            BatchRunGUI.bandedGridViewBatchRun = CustomBandedGridColumn.ColumnEditor_ForHeatMapControl(BatchRunGUI.bandedGridViewBatchRun);

            ConditionHeatMap(OutputMode);

            BatchRunGUI.bandedGridViewBatchRun.Columns[1].SortOrder = DevExpress.Data.ColumnSortOrder.Descending;
        }
예제 #4
0
        /// <summary>
        /// Method to initialize the <see cref="bandedGridView1"/>, set the <see cref="GridControl.DataSource"/> and perform some conditioning for the <see cref="GridControl.MainView"/> (which is the <see cref="bandedGridView1"/>)
        /// </summary>
        /// <param name="_legendDataTable"><see cref="DataTable"/> of the Legend</param>
        private void GridControlConditioning(DataTable _legendDataTable)
        {
            ///<summary> Initializing the <see cref="bandedGridView1"/> </summary>
            bandedGridView1 = CustomBandedGridView.CreateNewBandedGridView(0, 3, "Legend Data");

            ///<summary>Setting the DataSource and MainView of the <see cref="gridControl1"/></summary>
            GridControlConditioning_SetDataSource();

            ///<summary>Conditioning the Columns of the BandedGridView </summary>
            bandedGridView1 = CustomBandedGridColumn.ColumnEditor_ForLegend(bandedGridView1);

            ///<summary>Assigning the Colour Column of the Legend with the <see cref="repositoryItemColorPickEdit1"/> so that it displayes the colours from the <see cref="LegendDataTable"/></summary>
            bandedGridView1.Columns[2].ColumnEdit = repositoryItemColorPickEdit1;
        }
예제 #5
0
 public void InitializeGridControl_MotionView(int Index, Kinematics_Software_New _r1)
 {
     try
     {
         r1 = _r1;
         int guiIndex = Vehicle.List_Vehicle[Index].vehicle_Motion.MotionID - 1;
         MotionGUI.List_MotionGUI[guiIndex].bandedGridView_Motion = CustomBandedGridView.CreateNewBandedGridView(guiIndex, 3, "Motion View");
         _r1.gridControl2.DataSource = Vehicle.List_Vehicle[Index].vehicle_Motion.Motion_DataTable;
         _r1.gridControl2.MainView   = MotionGUI.List_MotionGUI[guiIndex].bandedGridView_Motion;
         MotionGUI.List_MotionGUI[guiIndex].bandedGridView_Motion.FocusedRowChanged += BandedGridView_Motion_FocusedRowChanged;
         MotionGUI.List_MotionGUI[guiIndex].bandedGridView_Motion.OptionsNavigation.EnterMoveNextColumn = true;
         MotionGUI.List_MotionGUI[guiIndex].bandedGridView_Motion.OptionsNavigation.AutoMoveRowFocus    = true;
         MotionGUI.List_MotionGUI[guiIndex].bandedGridView_Motion.OptionsNavigation.AutoFocusNewRow     = true;
         MotionGUI.List_MotionGUI[guiIndex].bandedGridView_Motion = CustomBandedGridColumn.ColumnEditor_ForMotion(MotionGUI.List_MotionGUI[guiIndex].bandedGridView_Motion, _r1);
     }
     catch (Exception)
     {
         // If I open a project which has no motion but has a vehicle then this function will be called on account of the fact that the there exists a Vehicle. At that point, this method will fail because the guiIndex will be -1. SO to allow the remaining
         // open function to continue, this TryCatch block exists
     }
 }