Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsSoilLayerDataTable.cs
===================================================================
diff -u -r85b10b88eb31823c50ca052d34baacc6e006ad4c -r3a85bb13c6b7c5c6c90cd0b837e1e09607f29298
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsSoilLayerDataTable.cs (.../MacroStabilityInwardsSoilLayerDataTable.cs) (revision 85b10b88eb31823c50ca052d34baacc6e006ad4c)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsSoilLayerDataTable.cs (.../MacroStabilityInwardsSoilLayerDataTable.cs) (revision 3a85bb13c6b7c5c6c90cd0b837e1e09607f29298)
@@ -20,14 +20,11 @@
// All rights reserved.
using System.Collections.Generic;
-using System.Drawing;
using System.Linq;
using Core.Common.Controls.DataGrid;
-using Ringtoets.Common.Data.Probabilistics;
using Ringtoets.MacroStabilityInwards.Data.SoilProfile;
using Ringtoets.MacroStabilityInwards.Forms.Properties;
using Ringtoets.MacroStabilityInwards.Primitives;
-using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
namespace Ringtoets.MacroStabilityInwards.Forms.Views
{
@@ -52,131 +49,46 @@
/// The collection of layers to show.
public void SetData(IEnumerable layers)
{
- SetDataSource(layers?.Select(l => new FormattedMacroStabilityInwardsSoilLayerDataRow(l)).ToArray());
+ SetDataSource(layers?.Select(l => new MacroStabilityInwardsFormattedSoilLayerDataRow(l)).ToArray());
}
private void AddColumns()
{
- AddTextBoxColumn(nameof(FormattedMacroStabilityInwardsSoilLayerDataRow.MaterialName),
+ AddTextBoxColumn(nameof(MacroStabilityInwardsFormattedSoilLayerDataRow.MaterialName),
Resources.MacroStabilityInwardsSoilLayerDataTable_ColumnHeader_MaterialName,
true);
- AddColorColumn(nameof(FormattedMacroStabilityInwardsSoilLayerDataRow.Color),
+ AddColorColumn(nameof(MacroStabilityInwardsFormattedSoilLayerDataRow.Color),
Resources.MacroStabilityInwardsSoilLayerDataTable_ColumnHeader_Color);
- AddCheckBoxColumn(nameof(FormattedMacroStabilityInwardsSoilLayerDataRow.IsAquifer),
+ AddCheckBoxColumn(nameof(MacroStabilityInwardsFormattedSoilLayerDataRow.IsAquifer),
Resources.MacroStabilityInwardsSoilLayerDataTable_ColumnHeader_IsAquifer,
true);
- AddTextBoxColumn(nameof(FormattedMacroStabilityInwardsSoilLayerDataRow.AbovePhreaticLevel),
+ AddTextBoxColumn(nameof(MacroStabilityInwardsFormattedSoilLayerDataRow.AbovePhreaticLevel),
Resources.MacroStabilityInwardsSoilLayerDataTable_ColumnHeader_AbovePhreaticLevel,
true);
- AddTextBoxColumn(nameof(FormattedMacroStabilityInwardsSoilLayerDataRow.BelowPhreaticLevel),
+ AddTextBoxColumn(nameof(MacroStabilityInwardsFormattedSoilLayerDataRow.BelowPhreaticLevel),
Resources.MacroStabilityInwardsSoilLayerDataTable_ColumnHeader_BelowPhreaticLevel,
true);
- AddTextBoxColumn(nameof(FormattedMacroStabilityInwardsSoilLayerDataRow.ShearStrengthModel),
+ AddTextBoxColumn(nameof(MacroStabilityInwardsFormattedSoilLayerDataRow.ShearStrengthModel),
Resources.MacroStabilityInwardsSoilLayerDataTable_ColumnHeader_ShearStrengthModel,
true);
- AddTextBoxColumn(nameof(FormattedMacroStabilityInwardsSoilLayerDataRow.Cohesion),
+ AddTextBoxColumn(nameof(MacroStabilityInwardsFormattedSoilLayerDataRow.Cohesion),
Resources.MacroStabilityInwardsSoilLayerDataTable_ColumnHeader_Cohesion,
true);
- AddTextBoxColumn(nameof(FormattedMacroStabilityInwardsSoilLayerDataRow.FrictionAngle),
+ AddTextBoxColumn(nameof(MacroStabilityInwardsFormattedSoilLayerDataRow.FrictionAngle),
Resources.MacroStabilityInwardsSoilLayerDataTable_ColumnHeader_FrictionAngle,
true);
- AddTextBoxColumn(nameof(FormattedMacroStabilityInwardsSoilLayerDataRow.ShearStrengthRatio),
+ AddTextBoxColumn(nameof(MacroStabilityInwardsFormattedSoilLayerDataRow.ShearStrengthRatio),
Resources.MacroStabilityInwardsSoilLayerDataTable_ColumnHeader_ShearStrengthRatio,
true);
- AddTextBoxColumn(nameof(FormattedMacroStabilityInwardsSoilLayerDataRow.StrengthIncreaseExponent),
+ AddTextBoxColumn(nameof(MacroStabilityInwardsFormattedSoilLayerDataRow.StrengthIncreaseExponent),
Resources.MacroStabilityInwardsSoilLayerDataTable_ColumnHeader_StrengthIncreaseExponent,
true);
- AddTextBoxColumn(nameof(FormattedMacroStabilityInwardsSoilLayerDataRow.UsePop),
+ AddTextBoxColumn(nameof(MacroStabilityInwardsFormattedSoilLayerDataRow.UsePop),
Resources.MacroStabilityInwardsSoilLayerDataTable_ColumnHeader_UsePop,
true);
- AddTextBoxColumn(nameof(FormattedMacroStabilityInwardsSoilLayerDataRow.Pop),
+ AddTextBoxColumn(nameof(MacroStabilityInwardsFormattedSoilLayerDataRow.Pop),
Resources.MacroStabilityInwardsSoilLayerDataTable_ColumnHeader_Pop,
true);
}
-
- private static string FormatDesignVariable(VariationCoefficientDesignVariable distribution)
- {
- return $"{distribution.GetDesignValue()} ({RingtoetsCommonFormsResources.NormalDistribution_Mean_DisplayName} = {distribution.Distribution.Mean}, " +
- $"{RingtoetsCommonFormsResources.NormalDistribution_StandardDeviation_DisplayName} = {distribution.Distribution.CoefficientOfVariation})";
- }
-
- private class FormattedMacroStabilityInwardsSoilLayerDataRow
- {
- public FormattedMacroStabilityInwardsSoilLayerDataRow(IMacroStabilityInwardsSoilLayerData layerData)
- {
- MaterialName = layerData.MaterialName;
- Color = layerData.Color;
- IsAquifer = layerData.IsAquifer;
- AbovePhreaticLevel = FormatDesignVariable(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetAbovePhreaticLevel(layerData));
- BelowPhreaticLevel = FormatDesignVariable(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetBelowPhreaticLevel(layerData));
- ShearStrengthModel = layerData.ShearStrengthModel;
- Cohesion = FormatDesignVariable(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetCohesion(layerData));
- FrictionAngle = FormatDesignVariable(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetFrictionAngle(layerData));
- ShearStrengthRatio = FormatDesignVariable(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetShearStrengthRatio(layerData));
- StrengthIncreaseExponent = FormatDesignVariable(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetStrengthIncreaseExponent(layerData));
- UsePop = layerData.UsePop;
- Pop = FormatDesignVariable(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetPop(layerData));
- }
-
- ///
- /// Gets a value indicating whether or not the is an aquifer.
- ///
- public bool IsAquifer { get; }
-
- ///
- /// Gets the name of the material that was assigned to the .
- ///
- public string MaterialName { get; }
-
- ///
- /// Gets the that was used to represent the .
- ///
- public Color Color { get; }
-
- ///
- /// Gets the formatted design variable for .
- ///
- public string AbovePhreaticLevel { get; }
-
- ///
- /// Gets the formatted design variable for .
- ///
- public string BelowPhreaticLevel { get; }
-
- ///
- /// Gets the type.
- ///
- public MacroStabilityInwardsShearStrengthModel ShearStrengthModel { get; }
-
- ///
- /// Gets the formatted design variable for .
- ///
- public string Cohesion { get; }
-
- ///
- /// Gets the formatted design variable for .
- ///
- public string FrictionAngle { get; }
-
- ///
- /// Gets the formatted design variable for .
- ///
- public string ShearStrengthRatio { get; }
-
- ///
- /// Gets the formatted design variable for .
- ///
- public string StrengthIncreaseExponent { get; }
-
- ///
- /// Gets a value indicating whether or not the is using POP.
- ///
- public bool UsePop { get; }
-
- ///
- /// Gets the formatted design variable for .
- ///
- public string Pop { get; }
- }
}
}
\ No newline at end of file