Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs =================================================================== diff -u -r0764f95727a4586e2b566d1e66c989a6327f3e2b -r048ca910b1d2e3ddcd6a59eea8b6ccf2bdf63116 --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 0764f95727a4586e2b566d1e66c989a6327f3e2b) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 048ca910b1d2e3ddcd6a59eea8b6ccf2bdf63116) @@ -22,15 +22,18 @@ using System.Collections; using System.Collections.Generic; using System.Drawing; +using System.IO; using System.Linq; using System.Windows.Forms; using Core.Common.Controls.TreeView; +using Core.Common.Gui.Forms.ProgressDialog; using Core.Common.Gui.Plugin; using Ringtoets.ClosingStructures.Data; using Ringtoets.ClosingStructures.Forms.PresentationObjects; using Ringtoets.ClosingStructures.Forms.PropertyClasses; using Ringtoets.ClosingStructures.Forms.Views; using Ringtoets.ClosingStructures.IO; +using Ringtoets.ClosingStructures.Service; using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; @@ -208,9 +211,15 @@ return null; } - private static void CalculateAll(ClosingStructuresFailureMechanism failureMechanism, IEnumerable calculations) + private void CalculateAll(ClosingStructuresFailureMechanism failureMechanism, + IEnumerable calculations, + IAssessmentSection assessmentSection) { - // Add calculate logic, part of WTI-554 + ActivityProgressDialogRunner.Run(Gui.MainWindow, + calculations.Select(calc => new ClosingStructuresCalculationActivity(calc, + Path.GetDirectoryName(assessmentSection.HydraulicBoundaryDatabase.FilePath), + failureMechanism, + assessmentSection)).ToArray()); } #region TreeNodeInfo @@ -263,7 +272,7 @@ return builder.AddToggleRelevancyOfFailureMechanismItem(closingStructuresFailureMechanismContext, RemoveAllViewsForItem) .AddSeparator() .AddValidateAllCalculationsInFailureMechanismItem(closingStructuresFailureMechanismContext, - c => ValidateAll(), + c => ValidateAll(c.WrappedData.Calculations.OfType(), c.Parent), ValidateAllDataAvailableAndGetErrorMessageForCalculationsInFailureMechanism) .AddPerformAllCalculationsInFailureMechanismItem(closingStructuresFailureMechanismContext, CalculateAll, @@ -293,19 +302,22 @@ .Build(); } - private static void ValidateAll() + private static void ValidateAll(IEnumerable closingStructuresCalculations, IAssessmentSection assessmentSection) { - // Add validation service - currently a place holder + foreach (var calculation in closingStructuresCalculations) + { + new ClosingStructuresCalculationService().Validate(calculation, assessmentSection); + } } private static string ValidateAllDataAvailableAndGetErrorMessageForCalculationsInFailureMechanism(ClosingStructuresFailureMechanismContext context) { return ValidateAllDataAvailableAndGetErrorMessage(context.Parent, context.WrappedData); } - private static void CalculateAll(ClosingStructuresFailureMechanismContext context) + private void CalculateAll(ClosingStructuresFailureMechanismContext context) { - CalculateAll(context.WrappedData, context.WrappedData.Calculations.OfType()); + CalculateAll(context.WrappedData, context.WrappedData.Calculations.OfType(), context.Parent); } #endregion @@ -359,7 +371,10 @@ } builder.AddSeparator() - .AddValidateAllCalculationsInGroupItem(context, c => ValidateAll(), ValidateAllDataAvailableAndGetErrorMessage) + .AddValidateAllCalculationsInGroupItem( + context, + c => ValidateAll(c.WrappedData.GetCalculations().OfType(), c.AssessmentSection), + ValidateAllDataAvailableAndGetErrorMessage) .AddPerformAllCalculationsInGroupItem(group, context, CalculateAll, ValidateAllDataAvailableAndGetErrorMessage) .AddClearAllCalculationOutputInGroupItem(group) .AddSeparator(); @@ -383,9 +398,9 @@ return ValidateAllDataAvailableAndGetErrorMessage(context.AssessmentSection, context.FailureMechanism); } - private static void CalculateAll(CalculationGroup group, ClosingStructuresCalculationGroupContext context) + private void CalculateAll(CalculationGroup group, ClosingStructuresCalculationGroupContext context) { - CalculateAll(context.FailureMechanism, group.GetCalculations().OfType()); + CalculateAll(context.FailureMechanism, group.GetCalculations().OfType(), context.AssessmentSection); } private static void AddCalculation(ClosingStructuresCalculationGroupContext context) Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/Ringtoets.ClosingStructures.Plugin.csproj =================================================================== diff -u -rb6a9219d1e628e4430ccf880e8ea390cec04fc04 -r048ca910b1d2e3ddcd6a59eea8b6ccf2bdf63116 --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/Ringtoets.ClosingStructures.Plugin.csproj (.../Ringtoets.ClosingStructures.Plugin.csproj) (revision b6a9219d1e628e4430ccf880e8ea390cec04fc04) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/Ringtoets.ClosingStructures.Plugin.csproj (.../Ringtoets.ClosingStructures.Plugin.csproj) (revision 048ca910b1d2e3ddcd6a59eea8b6ccf2bdf63116) @@ -90,6 +90,11 @@ Ringtoets.Common.Service False + + {888d4097-8bc2-4703-9fb1-8744c94d525e} + Ringtoets.HydraRing.Calculation + False + {70f8cc9c-5bc8-4fb2-b201-eae7fa8088c2} Ringtoets.HydraRing.Data @@ -115,6 +120,10 @@ Ringtoets.ClosingStructures.IO False + + {2BDF07D4-0E81-4B9E-9618-E7EBD9399912} + Ringtoets.ClosingStructures.Service + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + De berekening voor kunstwerk sluiten '{0}' is niet gelukt. + + + Kunstwerken sluiten berekeningsverslag. Klik op details voor meer informatie. {0} + + \ No newline at end of file Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/Ringtoets.ClosingStructures.Service.csproj =================================================================== diff -u -r73597729ce18d3ee00d8036bca8341e9c12f2953 -r048ca910b1d2e3ddcd6a59eea8b6ccf2bdf63116 --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/Ringtoets.ClosingStructures.Service.csproj (.../Ringtoets.ClosingStructures.Service.csproj) (revision 73597729ce18d3ee00d8036bca8341e9c12f2953) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/Ringtoets.ClosingStructures.Service.csproj (.../Ringtoets.ClosingStructures.Service.csproj) (revision 048ca910b1d2e3ddcd6a59eea8b6ccf2bdf63116) @@ -47,6 +47,11 @@ + + True + True + Resources.resx + @@ -96,6 +101,12 @@ False + + + ResXFileCodeGenerator + Resources.Designer.cs + + - \ No newline at end of file Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/packages.config =================================================================== diff -u -rfea3ed82dfb6dfcad535eef16efcbaa9c01564ed -r048ca910b1d2e3ddcd6a59eea8b6ccf2bdf63116 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/packages.config (.../packages.config) (revision fea3ed82dfb6dfcad535eef16efcbaa9c01564ed) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/packages.config (.../packages.config) (revision 048ca910b1d2e3ddcd6a59eea8b6ccf2bdf63116) @@ -1,5 +1,4 @@ - -