private void InitializeDataGridView() { DataGridViewControl.AddCheckBoxColumn(nameof(SelectableRow <PipingSurfaceLine> .Selected), RiskeerCommonFormsResources.SelectionDialogBase_ColumnSelect_DisplayName); DataGridViewControl.AddTextBoxColumn(nameof(SelectableRow <PipingSurfaceLine> .Name), RiskeerCommonFormsResources.SurfaceLine_DisplayName, true, DataGridViewAutoSizeColumnMode.Fill); }
/// <summary> /// Initializes the <see cref="DataGridView"/>. /// <param name="nameColumnHeader">Display name of the column header for <see cref="SelectableRow{T}.Name"/>.</param> /// </summary> protected void InitializeDataGridView(string nameColumnHeader) { DataGridViewControl.AddCheckBoxColumn(nameof(SelectableRow <T> .Selected), Resources.SelectionDialogBase_ColumnSelect_DisplayName); DataGridViewControl.AddTextBoxColumn(nameof(SelectableRow <T> .Name), nameColumnHeader, true, DataGridViewAutoSizeColumnMode.Fill); }
protected override void AddColumns(Action addNameColumn, Action addHydraulicBoundaryLocationColumn) { addNameColumn(); addHydraulicBoundaryLocationColumn(); DataGridViewControl.AddComboBoxColumn <DataGridViewComboBoxItemWrapper <ForeshoreProfile> >( nameof(StabilityPointStructuresCalculationRow.ForeshoreProfile), RiskeerCommonFormsResources.Structure_ForeshoreProfile_DisplayName, null, nameof(DataGridViewComboBoxItemWrapper <ForeshoreProfile> .This), nameof(DataGridViewComboBoxItemWrapper <ForeshoreProfile> .DisplayName)); DataGridViewControl.AddCheckBoxColumn( nameof(StabilityPointStructuresCalculationRow.UseBreakWater), RiskeerCommonFormsResources.Use_BreakWater_DisplayName); DataGridViewControl.AddComboBoxColumn( nameof(StabilityPointStructuresCalculationRow.BreakWaterType), RiskeerCommonFormsResources.CalculationsView_BreakWaterType_DisplayName, EnumDisplayWrapperHelper.GetEnumTypes <BreakWaterType>(), nameof(EnumDisplayWrapper <BreakWaterType> .Value), nameof(EnumDisplayWrapper <BreakWaterType> .DisplayName)); DataGridViewControl.AddTextBoxColumn( nameof(StabilityPointStructuresCalculationRow.BreakWaterHeight), RiskeerCommonFormsResources.CalculationsView_BreakWaterHeight_DisplayName); DataGridViewControl.AddCheckBoxColumn( nameof(StabilityPointStructuresCalculationRow.UseForeshoreGeometry), RiskeerCommonFormsResources.Use_Foreshore_DisplayName); DataGridViewControl.AddComboBoxColumn( nameof(StabilityPointStructuresCalculationRow.LoadSchematizationType), RiskeerCommonFormsResources.LoadSchematizationType_DisplayName, EnumDisplayWrapperHelper.GetEnumTypes <LoadSchematizationType>(), nameof(EnumDisplayWrapper <LoadSchematizationType> .Value), nameof(EnumDisplayWrapper <LoadSchematizationType> .DisplayName)); DataGridViewControl.AddTextBoxColumn( nameof(StabilityPointStructuresCalculationRow.ConstructiveStrengthLinearLoadModel), $"{RiskeerCommonFormsResources.NormalDistribution_Mean_DisplayName}\r\n{Resources.StabilityPointStructuresCalculationsView_ConstructiveStrength_Linear_LoadModel_DisplayName}"); DataGridViewControl.AddTextBoxColumn( nameof(StabilityPointStructuresCalculationRow.ConstructiveStrengthQuadraticLoadModel), $"{RiskeerCommonFormsResources.NormalDistribution_Mean_DisplayName}\r\n{Resources.StabilityPointStructuresCalculationsView_ConstructiveStrength_Quadratic_LoadModel_DisplayName}"); DataGridViewControl.AddTextBoxColumn( nameof(StabilityPointStructuresCalculationRow.StabilityLinearLoadModel), $"{RiskeerCommonFormsResources.NormalDistribution_Mean_DisplayName}\r\n{Resources.StabilityPointStructuresCalculationsView_Linear_LoadModel_DisplayName}"); DataGridViewControl.AddTextBoxColumn( nameof(StabilityPointStructuresCalculationRow.StabilityQuadraticLoadModel), $"{RiskeerCommonFormsResources.NormalDistribution_Mean_DisplayName}\r\n{Resources.StabilityPointStructuresCalculationsView_Quadratic_LoadModel_DisplayName}"); DataGridViewControl.AddTextBoxColumn( nameof(StabilityPointStructuresCalculationRow.EvaluationLevel), RiskeerCommonFormsResources.Evaluation_Level_DisplayName); }
protected override void AddColumns(Action addNameColumn, Action addHydraulicBoundaryLocationColumn) { addNameColumn(); addHydraulicBoundaryLocationColumn(); DataGridViewControl.AddComboBoxColumn <DataGridViewComboBoxItemWrapper <ForeshoreProfile> >( nameof(ClosingStructuresCalculationRow.ForeshoreProfile), RiskeerCommonFormsResources.Structure_ForeshoreProfile_DisplayName, null, nameof(DataGridViewComboBoxItemWrapper <ForeshoreProfile> .This), nameof(DataGridViewComboBoxItemWrapper <ForeshoreProfile> .DisplayName)); DataGridViewControl.AddCheckBoxColumn( nameof(ClosingStructuresCalculationRow.UseBreakWater), RiskeerCommonFormsResources.Use_BreakWater_DisplayName); DataGridViewControl.AddComboBoxColumn( nameof(ClosingStructuresCalculationRow.BreakWaterType), RiskeerCommonFormsResources.CalculationsView_BreakWaterType_DisplayName, EnumDisplayWrapperHelper.GetEnumTypes <BreakWaterType>(), nameof(EnumDisplayWrapper <BreakWaterType> .Value), nameof(EnumDisplayWrapper <BreakWaterType> .DisplayName)); DataGridViewControl.AddTextBoxColumn( nameof(ClosingStructuresCalculationRow.BreakWaterHeight), RiskeerCommonFormsResources.CalculationsView_BreakWaterHeight_DisplayName); DataGridViewControl.AddCheckBoxColumn( nameof(ClosingStructuresCalculationRow.UseForeshoreGeometry), RiskeerCommonFormsResources.Use_Foreshore_DisplayName); DataGridViewControl.AddComboBoxColumn( nameof(ClosingStructuresCalculationRow.InflowModelType), RiskeerCommonFormsResources.Structure_InflowModelType_DisplayName, EnumDisplayWrapperHelper.GetEnumTypes <ClosingStructureInflowModelType>(), nameof(EnumDisplayWrapper <ClosingStructureInflowModelType> .Value), nameof(EnumDisplayWrapper <ClosingStructureInflowModelType> .DisplayName)); DataGridViewControl.AddTextBoxColumn( nameof(ClosingStructuresCalculationRow.MeanInsideWaterLevel), $"{RiskeerCommonFormsResources.NormalDistribution_Mean_DisplayName}\r\n{Resources.ClosingStructuresCalculationsView_InsideWaterLevel_DisplayName}"); DataGridViewControl.AddTextBoxColumn( nameof(ClosingStructuresCalculationRow.CriticalOvertoppingDischarge), $"{RiskeerCommonFormsResources.NormalDistribution_Mean_DisplayName}\r\n{RiskeerCommonFormsResources.StructuresCalculationsView_CriticalOvertoppingDischarge_DisplayName}"); DataGridViewControl.AddTextBoxColumn( nameof(ClosingStructuresCalculationRow.AllowedLevelIncreaseStorage), $"{RiskeerCommonFormsResources.NormalDistribution_Mean_DisplayName}\r\n{RiskeerCommonFormsResources.StructuresCalculationsView_AllowedLevelIncreaseStorage_DisplayName}"); }
/// <summary> /// Adds a column to the <paramref name="dataGridViewControl"/> showing whether the section result is relevant. /// </summary> /// <param name="dataGridViewControl">The <see cref="DataGridViewControl"/> to add the column to.</param> /// <param name="dataPropertyName">The data property name of the column.</param> /// <exception cref="ArgumentNullException">Thrown when any parameter is <c>null</c>.</exception> public static void AddIsRelevantColumn(DataGridViewControl dataGridViewControl, string dataPropertyName) { if (dataGridViewControl == null) { throw new ArgumentNullException(nameof(dataGridViewControl)); } if (dataPropertyName == null) { throw new ArgumentNullException(nameof(dataPropertyName)); } dataGridViewControl.AddCheckBoxColumn( dataPropertyName, Resources.FailureMechanismResultView_IsRelevant_DisplayName); }
protected override void AddColumns(Action addNameColumn, Action addHydraulicBoundaryLocationColumn) { addNameColumn(); DataGridViewControl.AddComboBoxColumn <DataGridViewComboBoxItemWrapper <DikeProfile> >( nameof(GrassCoverErosionInwardsCalculationRow.DikeProfile), Resources.DikeProfile_DisplayName, null, nameof(DataGridViewComboBoxItemWrapper <DikeProfile> .This), nameof(DataGridViewComboBoxItemWrapper <DikeProfile> .DisplayName)); addHydraulicBoundaryLocationColumn(); DataGridViewControl.AddCheckBoxColumn( nameof(GrassCoverErosionInwardsCalculationRow.UseBreakWater), RiskeerCommonFormsResources.Use_BreakWater_DisplayName); DataGridViewControl.AddComboBoxColumn( nameof(GrassCoverErosionInwardsCalculationRow.BreakWaterType), RiskeerCommonFormsResources.CalculationsView_BreakWaterType_DisplayName, EnumDisplayWrapperHelper.GetEnumTypes <BreakWaterType>(), nameof(EnumDisplayWrapper <BreakWaterType> .Value), nameof(EnumDisplayWrapper <BreakWaterType> .DisplayName)); DataGridViewControl.AddTextBoxColumn( nameof(GrassCoverErosionInwardsCalculationRow.BreakWaterHeight), RiskeerCommonFormsResources.CalculationsView_BreakWaterHeight_DisplayName); DataGridViewControl.AddCheckBoxColumn( nameof(GrassCoverErosionInwardsCalculationRow.UseForeshoreGeometry), RiskeerCommonFormsResources.Use_Foreshore_DisplayName); DataGridViewControl.AddTextBoxColumn( nameof(GrassCoverErosionInwardsCalculationRow.DikeHeight), RiskeerCommonFormsResources.DikeHeight_DisplayName); DataGridViewControl.AddTextBoxColumn( nameof(GrassCoverErosionInwardsCalculationRow.MeanCriticalFlowRate), $"{RiskeerCommonFormsResources.NormalDistribution_Mean_DisplayName}\r\n{Resources.GrassCoverErosionInwardsCalculationsView_CriticalFlowRate_DisplayName}"); DataGridViewControl.AddTextBoxColumn( nameof(GrassCoverErosionInwardsCalculationRow.StandardDeviationCriticalFlowRate), $"{RiskeerCommonFormsResources.NormalDistribution_StandardDeviation_DisplayName}\r\n{Resources.GrassCoverErosionInwardsCalculationsView_CriticalFlowRate_DisplayName}"); }
protected override void InitializeDataGridView() { DataGridViewControl.AddCheckBoxColumn( nameof(MacroStabilityInwardsScenarioRow.IsRelevant), RiskeerCommonFormsResources.ScenarioView_InitializeDataGridView_In_final_rating ); DataGridViewControl.AddTextBoxColumn( nameof(MacroStabilityInwardsScenarioRow.Contribution), RiskeerCommonFormsResources.ScenarioView_InitializeDataGridView_Contribution ); DataGridViewControl.AddTextBoxColumn( nameof(MacroStabilityInwardsScenarioRow.Name), RiskeerCommonFormsResources.ScenarioView_Name_DisplayName ); DataGridViewControl.AddTextBoxColumn( nameof(MacroStabilityInwardsScenarioRow.FailureProbability), RiskeerCommonFormsResources.ScenarioView_ProfileFailureProbability_DisplayName ); DataGridViewControl.AddTextBoxColumn( nameof(MacroStabilityInwardsScenarioRow.SectionFailureProbability), RiskeerCommonFormsResources.ScenarioView_SectionFailureProbability_DisplayName ); }