Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs =================================================================== diff -u -rab9e6a1f47225304b418f5fce8a3c321e7439886 -r3575dc7abc98e41eb34414aa10fd414765f54bd6 --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision ab9e6a1f47225304b418f5fce8a3c321e7439886) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 3575dc7abc98e41eb34414aa10fd414765f54bd6) @@ -1,4 +1,4 @@ -// Copyright (C) Stichting Deltares 2017. All rights reserved. +// Copyright (C) Stichting Deltares 2018. All rights reserved. // // This file is part of Ringtoets. // @@ -418,6 +418,10 @@ return new WaveHeightCalculationsGroupProperties(context.WrappedData, calculationsPerCategoryBoundary); } }; + yield return new PropertyInfo + { + CreateInstance = context => new AssemblyResultCategoriesProperties(context.GetAssemblyCategoriesFunc(), context.WrappedData) + }; } /// @@ -603,7 +607,7 @@ yield return new ViewInfo { - GetViewName = (view, context) => Resources.AssemblyResultTotal_DisplayName, + GetViewName = (view, context) => RingtoetsCommonFormsResources.CombinedAssembly, Image = Resources.AssemblyResultTotal, CloseForData = CloseAssemblyResultTotalViewForData, CreateInstance = context => new AssemblyResultTotalView(context.WrappedData) @@ -619,7 +623,7 @@ yield return new ViewInfo { - GetViewName = (view, context) => RingtoetsCommonFormsResources.FailureMechanismAssemblyCategories_DisplayName, + GetViewName = (view, context) => RingtoetsCommonFormsResources.AssemblyCategories_DisplayName, Image = RingtoetsCommonFormsResources.NormsIcon, CloseForData = RingtoetsPluginHelper.ShouldCloseForFailureMechanismView, CreateInstance = context => new FailureMechanismAssemblyCategoriesView(context.WrappedData, @@ -630,13 +634,21 @@ yield return new ViewInfo { - GetViewName = (view, context) => RingtoetsCommonFormsResources.FailureMechanismAssemblyCategories_DisplayName, + GetViewName = (view, context) => RingtoetsCommonFormsResources.AssemblyCategories_DisplayName, Image = RingtoetsCommonFormsResources.NormsIcon, CloseForData = RingtoetsPluginHelper.ShouldCloseForFailureMechanismView, CreateInstance = context => new MacroStabilityOutwardsAssemblyCategoriesView((MacroStabilityOutwardsFailureMechanism) context.WrappedData, context.AssessmentSection, context.GetFailureMechanismSectionAssemblyCategoriesFunc) }; + yield return new ViewInfo + { + GetViewName = (view, context) => RingtoetsCommonFormsResources.AssemblyCategories_DisplayName, + Image = RingtoetsCommonFormsResources.NormsIcon, + CloseForData = CloseAssemblyResultCategoriesViewForData, + CreateInstance = context => new AssemblyResultCategoriesView(context.WrappedData, + context.GetAssemblyCategoriesFunc) + }; } public override IEnumerable GetImportInfos() @@ -708,11 +720,11 @@ yield return new ExportInfo { - Name = Resources.AssemblyResult_DisplayName, + Name = RingtoetsCommonFormsResources.AssemblyResult, CreateFileExporter = (context, filePath) => new AssemblyExporter(context.WrappedData, filePath), IsEnabled = context => context.WrappedData.ReferenceLine != null, FileFilterGenerator = new FileFilterGenerator(Resources.AssemblyResult_file_filter_Extension, - Resources.AssemblyResult_file_filter_Description) + RingtoetsCommonFormsResources.AssemblyResult) }; } @@ -1067,7 +1079,7 @@ yield return new TreeNodeInfo { - Text = context => Resources.AssemblyResultTotal_DisplayName, + Text = context => RingtoetsCommonFormsResources.CombinedAssembly, Image = context => Resources.AssemblyResultTotal, ContextMenuStrip = (nodeData, parentData, treeViewControl) => Gui.Get(nodeData, treeViewControl) .AddOpenItem() @@ -1085,7 +1097,7 @@ yield return new TreeNodeInfo { - Text = context => RingtoetsCommonFormsResources.FailureMechanismAssemblyCategories_DisplayName, + Text = context => RingtoetsCommonFormsResources.AssemblyCategories_DisplayName, Image = context => RingtoetsCommonFormsResources.NormsIcon, ContextMenuStrip = (nodeData, parentData, treeViewControl) => Gui.Get(nodeData, treeViewControl) .AddOpenItem() @@ -1096,7 +1108,7 @@ yield return new TreeNodeInfo { - Text = context => RingtoetsCommonFormsResources.FailureMechanismAssemblyCategories_DisplayName, + Text = context => RingtoetsCommonFormsResources.AssemblyCategories_DisplayName, Image = context => RingtoetsCommonFormsResources.NormsIcon, ContextMenuStrip = (nodeData, parentData, treeViewControl) => Gui.Get(nodeData, treeViewControl) .AddOpenItem() @@ -1117,6 +1129,17 @@ .AddExpandAllItem() .Build() }; + + yield return new TreeNodeInfo + { + Text = context => RingtoetsCommonFormsResources.AssemblyCategories_DisplayName, + Image = context => RingtoetsCommonFormsResources.NormsIcon, + ContextMenuStrip = (nodeData, parentData, treeViewControl) => Gui.Get(nodeData, treeViewControl) + .AddOpenItem() + .AddSeparator() + .AddPropertiesItem() + .Build() + }; } private static ViewInfo, IObservableEnumerable, TView> CreateFailureMechanismResultViewInfo< @@ -1396,8 +1419,18 @@ #endregion + #region AssemblyResultCategoriesContext ViewInfo + + private bool CloseAssemblyResultCategoriesViewForData(AssemblyResultCategoriesView view, object o) + { + var assessmentSection = o as AssessmentSection; + return assessmentSection != null && assessmentSection == view.AssessmentSection; + } + #endregion + #endregion + #region TreeNodeInfos #region FailureMechanismSectionsContext TreeNodeInfo @@ -2335,6 +2368,7 @@ AssessmentSection assessmentSection = context.WrappedData; return new object[] { + new AssemblyResultCategoriesContext(assessmentSection), new AssemblyResultTotalContext(assessmentSection), new AssemblyResultPerSectionContext(assessmentSection) };