Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssemblyResultTotalView.cs =================================================================== diff -u -re6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647 -r0a1e00c14da142df178d43f87af86906f170842b --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssemblyResultTotalView.cs (.../AssemblyResultTotalView.cs) (revision e6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssemblyResultTotalView.cs (.../AssemblyResultTotalView.cs) (revision 0a1e00c14da142df178d43f87af86906f170842b) @@ -22,6 +22,7 @@ using System; using System.Collections.Generic; using System.Windows.Forms; +using Core.Common.Base; using Core.Common.Controls.DataGrid; using Core.Common.Controls.Views; using Core.Common.Util.Extensions; @@ -35,6 +36,7 @@ using Ringtoets.Integration.Data.Assembly; using Ringtoets.Integration.Data.StandAlone; using Ringtoets.Integration.Data.StandAlone.AssemblyFactories; +using Ringtoets.Integration.Forms.Observers; using Ringtoets.Integration.Forms.Properties; using Ringtoets.MacroStabilityInwards.Data; using Ringtoets.Piping.Data; @@ -52,6 +54,7 @@ public partial class AssemblyResultTotalView : UserControl, IView { private IEnumerable assemblyResultRows; + private readonly Observer assessmentSectionResultObserver; /// /// Creates a new instance of . @@ -69,8 +72,21 @@ AssessmentSection = assessmentSection; InitializeComponent(); + + assessmentSectionResultObserver = new Observer(EnableRefreshButton) + { + Observable = new AssessmentSectionResultObserver(assessmentSection) + }; } + private void EnableRefreshButton() + { + if (!RefreshAssemblyResultsButton.Enabled) + { + RefreshAssemblyResultsButton.Enabled = true; + } + } + /// /// Gets the the view belongs to. /// @@ -95,6 +111,7 @@ if (disposing) { components?.Dispose(); + assessmentSectionResultObserver.Dispose(); } base.Dispose(disposing); @@ -154,6 +171,7 @@ private void RefreshAssemblyResults_Click(object sender, EventArgs e) { + RefreshAssemblyResultsButton.Enabled = false; assemblyResultRows.ForEachElementDo(row => row.Update()); dataGridViewControl.RefreshDataGridView(); UpdateAssemblyResultControls();