Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/WaveImpactAsphaltCoverCalculationsProperties.cs
===================================================================
diff -u -red035f7112a65b03cedb3280a043f5d0400c1b86 -r6be63037d71c6270dc24c31ca132f9bc612e4519
--- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/WaveImpactAsphaltCoverCalculationsProperties.cs (.../WaveImpactAsphaltCoverCalculationsProperties.cs) (revision ed035f7112a65b03cedb3280a043f5d0400c1b86)
+++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/WaveImpactAsphaltCoverCalculationsProperties.cs (.../WaveImpactAsphaltCoverCalculationsProperties.cs) (revision 6be63037d71c6270dc24c31ca132f9bc612e4519)
@@ -23,7 +23,6 @@
using Core.Common.Base.Data;
using Core.Common.Util.Attributes;
using Core.Gui.Attributes;
-using Core.Gui.PropertyBag;
using Riskeer.WaveImpactAsphaltCover.Data;
using RiskeerCommonFormsResources = Riskeer.Common.Forms.Properties.Resources;
using RiskeerRevetmentFormsResources = Riskeer.Revetment.Forms.Properties.Resources;
@@ -33,7 +32,7 @@
///
/// Calculation related ViewModel of for properties panel.
///
- public class WaveImpactAsphaltCoverCalculationsProperties : ObjectProperties
+ public class WaveImpactAsphaltCoverCalculationsProperties : WaveImpactAsphaltCoverFailureMechanismProperties
{
private const int namePropertyIndex = 1;
private const int codePropertyIndex = 2;
@@ -48,56 +47,13 @@
/// The instance to show the properties of.
/// Thrown when
/// is null.
- public WaveImpactAsphaltCoverCalculationsProperties(WaveImpactAsphaltCoverFailureMechanism data)
+ public WaveImpactAsphaltCoverCalculationsProperties(WaveImpactAsphaltCoverFailureMechanism data) : base(data, new ConstructionProperties()
{
- if (data == null)
- {
- throw new ArgumentNullException(nameof(data));
- }
+ NamePropertyIndex = namePropertyIndex,
+ CodePropertyIndex = codePropertyIndex,
+ GroupPropertyIndex = groupPropertyIndex
+ }) {}
- Data = data;
- }
-
- #region General
-
- [PropertyOrder(namePropertyIndex)]
- [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_General))]
- [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_Name_DisplayName))]
- [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_Name_Description))]
- public string Name
- {
- get
- {
- return data.Name;
- }
- }
-
- [PropertyOrder(codePropertyIndex)]
- [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_General))]
- [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_Code_DisplayName))]
- [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_Code_Description))]
- public string Code
- {
- get
- {
- return data.Code;
- }
- }
-
- [PropertyOrder(groupPropertyIndex)]
- [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_General))]
- [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_Group_DisplayName))]
- [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_Group_Description))]
- public int Group
- {
- get
- {
- return data.Group;
- }
- }
-
- #endregion
-
#region Model settings
[PropertyOrder(aPropertyIndex)]
Fisheye: Tag 7502d6e9482a2489bf1b44680d8940adfe06a796 refers to a dead (removed) revision in file `Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/WaveImpactAsphaltCoverFailureMechanismProperties.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/WaveImpactAsphaltCoverFailurePathProperties.cs
===================================================================
diff -u
--- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/WaveImpactAsphaltCoverFailurePathProperties.cs (revision 0)
+++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/WaveImpactAsphaltCoverFailurePathProperties.cs (revision 6be63037d71c6270dc24c31ca132f9bc612e4519)
@@ -0,0 +1,123 @@
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of Riskeer.
+//
+// Riskeer 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;
+using Core.Common.Base.Data;
+using Core.Common.Util.Attributes;
+using Core.Gui.Attributes;
+using Riskeer.Common.Data.AssessmentSection;
+using Riskeer.WaveImpactAsphaltCover.Data;
+using Riskeer.WaveImpactAsphaltCover.Forms.Properties;
+using RiskeerCommonFormsResources = Riskeer.Common.Forms.Properties.Resources;
+using RiskeerRevetmentFormsResources = Riskeer.Revetment.Forms.Properties.Resources;
+
+namespace Riskeer.WaveImpactAsphaltCover.Forms.PropertyClasses
+{
+ public class WaveImpactAsphaltCoverFailurePathProperties : WaveImpactAsphaltCoverFailureMechanismProperties
+ {
+ private const int namePropertyIndex = 1;
+ private const int codePropertyIndex = 2;
+ private const int groupPropertyIndex = 3;
+ private const int contributionPropertyIndex = 4;
+ private const int sectionLengthPropertyIndex = 5;
+ private const int deltaLPropertyIndex = 6;
+ private const int nPropertyIndex = 7;
+ private readonly IAssessmentSection assessmentSection;
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The instance to show the properties of.
+ ///
+ /// Thrown when
+ /// is null.
+ public WaveImpactAsphaltCoverFailurePathProperties(WaveImpactAsphaltCoverFailureMechanism data, IAssessmentSection assessmentSection) : base(data, new ConstructionProperties
+ {
+ NamePropertyIndex = namePropertyIndex,
+ CodePropertyIndex = codePropertyIndex,
+ GroupPropertyIndex = groupPropertyIndex
+ })
+ {
+ this.assessmentSection = assessmentSection;
+ }
+
+ #region General
+
+ [PropertyOrder(contributionPropertyIndex)]
+ [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_General))]
+ [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_Contribution_DisplayName))]
+ [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_Contribution_Description))]
+ public double Contribution
+ {
+ get
+ {
+ return data.Contribution;
+ }
+ }
+
+ #endregion
+
+ #region Length effect parameters
+
+ [PropertyOrder(sectionLengthPropertyIndex)]
+ [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_LengthEffect))]
+ [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.ReferenceLine_Length_Rounded_DisplayName))]
+ [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.ReferenceLine_Length_Rounded_Description))]
+ public RoundedDouble SectionLength
+ {
+ get
+ {
+ return new RoundedDouble(2, assessmentSection.ReferenceLine.Length);
+ }
+ }
+
+ [PropertyOrder(deltaLPropertyIndex)]
+ [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_LengthEffect))]
+ [ResourcesDisplayName(typeof(Resources), nameof(Resources.WaveImpactAsphaltCoverFailureMechanismProperties_DeltaL_DisplayName))]
+ [ResourcesDescription(typeof(Resources), nameof(Resources.WaveImpactAsphaltCoverFailureMechanismProperties_DeltaL_Description))]
+ public RoundedDouble DeltaL
+ {
+ get
+ {
+ return data.GeneralWaveImpactAsphaltCoverInput.DeltaL;
+ }
+ set
+ {
+ data.GeneralWaveImpactAsphaltCoverInput.DeltaL = value;
+ data.NotifyObservers();
+ }
+ }
+
+ [PropertyOrder(nPropertyIndex)]
+ [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_LengthEffect))]
+ [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_N_Rounded_DisplayName))]
+ [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_N_Rounded_Description))]
+ public RoundedDouble N
+ {
+ get
+ {
+ return new RoundedDouble(2, data.GeneralWaveImpactAsphaltCoverInput.GetN(assessmentSection.ReferenceLine.Length));
+ }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file