Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/HydraulicBoundaryLocationCalculationProperties.cs
===================================================================
diff -u -r04ffe9435f3031323b2eeac4718e85dfd6022dbe -r6cd7ed9865da9f211a6e1e3cd4a0ac86b321eef0
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/HydraulicBoundaryLocationCalculationProperties.cs (.../HydraulicBoundaryLocationCalculationProperties.cs) (revision 04ffe9435f3031323b2eeac4718e85dfd6022dbe)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/HydraulicBoundaryLocationCalculationProperties.cs (.../HydraulicBoundaryLocationCalculationProperties.cs) (revision 6cd7ed9865da9f211a6e1e3cd4a0ac86b321eef0)
@@ -20,6 +20,7 @@
// All rights reserved.
using System;
+using Core.Common.Base.Geometry;
using Core.Common.Gui.Attributes;
using Core.Common.Util.Attributes;
using Ringtoets.Common.Data.Hydraulics;
@@ -29,37 +30,57 @@
{
///
/// ViewModel of for properties panel with information
- /// about the calculation output.
+ /// about the .
///
- public abstract class HydraulicBoundaryLocationCalculationOutputProperties : HydraulicBoundaryLocationCalculationBaseProperties
+ public abstract class HydraulicBoundaryLocationCalculationProperties : HydraulicBoundaryLocationCalculationBaseProperties
{
///
- /// Creates a new instance of .
+ /// Creates a new instance of .
///
/// The hydraulic boundary location calculation.
- /// The name of the category boundary the calculation belongs to.
- /// Thrown when any parameter is null.
- protected HydraulicBoundaryLocationCalculationOutputProperties(HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation,
- string categoryBoundaryName)
- : base(hydraulicBoundaryLocationCalculation)
+ /// Thrown when is null.
+ protected HydraulicBoundaryLocationCalculationProperties(HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation)
+ : base(hydraulicBoundaryLocationCalculation) {}
+
+ [PropertyOrder(1)]
+ [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_General))]
+ [ResourcesDisplayName(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Location_Id_DisplayName))]
+ [ResourcesDescription(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Location_Id_Description))]
+ public long Id
{
- if (categoryBoundaryName == null)
+ get
{
- throw new ArgumentNullException(nameof(categoryBoundaryName));
+ return data.HydraulicBoundaryLocation.Id;
}
+ }
- CategoryBoundaryName = categoryBoundaryName;
+ [PropertyOrder(2)]
+ [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_General))]
+ [ResourcesDisplayName(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Location_Name_DisplayName))]
+ [ResourcesDescription(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Location_Name_Description))]
+ public string Name
+ {
+ get
+ {
+ return data.HydraulicBoundaryLocation.Name;
+ }
}
- [PropertyOrder(1)]
+ [PropertyOrder(3)]
[ResourcesCategory(typeof(Resources), nameof(Resources.Categories_General))]
- [ResourcesDisplayName(typeof(Resources), nameof(Resources.HydraulicBoundaryLocationCalculationOutputProperties_CategoryBoundaryName_DisplayName))]
- [ResourcesDescription(typeof(Resources), nameof(Resources.HydraulicBoundaryLocationCalculationOutputProperties_CategoryBoundaryName_Description))]
- public string CategoryBoundaryName { get; }
+ [ResourcesDisplayName(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Location_Coordinates_DisplayName))]
+ [ResourcesDescription(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Location_Coordinates_Description))]
+ public Point2D Location
+ {
+ get
+ {
+ return data.HydraulicBoundaryLocation.Location;
+ }
+ }
public override string ToString()
{
- return CategoryBoundaryName;
+ return $"{Name} {Location}";
}
}
}
\ No newline at end of file