Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Helpers/FailureMechanismSectionResultRowHelper.cs =================================================================== diff -u -re3f913fddac4cfa598ef5439ce6b832f354d7dd8 -r6e0c3a3eec9feb30d964df279e76f2a8e6ae278f --- Ringtoets/Common/src/Ringtoets.Common.Forms/Helpers/FailureMechanismSectionResultRowHelper.cs (.../FailureMechanismSectionResultRowHelper.cs) (revision e3f913fddac4cfa598ef5439ce6b832f354d7dd8) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Helpers/FailureMechanismSectionResultRowHelper.cs (.../FailureMechanismSectionResultRowHelper.cs) (revision 6e0c3a3eec9feb30d964df279e76f2a8e6ae278f) @@ -149,7 +149,7 @@ columnStateDefinition.Style = new CellStyle( Color.FromKnownColor(KnownColor.ControlText), - GetCategoryGroupColor(assemblyCategoryGroup)); + AssemblyCategoryGroupHelper.GetFailureMechanismSectionAssemblyCategoryGroupColor(assemblyCategoryGroup)); } /// @@ -236,47 +236,6 @@ return new EnumDisplayWrapper(displayCategoryGroup).DisplayName; } - /// - /// Gets the color for a category group. - /// - /// The category group to get the color for. - /// The corresponding to the given category group. - /// Thrown when - /// has an invalid value for . - /// Thrown when - /// is not supported. - private static Color GetCategoryGroupColor(FailureMechanismSectionAssemblyCategoryGroup assemblyCategoryGroup) - { - if (!Enum.IsDefined(typeof(FailureMechanismSectionAssemblyCategoryGroup), assemblyCategoryGroup)) - { - throw new InvalidEnumArgumentException(nameof(assemblyCategoryGroup), - (int) assemblyCategoryGroup, - typeof(FailureMechanismSectionAssemblyCategoryGroup)); - } - - switch (assemblyCategoryGroup) - { - case FailureMechanismSectionAssemblyCategoryGroup.Iv: - return Color.FromArgb(0, 255, 0); - case FailureMechanismSectionAssemblyCategoryGroup.IIv: - return Color.FromArgb(118, 147, 60); - case FailureMechanismSectionAssemblyCategoryGroup.IIIv: - return Color.FromArgb(255, 255, 0); - case FailureMechanismSectionAssemblyCategoryGroup.IVv: - return Color.FromArgb(204, 192, 218); - case FailureMechanismSectionAssemblyCategoryGroup.Vv: - return Color.FromArgb(255, 153, 0); - case FailureMechanismSectionAssemblyCategoryGroup.VIv: - return Color.FromArgb(255, 0, 0); - case FailureMechanismSectionAssemblyCategoryGroup.VIIv: - case FailureMechanismSectionAssemblyCategoryGroup.None: - case FailureMechanismSectionAssemblyCategoryGroup.NotApplicable: - return Color.FromArgb(255, 255, 255); - default: - throw new NotSupportedException(); - } - } - private static CalculationScenarioStatus GetCalculationStatus(ICalculation calculation, double detailedAssessmentProbability) {