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}"); }
protected override void AddColumns(Action addNameColumn, Action addHydraulicBoundaryLocationColumn) { addNameColumn(); DataGridViewControl.AddTextBoxColumn( nameof(PipingCalculationRow.CalculationType), Resources.PipingCalculationsView_InitializeDataGridView_Assessment_description); addHydraulicBoundaryLocationColumn(); DataGridViewControl.AddComboBoxColumn <DataGridViewComboBoxItemWrapper <PipingStochasticSoilModel> >( nameof(PipingCalculationRow.StochasticSoilModel), Resources.PipingInput_StochasticSoilModel_DisplayName, null, nameof(DataGridViewComboBoxItemWrapper <PipingStochasticSoilModel> .This), nameof(DataGridViewComboBoxItemWrapper <PipingStochasticSoilModel> .DisplayName)); DataGridViewControl.AddComboBoxColumn <DataGridViewComboBoxItemWrapper <PipingStochasticSoilProfile> >( nameof(PipingCalculationRow.StochasticSoilProfile), Resources.PipingInput_StochasticSoilProfile_DisplayName, null, nameof(DataGridViewComboBoxItemWrapper <PipingStochasticSoilProfile> .This), nameof(DataGridViewComboBoxItemWrapper <PipingStochasticSoilProfile> .DisplayName)); DataGridViewControl.AddTextBoxColumn( nameof(PipingCalculationRow.StochasticSoilProfileProbability), Resources.PipingCalculationsView_InitializeDataGridView_Stochastic_soil_profile_probability); DataGridViewControl.AddTextBoxColumn( nameof(PipingCalculationRow.DampingFactorExitMean), $"{RiskeerCommonFormsResources.NormalDistribution_Mean_DisplayName}\r\n{Resources.PipingCalculationsView_DampingFactorExit_DisplayName}"); DataGridViewControl.AddTextBoxColumn( nameof(PipingCalculationRow.PhreaticLevelExitMean), $"{RiskeerCommonFormsResources.NormalDistribution_Mean_DisplayName}\r\n{Resources.PipingCalculationsView_PhreaticLevelExit_DisplayName}"); DataGridViewControl.AddTextBoxColumn( nameof(PipingCalculationRow.EntryPointL), Resources.PipingInput_EntryPointL_DisplayName); DataGridViewControl.AddTextBoxColumn( nameof(PipingCalculationRow.ExitPointL), Resources.PipingInput_ExitPointL_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}"); }
/// <summary> /// Adds a column to the <paramref name="dataGridViewControl"/> showing a /// dropdown with items of <typeparamref name="T"/>. /// </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> /// <typeparam name="T">The initial failure mechanism result type enum.</typeparam> /// <exception cref="ArgumentNullException">Thrown when any parameter is <c>null</c>.</exception> public static void AddInitialFailureMechanismResultTypeColumn <T>(DataGridViewControl dataGridViewControl, string dataPropertyName) { if (dataGridViewControl == null) { throw new ArgumentNullException(nameof(dataGridViewControl)); } if (dataPropertyName == null) { throw new ArgumentNullException(nameof(dataPropertyName)); } IEnumerable <EnumDisplayWrapper <T> > dataSource = EnumDisplayWrapperHelper.GetEnumTypes <T>(); dataGridViewControl.AddComboBoxColumn( dataPropertyName, Resources.FailureMechanismResultView_InitialFailureMechanismResultType_DisplayName, dataSource, nameof(EnumDisplayWrapper <T> .Value), nameof(EnumDisplayWrapper <T> .DisplayName)); }
protected override void AddColumns(Action addNameColumn, Action addHydraulicBoundaryLocationColumn) { addNameColumn(); addHydraulicBoundaryLocationColumn(); DataGridViewControl.AddComboBoxColumn <DataGridViewComboBoxItemWrapper <MacroStabilityInwardsStochasticSoilModel> >( nameof(MacroStabilityInwardsCalculationRow.StochasticSoilModel), Resources.MacroStabilityInwardsInput_StochasticSoilModel_DisplayName, null, nameof(DataGridViewComboBoxItemWrapper <MacroStabilityInwardsStochasticSoilModel> .This), nameof(DataGridViewComboBoxItemWrapper <MacroStabilityInwardsStochasticSoilModel> .DisplayName)); DataGridViewControl.AddComboBoxColumn <DataGridViewComboBoxItemWrapper <MacroStabilityInwardsStochasticSoilProfile> >( nameof(MacroStabilityInwardsCalculationRow.StochasticSoilProfile), Resources.MacroStabilityInwardsInput_StochasticSoilProfile_DisplayName, null, nameof(DataGridViewComboBoxItemWrapper <MacroStabilityInwardsStochasticSoilProfile> .This), nameof(DataGridViewComboBoxItemWrapper <MacroStabilityInwardsStochasticSoilProfile> .DisplayName)); DataGridViewControl.AddTextBoxColumn( nameof(MacroStabilityInwardsCalculationRow.StochasticSoilProfileProbability), Resources.MacroStabilityInwardsCalculationsView_InitializeDataGridView_Stochastic_soil_profile_probability); }