Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Builders/FailureMechanismSectionResultViewColumnBuilder.cs =================================================================== diff -u -re3f913fddac4cfa598ef5439ce6b832f354d7dd8 -r1bb3bb7c19c360b158dc4b7e915726dc8a125858 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Builders/FailureMechanismSectionResultViewColumnBuilder.cs (.../FailureMechanismSectionResultViewColumnBuilder.cs) (revision e3f913fddac4cfa598ef5439ce6b832f354d7dd8) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Builders/FailureMechanismSectionResultViewColumnBuilder.cs (.../FailureMechanismSectionResultViewColumnBuilder.cs) (revision 1bb3bb7c19c360b158dc4b7e915726dc8a125858) @@ -24,7 +24,6 @@ using System.Linq; using Core.Common.Controls.DataGrid; using Core.Common.Util; -using Ringtoets.AssemblyTool.Data; using Ringtoets.AssemblyTool.Forms; using Ringtoets.Common.Forms.Properties; using Ringtoets.Common.Primitives; @@ -69,6 +68,38 @@ .ToArray(); } + /// + /// Adds a column to the showing the selectable + /// failure mechanism section assembly category group. + /// + /// The to add the column to. + /// The data property name of the column. + /// The header text of the column. + /// Thrown when + /// or is null. + private static void AddSelectableAssemblyCategoryGroupColumn(DataGridViewControl dataGridViewControl, string dataPropertyName, string headerText) + { + if (dataGridViewControl == null) + { + throw new ArgumentNullException(nameof(dataGridViewControl)); + } + + if (dataPropertyName == null) + { + throw new ArgumentNullException(nameof(dataPropertyName)); + } + + IEnumerable> dataSource = + CreateEnumDisplayWrappers(); + + dataGridViewControl.AddComboBoxColumn( + dataPropertyName, + headerText, + dataSource, + nameof(EnumDisplayWrapper.Value), + nameof(EnumDisplayWrapper.DisplayName)); + } + #region Assessment /// @@ -427,24 +458,8 @@ /// Thrown when any parameter is null. public static void AddManualAssemblyCategoryGroupColumn(DataGridViewControl dataGridViewControl, string dataPropertyName) { - if (dataGridViewControl == null) - { - throw new ArgumentNullException(nameof(dataGridViewControl)); - } - - if (dataPropertyName == null) - { - throw new ArgumentNullException(nameof(dataPropertyName)); - } - - IEnumerable> dataSource = CreateEnumDisplayWrappers(); - - dataGridViewControl.AddComboBoxColumn( - dataPropertyName, - Resources.FailureMechanismResultView_ManualAssembly_DisplayName, - dataSource, - nameof(EnumDisplayWrapper.Value), - nameof(EnumDisplayWrapper.DisplayName)); + AddSelectableAssemblyCategoryGroupColumn(dataGridViewControl, dataPropertyName, + Resources.FailureMechanismResultView_ManualAssembly_DisplayName); } ///