Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PipingSurfaceLineSelectionDialog.cs =================================================================== diff -u -rbff183a6d323111affe69f3afa19b9ada02c9375 -re473fe41d29060803b0d8f560a48ec8b9618bea4 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PipingSurfaceLineSelectionDialog.cs (.../PipingSurfaceLineSelectionDialog.cs) (revision bff183a6d323111affe69f3afa19b9ada02c9375) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PipingSurfaceLineSelectionDialog.cs (.../PipingSurfaceLineSelectionDialog.cs) (revision e473fe41d29060803b0d8f560a48ec8b9618bea4) @@ -8,10 +8,19 @@ namespace Ringtoets.Piping.Forms { + /// + /// A dialog which allows the user to make a selection form a given set of . Upon + /// closing of the dialog, the selected can be obtained. + /// public partial class PipingSurfaceLineSelectionDialog : DialogBase { + /// + /// Creates a new instance of . + /// + /// The parent of the dialog. + /// The collection of to show in the dialog. public PipingSurfaceLineSelectionDialog(IWin32Window dialogParent, IEnumerable surfaceLines) - : base(dialogParent, Resources.GeneratePipingCalculationsIcon, 300, 600) + : base(dialogParent, Resources.GeneratePipingCalculationsIcon, 300, 400) { InitializeComponent(); @@ -20,17 +29,23 @@ Dock = DockStyle.Fill }; Controls.Add(PipingSurfaceLineSelectionView); + SelectedSurfaceLines = new List(); } - private PipingSurfaceLineSelectionView PipingSurfaceLineSelectionView { get; set; } + /// + /// Gets a collection of selected if they were selected + /// in the dialog and a confirmation was given. If no confirmation was given or no + /// was selected, then an empty collection is returned. + /// + public IEnumerable SelectedSurfaceLines { get; private set; } - public IEnumerable SelectedSurfaceLines { get; set; } - protected override Button GetCancelButton() { return CancelButton; } + private PipingSurfaceLineSelectionView PipingSurfaceLineSelectionView { get; set; } + private void OkButtonOnClick(object sender, EventArgs e) { SelectedSurfaceLines = PipingSurfaceLineSelectionView.GetSelectedSurfaceLines(); @@ -39,7 +54,6 @@ private void CancelButtonOnClick(object sender, EventArgs eventArgs) { - SelectedSurfaceLines = new List(); Close(); } }