Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Controls/AssessmentSectionAssemblyControl.cs
===================================================================
diff -u -r44dbc30e3704795e6c88dd02296dc814eb4536bc -r5f24b9f44bf75f735f6b9171ec6ce482fa0dcc7f
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Controls/AssessmentSectionAssemblyControl.cs (.../AssessmentSectionAssemblyControl.cs) (revision 44dbc30e3704795e6c88dd02296dc814eb4536bc)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Controls/AssessmentSectionAssemblyControl.cs (.../AssessmentSectionAssemblyControl.cs) (revision 5f24b9f44bf75f735f6b9171ec6ce482fa0dcc7f)
@@ -19,6 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
using Core.Common.Util;
using Ringtoets.AssemblyTool.Data;
using Ringtoets.Common.Forms.Controls;
@@ -27,14 +28,27 @@
namespace Ringtoets.Integration.Forms.Controls
{
+ ///
+ /// Custom control to display a .
+ ///
public class AssessmentSectionAssemblyControl : AssemblyResultWithProbabilityControl
{
- public void SetData(AssessmentSectionAssembly assembly)
+ ///
+ /// Set the values of on the control.
+ ///
+ /// The to set on the control.
+ /// Thrown when is null.
+ public void SetAssemblyResult(AssessmentSectionAssembly result)
{
- GroupLabel.Text = new EnumDisplayWrapper(assembly.Group).DisplayName;
- GroupLabel.BackColor = AssemblyCategoryGroupColorHelper.GetAssessmentSectionAssemblyCategoryGroupColor(assembly.Group);
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
- ProbabilityLabel.Text = new NoProbabilityValueDoubleConverter().ConvertToString(assembly.Probability);
+ GroupLabel.Text = new EnumDisplayWrapper(result.Group).DisplayName;
+ GroupLabel.BackColor = AssemblyCategoryGroupColorHelper.GetAssessmentSectionAssemblyCategoryGroupColor(result.Group);
+
+ ProbabilityLabel.Text = new NoProbabilityValueDoubleConverter().ConvertToString(result.Probability);
}
}
}
\ No newline at end of file