Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs =================================================================== diff -u -r254f70f60d07ff9d8778b270f80a4910cb71c053 -rd582180db4f7e3bafb689cb22ead5ef10e8e8235 --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 254f70f60d07ff9d8778b270f80a4910cb71c053) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision d582180db4f7e3bafb689cb22ead5ef10e8e8235) @@ -281,7 +281,7 @@ }; yield return new PropertyInfo(); yield return new PropertyInfo(); - yield return new PropertyInfo(); + yield return new PropertyInfo>(); } /// Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs =================================================================== diff -u -r254f70f60d07ff9d8778b270f80a4910cb71c053 -rd582180db4f7e3bafb689cb22ead5ef10e8e8235 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision 254f70f60d07ff9d8778b270f80a4910cb71c053) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision d582180db4f7e3bafb689cb22ead5ef10e8e8235) @@ -277,7 +277,7 @@ PropertyInfo waveConditionsInputProperites = PluginTestHelper.AssertPropertyInfoDefined< WaveConditionsInputContext, - WaveConditionsInputContextProperties>(propertyInfos); + WaveConditionsInputContextProperties>(propertyInfos); Assert.IsNull(waveConditionsInputProperites.AdditionalDataCheck); Assert.IsNull(waveConditionsInputProperites.GetObjectPropertiesData); Assert.IsNull(waveConditionsInputProperites.AfterCreate); Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PresentationObjects/IWaveConditionsInputContext.cs =================================================================== diff -u --- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PresentationObjects/IWaveConditionsInputContext.cs (revision 0) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PresentationObjects/IWaveConditionsInputContext.cs (revision d582180db4f7e3bafb689cb22ead5ef10e8e8235) @@ -0,0 +1,43 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Collections.Generic; +using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.HydraRing.Data; + +namespace Ringtoets.Revetment.Forms.PresentationObjects +{ + /// + /// Interface for defining a wave conditions input context. + /// + public interface IWaveConditionsInputContext + { + /// + /// Gets the hydraulic boundary locations. + /// + IEnumerable HydraulicBoundaryLocations { get; } + + /// + /// Gets the foreshore profiles. + /// + IEnumerable ForeshoreProfiles { get; } + } +} \ No newline at end of file Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PresentationObjects/WaveConditionsInputContext.cs =================================================================== diff -u -rbfe0c885c674d20d6ed6fbfb95e9cdc484b4788c -rd582180db4f7e3bafb689cb22ead5ef10e8e8235 --- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PresentationObjects/WaveConditionsInputContext.cs (.../WaveConditionsInputContext.cs) (revision bfe0c885c674d20d6ed6fbfb95e9cdc484b4788c) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PresentationObjects/WaveConditionsInputContext.cs (.../WaveConditionsInputContext.cs) (revision d582180db4f7e3bafb689cb22ead5ef10e8e8235) @@ -33,7 +33,7 @@ /// /// Presentation object for the . /// - public class WaveConditionsInputContext : ObservableWrappedObjectContextBase + public class WaveConditionsInputContext : ObservableWrappedObjectContextBase, IWaveConditionsInputContext { private readonly IAssessmentSection assessmentSection; @@ -62,9 +62,6 @@ this.assessmentSection = assessmentSection; } - /// - /// Gets the hydraulic boundary locations. - /// public IEnumerable HydraulicBoundaryLocations { get @@ -75,9 +72,6 @@ } } - /// - /// Gets the foreshore profiles. - /// public IEnumerable ForeshoreProfiles { get; private set; } } } \ No newline at end of file Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs =================================================================== diff -u -r50fc099174271a6f72ed94a8f024cd5377b37a53 -rd582180db4f7e3bafb689cb22ead5ef10e8e8235 --- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs (.../WaveConditionsInputContextProperties.cs) (revision 50fc099174271a6f72ed94a8f024cd5377b37a53) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs (.../WaveConditionsInputContextProperties.cs) (revision d582180db4f7e3bafb689cb22ead5ef10e8e8235) @@ -25,6 +25,7 @@ using System.Linq; using Core.Common.Base.Data; using Core.Common.Base.Geometry; +using Core.Common.Controls.PresentationObjects; using Core.Common.Gui.Attributes; using Core.Common.Gui.Converters; using Core.Common.Gui.PropertyBag; @@ -43,7 +44,8 @@ /// /// ViewModel of for properties panel. /// - public class WaveConditionsInputContextProperties : ObjectProperties + public class WaveConditionsInputContextProperties : ObjectProperties where T : WrappedObjectContextBase, + IWaveConditionsInputContext { private const int hydraulicBoundaryLocationPropertyIndex = 0; private const int assessmentLevelPropertyIndex = 1; @@ -67,7 +69,7 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "HydraulicBoundaryLocation_DisplayName")] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "HydraulicBoundaryLocation_Description")] - public HydraulicBoundaryLocation HydraulicBoundaryLocation + public virtual HydraulicBoundaryLocation HydraulicBoundaryLocation { get { @@ -84,7 +86,7 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "AssessmentLevel_DisplayName")] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "AssessmentLevel_Description")] - public RoundedDouble AssessmentLevel + public virtual RoundedDouble AssessmentLevel { get { @@ -96,7 +98,7 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")] [ResourcesDisplayName(typeof(Resources), "WaveConditionsInput_UpperBoundaryDesignWaterLevel_DisplayName")] [ResourcesDescription(typeof(Resources), "WaveConditionsInput_UpperBoundaryDesignWaterLevel_Description")] - public RoundedDouble UpperBoundaryDesignWaterLevel + public virtual RoundedDouble UpperBoundaryDesignWaterLevel { get { @@ -108,7 +110,7 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")] [ResourcesDisplayName(typeof(Resources), "WaveConditionsInput_UpperBoundaryRevetment_DisplayName")] [ResourcesDescription(typeof(Resources), "WaveConditionsInput_UpperBoundaryRevetment_Description")] - public RoundedDouble UpperBoundaryRevetment + public virtual RoundedDouble UpperBoundaryRevetment { get { @@ -125,7 +127,7 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")] [ResourcesDisplayName(typeof(Resources), "WaveConditionsInput_LowerBoundaryRevetment_DisplayName")] [ResourcesDescription(typeof(Resources), "WaveConditionsInput_LowerBoundaryRevetment_Description")] - public RoundedDouble LowerBoundaryRevetment + public virtual RoundedDouble LowerBoundaryRevetment { get { @@ -142,7 +144,7 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")] [ResourcesDisplayName(typeof(Resources), "WaveConditionsInput_UpperBoundaryWaterLevels_DisplayName")] [ResourcesDescription(typeof(Resources), "WaveConditionsInput_UpperBoundaryWaterLevels_Description")] - public RoundedDouble UpperBoundaryWaterLevels + public virtual RoundedDouble UpperBoundaryWaterLevels { get { @@ -159,7 +161,7 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")] [ResourcesDisplayName(typeof(Resources), "WaveConditionsInput_LowerBoundaryWaterLevels_DisplayName")] [ResourcesDescription(typeof(Resources), "WaveConditionsInput_LowerBoundaryWaterLevels_Description")] - public RoundedDouble LowerBoundaryWaterLevels + public virtual RoundedDouble LowerBoundaryWaterLevels { get { @@ -177,7 +179,7 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")] [ResourcesDisplayName(typeof(Resources), "WaveConditionsInput_StepSize_DisplayName")] [ResourcesDescription(typeof(Resources), "WaveConditionsInput_StepSize_Description")] - public WaveConditionsInputStepSize StepSize + public virtual WaveConditionsInputStepSize StepSize { get { @@ -195,7 +197,7 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")] [ResourcesDisplayName(typeof(Resources), "WaveConditionsInput_WaterLevels_DisplayName")] [ResourcesDescription(typeof(Resources), "WaveConditionsInput_WaterLevels_Description")] - public RoundedDouble[] WaterLevels + public virtual RoundedDouble[] WaterLevels { get { @@ -208,7 +210,7 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] [ResourcesDisplayName(typeof(Resources), "ForeshoreProfile_DisplayName")] [ResourcesDescription(typeof(Resources), "ForeshoreProfile_Description")] - public ForeshoreProfile ForeshoreProfile + public virtual ForeshoreProfile ForeshoreProfile { get { @@ -225,7 +227,7 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "WorldReferencePoint_DisplayName")] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "WorldReferencePoint_ForeshoreProfile_Description")] - public Point2D WorldReferencePoint + public virtual Point2D WorldReferencePoint { get { @@ -240,7 +242,7 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "Orientation_DisplayName")] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "Orientation_ForeshoreProfile_Description")] - public RoundedDouble Orientation + public virtual RoundedDouble Orientation { get { @@ -258,7 +260,7 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "BreakWaterProperties_DisplayName")] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "BreakWaterProperties_Description")] - public WaveConditionsInputBreakWaterProperties BreakWater + public virtual WaveConditionsInputBreakWaterProperties BreakWater { get { @@ -274,7 +276,7 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "ForeshoreProperties_DisplayName")] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "ForeshoreProperties_Description")] - public WaveConditionsInputForeshoreProfileProperties ForeshoreGeometry + public virtual WaveConditionsInputForeshoreProfileProperties ForeshoreGeometry { get { @@ -290,20 +292,20 @@ [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] [ResourcesDisplayName(typeof(Resources), "WaveConditionsInput_RevetmentType_DisplayName")] [ResourcesDescription(typeof(Resources), "WaveConditionsInput_RevetmentType_Description")] - public WaveConditionsRevetment RevetmentType + public virtual WaveConditionsRevetment RevetmentType { get { return data.WrappedData.RevetmentType; } } - public IEnumerable GetAvailableHydraulicBoundaryLocations() + public virtual IEnumerable GetAvailableHydraulicBoundaryLocations() { return data.HydraulicBoundaryLocations; } - public IEnumerable GetAvailableForeshoreProfiles() + public virtual IEnumerable GetAvailableForeshoreProfiles() { return data.ForeshoreProfiles; } Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Ringtoets.Revetment.Forms.csproj =================================================================== diff -u -rf4590e94b14a89d075cdf5e1746823dd9eeaa847 -rd582180db4f7e3bafb689cb22ead5ef10e8e8235 --- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Ringtoets.Revetment.Forms.csproj (.../Ringtoets.Revetment.Forms.csproj) (revision f4590e94b14a89d075cdf5e1746823dd9eeaa847) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Ringtoets.Revetment.Forms.csproj (.../Ringtoets.Revetment.Forms.csproj) (revision d582180db4f7e3bafb689cb22ead5ef10e8e8235) @@ -40,6 +40,7 @@ Properties\GlobalAssembly.cs + Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/UITypeEditors/WaveConditionsInputContextForeshoreProfileEditor.cs =================================================================== diff -u -rf3e0a05168328097121cfa8f9c4ff32d775879ff -rd582180db4f7e3bafb689cb22ead5ef10e8e8235 --- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/UITypeEditors/WaveConditionsInputContextForeshoreProfileEditor.cs (.../WaveConditionsInputContextForeshoreProfileEditor.cs) (revision f3e0a05168328097121cfa8f9c4ff32d775879ff) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/UITypeEditors/WaveConditionsInputContextForeshoreProfileEditor.cs (.../WaveConditionsInputContextForeshoreProfileEditor.cs) (revision d582180db4f7e3bafb689cb22ead5ef10e8e8235) @@ -26,6 +26,7 @@ using Core.Common.Utils.Reflection; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Forms.UITypeEditors; +using Ringtoets.Revetment.Forms.PresentationObjects; using Ringtoets.Revetment.Forms.PropertyClasses; using CoreCommonControlsResources = Core.Common.Controls.Properties.Resources; @@ -36,7 +37,7 @@ /// from a collection. /// public class WaveConditionsInputContextForeshoreProfileEditor : - SelectionEditor + SelectionEditor, ForeshoreProfile> { /// /// Creates a new instance of . Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/UITypeEditors/WaveConditionsInputContextHydraulicBoundaryLocationEditor.cs =================================================================== diff -u -rf3e0a05168328097121cfa8f9c4ff32d775879ff -rd582180db4f7e3bafb689cb22ead5ef10e8e8235 --- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/UITypeEditors/WaveConditionsInputContextHydraulicBoundaryLocationEditor.cs (.../WaveConditionsInputContextHydraulicBoundaryLocationEditor.cs) (revision f3e0a05168328097121cfa8f9c4ff32d775879ff) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/UITypeEditors/WaveConditionsInputContextHydraulicBoundaryLocationEditor.cs (.../WaveConditionsInputContextHydraulicBoundaryLocationEditor.cs) (revision d582180db4f7e3bafb689cb22ead5ef10e8e8235) @@ -24,6 +24,7 @@ using Core.Common.Utils.Reflection; using Ringtoets.Common.Forms.UITypeEditors; using Ringtoets.HydraRing.Data; +using Ringtoets.Revetment.Forms.PresentationObjects; using Ringtoets.Revetment.Forms.PropertyClasses; namespace Ringtoets.Revetment.Forms.UITypeEditors @@ -33,7 +34,7 @@ /// from a collection. /// public class WaveConditionsInputContextHydraulicBoundaryLocationEditor : - SelectionEditor + SelectionEditor, HydraulicBoundaryLocation> { /// /// Creates a new instance of . Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs =================================================================== diff -u -rfae43a9590e1fd964bd37cdcdf62b4d7f8a00b15 -rd582180db4f7e3bafb689cb22ead5ef10e8e8235 --- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs (.../WaveConditionsInputContextPropertiesTest.cs) (revision fae43a9590e1fd964bd37cdcdf62b4d7f8a00b15) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs (.../WaveConditionsInputContextPropertiesTest.cs) (revision d582180db4f7e3bafb689cb22ead5ef10e8e8235) @@ -72,7 +72,7 @@ public void Constructor_ExpectedValues() { // Call - var properties = new WaveConditionsInputContextProperties(); + var properties = new WaveConditionsInputContextProperties(); // Assert Assert.IsInstanceOf>(properties); @@ -90,7 +90,7 @@ var inputContext = new WaveConditionsInputContext(input, new ForeshoreProfile[0], assessmentSectionMock); // Call - var properties = new WaveConditionsInputContextProperties + var properties = new WaveConditionsInputContextProperties { Data = inputContext }; @@ -171,7 +171,7 @@ }, assessmentSectionMock); // Call - var properties = new WaveConditionsInputContextProperties + var properties = new WaveConditionsInputContextProperties { Data = inputContext }; @@ -226,7 +226,7 @@ new BreakWater(BreakWaterType.Dam, (RoundedDouble)random.NextDouble()), new ForeshoreProfile.ConstructionProperties()); - var properties = new WaveConditionsInputContextProperties + var properties = new WaveConditionsInputContextProperties { Data = inputContext }; @@ -285,7 +285,7 @@ }, assessmentSectionMock); // Call - var properties = new WaveConditionsInputContextProperties + var properties = new WaveConditionsInputContextProperties { Data = inputContext }; Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/UITypeEditors/WaveConditionsInputContextForeshoreProfileEditorTest.cs =================================================================== diff -u -r50fc099174271a6f72ed94a8f024cd5377b37a53 -rd582180db4f7e3bafb689cb22ead5ef10e8e8235 --- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/UITypeEditors/WaveConditionsInputContextForeshoreProfileEditorTest.cs (.../WaveConditionsInputContextForeshoreProfileEditorTest.cs) (revision 50fc099174271a6f72ed94a8f024cd5377b37a53) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/UITypeEditors/WaveConditionsInputContextForeshoreProfileEditorTest.cs (.../WaveConditionsInputContextForeshoreProfileEditorTest.cs) (revision d582180db4f7e3bafb689cb22ead5ef10e8e8235) @@ -63,7 +63,7 @@ foreshoreProfiles, assessmentSectionMock); - var properties = new WaveConditionsInputContextProperties + var properties = new WaveConditionsInputContextProperties { Data = inputContext }; @@ -106,7 +106,7 @@ new[] { foreshoreProfile }, assessmentSectionMock); - var properties = new WaveConditionsInputContextProperties + var properties = new WaveConditionsInputContextProperties { Data = inputContext }; Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/UITypeEditors/WaveConditionsInputContextHydraulicBoundaryLocationEditorTest.cs =================================================================== diff -u -r50fc099174271a6f72ed94a8f024cd5377b37a53 -rd582180db4f7e3bafb689cb22ead5ef10e8e8235 --- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/UITypeEditors/WaveConditionsInputContextHydraulicBoundaryLocationEditorTest.cs (.../WaveConditionsInputContextHydraulicBoundaryLocationEditorTest.cs) (revision 50fc099174271a6f72ed94a8f024cd5377b37a53) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/UITypeEditors/WaveConditionsInputContextHydraulicBoundaryLocationEditorTest.cs (.../WaveConditionsInputContextHydraulicBoundaryLocationEditorTest.cs) (revision d582180db4f7e3bafb689cb22ead5ef10e8e8235) @@ -63,7 +63,7 @@ new ForeshoreProfile[0], assessmentSectionMock); - var properties = new WaveConditionsInputContextProperties + var properties = new WaveConditionsInputContextProperties { Data = inputContext }; @@ -110,7 +110,7 @@ new ForeshoreProfile[0], assessmentSectionMock); - var properties = new WaveConditionsInputContextProperties + var properties = new WaveConditionsInputContextProperties { Data = inputContext };