Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/FaultTreeIllustrationPointChildProperty.cs =================================================================== diff -u -r83c091ef77a14dc5b4116c628876f49243544aba -rb4d70f02478eef8064cdfb381f99fc2b14e69343 --- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/FaultTreeIllustrationPointChildProperty.cs (.../FaultTreeIllustrationPointChildProperty.cs) (revision 83c091ef77a14dc5b4116c628876f49243544aba) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/FaultTreeIllustrationPointChildProperty.cs (.../FaultTreeIllustrationPointChildProperty.cs) (revision b4d70f02478eef8064cdfb381f99fc2b14e69343) @@ -22,15 +22,11 @@ using System; using System.ComponentModel; using System.Linq; -using Core.Common.Base.Data; using Core.Common.Gui.Attributes; using Core.Common.Gui.Converters; -using Core.Common.Gui.PropertyBag; -using Core.Common.Utils; using Core.Common.Utils.Attributes; using Ringtoets.Common.Data.IllustrationPoints; using Ringtoets.Common.Forms.Properties; -using Ringtoets.Common.Forms.TypeConverters; namespace Ringtoets.Common.Forms.PropertyClasses { @@ -55,32 +51,34 @@ } } - [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_IllustrationPoints))] - [ResourcesDisplayName(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_AlphaValues_DisplayName))] - [ResourcesDescription(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_AlphaValues_Description))] - [TypeConverter(typeof(KeyValueExpandableArrayConverter))] - [KeyValueElement(nameof(Stochast.Name), nameof(Stochast.Alpha))] - public Stochast[] AlphaValues - { - get - { - return ((FaultTreeIllustrationPoint) data.Data).Stochasts.ToArray(); - } - } - - [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_IllustrationPoints))] - [ResourcesDisplayName(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Durations_DisplayName))] - [ResourcesDescription(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Durations_Description))] - [TypeConverter(typeof(KeyValueExpandableArrayConverter))] - [KeyValueElement(nameof(Stochast.Name), nameof(Stochast.Duration))] - public Stochast[] Durations - { - get - { - return ((FaultTreeIllustrationPoint)data.Data).Stochasts.ToArray(); - } - } + [PropertyOrder(4)] + [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_IllustrationPoints))] + [ResourcesDisplayName(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_AlphaValues_DisplayName))] + [ResourcesDescription(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_AlphaValues_Description))] + [TypeConverter(typeof(KeyValueExpandableArrayConverter))] + [KeyValueElement(nameof(Stochast.Name), nameof(Stochast.Alpha))] + public Stochast[] AlphaValues + { + get + { + return ((FaultTreeIllustrationPoint) data.Data).Stochasts.ToArray(); + } + } + [PropertyOrder(5)] + [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_IllustrationPoints))] + [ResourcesDisplayName(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Durations_DisplayName))] + [ResourcesDescription(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Durations_Description))] + [TypeConverter(typeof(KeyValueExpandableArrayConverter))] + [KeyValueElement(nameof(Stochast.Name), nameof(Stochast.Duration))] + public Stochast[] Durations + { + get + { + return ((FaultTreeIllustrationPoint) data.Data).Stochasts.ToArray(); + } + } + public override string ToString() { return $"{Name}"; Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/IllustrationPointChildProperty.cs =================================================================== diff -u -r83c091ef77a14dc5b4116c628876f49243544aba -rb4d70f02478eef8064cdfb381f99fc2b14e69343 --- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/IllustrationPointChildProperty.cs (.../IllustrationPointChildProperty.cs) (revision 83c091ef77a14dc5b4116c628876f49243544aba) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/IllustrationPointChildProperty.cs (.../IllustrationPointChildProperty.cs) (revision b4d70f02478eef8064cdfb381f99fc2b14e69343) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.Collections.Generic; using System.ComponentModel; using System.Linq; using Core.Common.Base.Data; @@ -57,6 +58,7 @@ } [ReadOnly(true)] + [PropertyOrder(0)] [TypeConverter(typeof(NoProbabilityValueDoubleConverter))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.CalculationOutput_CalculatedProbability_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.CalculationOutput_CalculatedProbability_Description))] @@ -69,6 +71,7 @@ } [ReadOnly(true)] + [PropertyOrder(1)] [TypeConverter(typeof(NoValueRoundedDoubleConverter))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.CalculationOutput_CalculatedReliability_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.CalculationOutput_CalculatedReliability_Description))] @@ -81,11 +84,13 @@ } [ReadOnly(true)] + [PropertyOrder(2)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.IllustrationPoint_WindDirection_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.IllustrationPoint_WindDirection_Description))] public string WindDirection { get; } [ReadOnly(true)] + [PropertyOrder(3)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.IllustrationPoint_ClosingSituation_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.IllustrationPoint_ClosingSituation_Description))] public string Name @@ -98,6 +103,7 @@ [ReadOnly(true)] [DynamicVisible] + [PropertyOrder(6)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.IllustrationPointProperty_IllustrationPoints_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.IllustrationPointProperty_IllustrationPoints_Description))] [TypeConverter(typeof(ExpandableArrayConverter))] @@ -106,7 +112,29 @@ { get { - return data.Children.Select(point => new IllustrationPointChildProperty(point, WindDirection)).ToArray(); + var points = new List(); + foreach (IllustrationPointNode illustrationPointNode in data.Children) + { + var faultTree = illustrationPointNode.Data as FaultTreeIllustrationPoint; + if (faultTree != null) + { + points.Add(new FaultTreeIllustrationPointChildProperty(illustrationPointNode, WindDirection)); + continue; + } + + var subMechanism = illustrationPointNode.Data as SubMechanismIllustrationPoint; + if (subMechanism != null) + { + points.Add(new SubMechanismIllustrationPointChildProperty(illustrationPointNode, WindDirection)); + continue; + } + + // If type is not supported, throw exception (currently not possible, safeguard for future) + throw new NotSupportedException("IllustrationPointNode is not of a supported type (FaultTree/SubMechanism)"); + + + } + return points.ToArray(); } } Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/SubMechanismIllustrationPointChildProperty.cs =================================================================== diff -u -r83c091ef77a14dc5b4116c628876f49243544aba -rb4d70f02478eef8064cdfb381f99fc2b14e69343 --- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/SubMechanismIllustrationPointChildProperty.cs (.../SubMechanismIllustrationPointChildProperty.cs) (revision 83c091ef77a14dc5b4116c628876f49243544aba) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/SubMechanismIllustrationPointChildProperty.cs (.../SubMechanismIllustrationPointChildProperty.cs) (revision b4d70f02478eef8064cdfb381f99fc2b14e69343) @@ -22,6 +22,7 @@ using System; using System.ComponentModel; using System.Linq; +using Core.Common.Gui.Attributes; using Core.Common.Gui.Converters; using Core.Common.Utils.Attributes; using Ringtoets.Common.Data.IllustrationPoints; @@ -50,6 +51,7 @@ } } + [PropertyOrder(4)] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_IllustrationPoints))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.IllustrationPoint_Realization_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.IllustrationPoint_Realization_Description))]