Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingSoilLayerTable.cs =================================================================== diff -u -r5e6189fbdb1d72d1ac13c1c5471315778f812561 -r9aeabc9470fb977c5006f45a6844d84c8e5a2962 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingSoilLayerTable.cs (.../PipingSoilLayerTable.cs) (revision 5e6189fbdb1d72d1ac13c1c5471315778f812561) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingSoilLayerTable.cs (.../PipingSoilLayerTable.cs) (revision 9aeabc9470fb977c5006f45a6844d84c8e5a2962) @@ -19,7 +19,11 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using Core.Common.Base.Data; using Core.Common.Controls.DataGrid; using Ringtoets.Piping.Primitives; @@ -46,22 +50,105 @@ /// The collection of layers to show. public void SetData(IEnumerable layers) { - SetDataSource(layers); + SetDataSource(layers?.Select(l => new FormattedPipingSoilLayerRow(l)).ToArray()); } private void AddColumns() { - AddTextBoxColumn(nameof(PipingSoilLayer.MaterialName), "Naam", true); - AddColorColumn(nameof(PipingSoilLayer.Color), "Kleur"); - AddTextBoxColumn(nameof(PipingSoilLayer.Top), "Topniveau [m+NAP]", true); - AddCheckBoxColumn(nameof(PipingSoilLayer.IsAquifer), "Is aquifer", true); - AddTextBoxColumn(nameof(PipingSoilLayer.PermeabilityMean), "Doorlatendheid (verwachtingswaarde) [m/s]", true); - AddTextBoxColumn(nameof(PipingSoilLayer.PermeabilityDeviation), "Doorlatendheid (standaardafwijking) [m/s]", true); - AddTextBoxColumn(nameof(PipingSoilLayer.DiameterD70Mean), "d70 (verwachtingswaarde) [m]", true); - AddTextBoxColumn(nameof(PipingSoilLayer.DiameterD70Deviation), "d70 (standaardafwijking) [m]", true); - AddTextBoxColumn(nameof(PipingSoilLayer.BelowPhreaticLevelMean), "Verzadigd gewicht (verwachtingswaarde) [kn/m³]", true); - AddTextBoxColumn(nameof(PipingSoilLayer.BelowPhreaticLevelDeviation), "Verzadigd gewicht (standaardafwijking) [kn/m³]", true); - AddTextBoxColumn(nameof(PipingSoilLayer.BelowPhreaticLevelShift), "Verzadigd gewicht (verschuiving) [kn/m³]", true); + AddTextBoxColumn(nameof(FormattedPipingSoilLayerRow.MaterialName), "Naam", true); + AddColorColumn(nameof(FormattedPipingSoilLayerRow.Color), "Kleur"); + AddTextBoxColumn(nameof(FormattedPipingSoilLayerRow.Top), "Topniveau [m+NAP]", true); + AddCheckBoxColumn(nameof(FormattedPipingSoilLayerRow.IsAquifer), "Is aquifer", true); + AddTextBoxColumn(nameof(FormattedPipingSoilLayerRow.PermeabilityMean), "Doorlatendheid (verwachtingswaarde) [m/s]", true); + AddTextBoxColumn(nameof(FormattedPipingSoilLayerRow.PermeabilityDeviation), "Doorlatendheid (standaardafwijking) [m/s]", true); + AddTextBoxColumn(nameof(FormattedPipingSoilLayerRow.DiameterD70Mean), "d70 (verwachtingswaarde) [m]", true); + AddTextBoxColumn(nameof(FormattedPipingSoilLayerRow.DiameterD70Deviation), "d70 (standaardafwijking) [m]", true); + AddTextBoxColumn(nameof(FormattedPipingSoilLayerRow.BelowPhreaticLevelMean), "Verzadigd gewicht (verwachtingswaarde) [kn/m³]", true); + AddTextBoxColumn(nameof(FormattedPipingSoilLayerRow.BelowPhreaticLevelDeviation), "Verzadigd gewicht (standaardafwijking) [kn/m³]", true); + AddTextBoxColumn(nameof(FormattedPipingSoilLayerRow.BelowPhreaticLevelShift), "Verzadigd gewicht (verschuiving) [kn/m³]", true); } + + private class FormattedPipingSoilLayerRow + { + public FormattedPipingSoilLayerRow(PipingSoilLayer layer) + { + MaterialName = layer.MaterialName; + Color = layer.Color; + Top = new RoundedDouble(2, layer.Top); + IsAquifer = layer.IsAquifer; + PermeabilityMean = new RoundedDouble(6, layer.PermeabilityMean); + PermeabilityDeviation = new RoundedDouble(6, layer.PermeabilityDeviation); + DiameterD70Mean = new RoundedDouble(6, layer.DiameterD70Mean); + DiameterD70Deviation = new RoundedDouble(6, layer.DiameterD70Deviation); + BelowPhreaticLevelMean = new RoundedDouble(2, layer.BelowPhreaticLevelMean); + BelowPhreaticLevelDeviation = new RoundedDouble(2, layer.BelowPhreaticLevelDeviation); + BelowPhreaticLevelShift = new RoundedDouble(2, layer.BelowPhreaticLevelShift); + } + + /// + /// Gets the top level of the . + /// + public RoundedDouble Top { get; } + + /// + /// Gets a value indicating whether or not the is an aquifer. + /// + public bool IsAquifer { get; } + + /// + /// Gets the mean of the distrubtion for the volumic weight of the below the phreatic level. + /// [kN/m³] + /// + public RoundedDouble BelowPhreaticLevelMean { get; } + + /// + /// Gets the deviation of the distrubtion for the volumic weight of the below the phreatic level. + /// [kN/m³] + /// + public RoundedDouble BelowPhreaticLevelDeviation { get; } + + /// + /// Gets the shift of the distrubtion for the volumic weight of the below the phreatic level. + /// [kN/m³] + /// + public RoundedDouble BelowPhreaticLevelShift { get; } + + /// + /// Gets the mean of the distribution for the mean diameter of small scale tests applied to different kinds of sand, + /// on which the formula of Sellmeijer has been fit. + /// [m] + /// + public RoundedDouble DiameterD70Mean { get; } + + /// + /// Gets the deviation of the distribution for the mean diameter of small scale tests applied to different kinds of sand, + /// on which the formula of Sellmeijer has been fit. + /// [m] + /// + public RoundedDouble DiameterD70Deviation { get; } + + /// + /// Gets the mean of the distribution for the the Darcy-speed with which water flows through the aquifer layer. + /// [m/s] + /// + public RoundedDouble PermeabilityMean { get; } + + /// + /// Gets the deviation of the distribution for the Darcy-speed with which water flows through the aquifer layer. + /// [m/s] + /// + public RoundedDouble PermeabilityDeviation { get; } + + /// + /// Gets the name of the material that was assigned to the . + /// + /// Thrown when is null. + public string MaterialName { get; } + + /// + /// Gets the that was used to represent the . + /// + public Color Color { get; } + } } } \ No newline at end of file