Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineShoulderAdapter.cs =================================================================== diff -u -r971 -r1053 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineShoulderAdapter.cs (.../SurfaceLineShoulderAdapter.cs) (revision 971) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineShoulderAdapter.cs (.../SurfaceLineShoulderAdapter.cs) (revision 1053) @@ -21,10 +21,10 @@ using System; using System.Linq; +using Deltares.DamEngine.Calculators.Properties; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.Geometry; using Deltares.DamEngine.Data.Geotechnics; -using Deltares.DamEngine.Data.Standard.Language; namespace Deltares.DamEngine.Calculators.DikesDesign { @@ -81,20 +81,20 @@ double currentShoulderWidth = surfaceLine.DetermineShoulderLengthForGivenShoulderTopInside(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside)); if (currentShoulderWidth > shoulderWidth) { - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(this, "SurfaceLineShoulderAdapterNewShoulderWidthError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderWidthError); } double currentShoulderHeight = surfaceLine.DetermineShoulderHeight(); if (currentShoulderHeight > shoulderHeight) { - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(this, "SurfaceLineShoulderAdapterNewShoulderHeightError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderHeightError); } if (shoulderWidth < 0) { - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(this, "SurfaceLineShoulderAdapterNewShoulderWidthError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderWidthError); } if (shoulderHeight < 0) { - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(this, "SurfaceLineShoulderAdapterNewShoulderHeightZeroError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderHeightZeroError); } } } @@ -154,7 +154,7 @@ // for piping design, when the required new height is larger than allowed, it is an error! if ((MaxShoulderLevel - dikeToeAtPolder.Z) < shoulderHeight) { - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(this, "SurfaceLineShoulderAdapterNewShoulderHeightTooLargeError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderHeightTooLargeError); } } else @@ -182,7 +182,7 @@ intersectionPointAtDike = LineHelper.GetIntersectionPointWithExtrapolation(dikeTopAtPolder, dikeBaseInside, pb, newTopShoulder); if (intersectionPointAtDike.Z > MaxShoulderLevel) { - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(this, "SurfaceLineShoulderAdapterNewShoulderHeightTooLargeTopSlopeError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderHeightTooLargeTopSlopeError); } } @@ -227,8 +227,7 @@ } if (newToeAtPolder == null) { - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(this, - "SurfaceLineShoulderAdapterNewShoulderNoIntersectionError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderNoIntersectionError); } } @@ -251,7 +250,7 @@ // Check whether the surface line is extended. This is not allowed! if (surfaceLine.Geometry.GetMaxX() > orgMaxX) { - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(this, "SurfaceLineShoulderAdapterNewShoulderWidthTooLargeError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderWidthTooLargeError); } // Restore Ditch (if any) Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx =================================================================== diff -u -r1052 -r1053 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx (.../Resources.resx) (revision 1052) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx (.../Resources.resx) (revision 1053) @@ -183,7 +183,61 @@ Specified z-level {0} in AquitardEvaluator is outside soilprofile '{1}' (should be between {2} and {3}). + + Adapting the slope of the dike failed. Probably the slope is too steep or too shallow. + + + The ditch as part of the surface line is incorrect. This makes a redesign of the surface line impossible. + + + No valid dike. Dike top polder or river has a height of 0. + + + The new slope of the ditch does not intersect with the surface line (new bottom of ditch probably to high). This makes a redesign of the surface line impossible. + + + There is no valid dike defined. Missing characteristic points dike toe at polder, dike top at river, dike top at polder and/or dike toe at river. + + + The surface line is null or empty. + + + No valid point data in the surface line. It should have at least 4 points to be valid. + + + The shoulder defined on the dike is not valid. The height is zero. + + + There is no surface level inside defined on the dike. + + + After height adaption ditch does not fit inside surfaceline anymore. + + + After height adaption ditch does not fit inside surfaceline anymore. + The heigth of the dike top is equal to or lower than the dike toe so redesign is NOT possible. + + New shoulder height is smaller than current shoulder height. + + + The new shoulder height is too large to fit in the current surface line. + + + The new shoulder height with topslope exceeds the allowed maximum height. + + + New shoulder height should be larger than 0. + + + The new shoulder does not intersect the surface. This can be caused by a very strange surfaceline or the new shoulderwidth is too large. + + + New shoulder width is smaller than current shoulder width. + + + The new shoulder width is too large to fit in the current surface line. + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx =================================================================== diff -u -r1052 -r1053 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 1052) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 1053) @@ -183,7 +183,58 @@ Er is geen hoogtegeometrie gedefinieerd voor locatie '{0}'. + + Het aanpassen van de helling van het dijkprofiel is mislukt. Waarschijnlijk is de nieuwe helling te steil of te flauw. + + + De sloot in het dijkprofiel is ongeldig gedefinieerd. + + + Het dijkprofiel is ongeldig omdat de kruin geen hoogte heeft aan rivier- en/of polderzijde. + + + De nieuwe helling van de sloot snijdt het maaiveld niet (waarschijnlijk ligt de nieuwe slootbodem te hoog). + + + Het dijkprofiel is ongeldig. Er ontbreken verplichte karakteristieke punten. + + + Het dijkprofiel is niet gedefinieerd. + + + Het dijkprofiel bevat geen punten en is daarom ongeldig. + + + De berm in het dijkprofiel is ongeldig omdat deze geen hoogte heeft. + + + De definitie van het einde van het dijkprofiel aan polderzijde ontbreekt. + + + Na aanpassen van de hoogte past de sloot niet meer binnen het dijkprofiel. + De kruin van het dijkprofiel ligt beneden of is gelijk aan de dijkteen. Bermontwikkeling is daardoor niet mogelijk. + + De nieuwe berm is lager dan de huidige berm. + + + De nieuwe hoogte van de berm past niet in het dijkprofiel (is hoger dan toegestaan). + + + De nieuwe hoogte van de berm met afschot is groter dan de maximaal toegestane hoogte. + + + De hoogte van de nieuwe berm moet groter zijn dan 0. + + + De nieuwe berm snijdt het dijkprofiel niet. Ofwel het dijkprofiel verloopt heel vreemd of de nieuwe bermbreedte is te groot. + + + De nieuwe berm is minder breed dan de huidige berm. + + + De nieuwe breedte van de berm past niet in het dijkprofiel (is breder dan toegestaan). + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs =================================================================== diff -u -r1052 -r1053 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 1052) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 1053) @@ -262,12 +262,175 @@ } /// + /// Looks up a localized string similar to Adapting the slope of the dike failed. Probably the slope is too steep or too shallow.. + /// + internal static string SlopeErrorNoIntersection { + get { + return ResourceManager.GetString("SlopeErrorNoIntersection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ditch as part of the surface line is incorrect. This makes a redesign of the surface line impossible.. + /// + internal static string SurfaceLineAdapterDikeDitchError { + get { + return ResourceManager.GetString("SurfaceLineAdapterDikeDitchError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No valid dike. Dike top polder or river has a height of 0.. + /// + internal static string SurfaceLineAdapterDikeHeightError { + get { + return ResourceManager.GetString("SurfaceLineAdapterDikeHeightError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The new slope of the ditch does not intersect with the surface line (new bottom of ditch probably to high). This makes a redesign of the surface line impossible.. + /// + internal static string SurfaceLineAdapterDitchSlopeError { + get { + return ResourceManager.GetString("SurfaceLineAdapterDitchSlopeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no valid dike defined. Missing characteristic points dike toe at polder, dike top at river, dike top at polder and/or dike toe at river.. + /// + internal static string SurfaceLineAdapterInvalidDikeError { + get { + return ResourceManager.GetString("SurfaceLineAdapterInvalidDikeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The surface line is null or empty.. + /// + internal static string SurfaceLineAdapterNoDikeError { + get { + return ResourceManager.GetString("SurfaceLineAdapterNoDikeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No valid point data in the surface line. It should have at least 4 points to be valid.. + /// + internal static string SurfaceLineAdapterNoDikePointsError { + get { + return ResourceManager.GetString("SurfaceLineAdapterNoDikePointsError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The shoulder defined on the dike is not valid. The height is zero.. + /// + internal static string SurfaceLineAdapterShoulderHeightError { + get { + return ResourceManager.GetString("SurfaceLineAdapterShoulderHeightError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no surface level inside defined on the dike.. + /// + internal static string SurfaceLineAdapterSurfaceLevelError { + get { + return ResourceManager.GetString("SurfaceLineAdapterSurfaceLevelError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to After height adaption ditch does not fit inside surfaceline anymore.. + /// + internal static string SurfaceLineHeightAdapterDitchOutsideSurfaceLine { + get { + return ResourceManager.GetString("SurfaceLineHeightAdapterDitchOutsideSurfaceLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to After height adaption ditch does not fit inside surfaceline anymore.. + /// + internal static string SurfaceLineHeightAdapterDitchOutsideSurfaceSurfaceLineHeightAdapterDitchOutsideSurfaceLine { + get { + return ResourceManager.GetString("SurfaceLineHeightAdapterDitchOutsideSurfaceSurfaceLineHeightAdapterDitchOutsideSu" + + "rfaceLine", resourceCulture); + } + } + + /// /// Looks up a localized string similar to The heigth of the dike top is equal to or lower than the dike toe so redesign is NOT possible.. /// internal static string SurfaceLineShoulderAdapterMaxShoulderHeightError { get { return ResourceManager.GetString("SurfaceLineShoulderAdapterMaxShoulderHeightError", resourceCulture); } } + + /// + /// Looks up a localized string similar to New shoulder height is smaller than current shoulder height.. + /// + internal static string SurfaceLineShoulderAdapterNewShoulderHeightError { + get { + return ResourceManager.GetString("SurfaceLineShoulderAdapterNewShoulderHeightError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The new shoulder height is too large to fit in the current surface line.. + /// + internal static string SurfaceLineShoulderAdapterNewShoulderHeightTooLargeError { + get { + return ResourceManager.GetString("SurfaceLineShoulderAdapterNewShoulderHeightTooLargeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The new shoulder height with topslope exceeds the allowed maximum height.. + /// + internal static string SurfaceLineShoulderAdapterNewShoulderHeightTooLargeTopSlopeError { + get { + return ResourceManager.GetString("SurfaceLineShoulderAdapterNewShoulderHeightTooLargeTopSlopeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New shoulder height should be larger than 0.. + /// + internal static string SurfaceLineShoulderAdapterNewShoulderHeightZeroError { + get { + return ResourceManager.GetString("SurfaceLineShoulderAdapterNewShoulderHeightZeroError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The new shoulder does not intersect the surface. This can be caused by a very strange surfaceline or the new shoulderwidth is too large.. + /// + internal static string SurfaceLineShoulderAdapterNewShoulderNoIntersectionError { + get { + return ResourceManager.GetString("SurfaceLineShoulderAdapterNewShoulderNoIntersectionError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New shoulder width is smaller than current shoulder width.. + /// + internal static string SurfaceLineShoulderAdapterNewShoulderWidthError { + get { + return ResourceManager.GetString("SurfaceLineShoulderAdapterNewShoulderWidthError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The new shoulder width is too large to fit in the current surface line.. + /// + internal static string SurfaceLineShoulderAdapterNewShoulderWidthTooLargeError { + get { + return ResourceManager.GetString("SurfaceLineShoulderAdapterNewShoulderWidthTooLargeError", resourceCulture); + } + } } } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineSlopeAdapter.cs =================================================================== diff -u -r971 -r1053 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineSlopeAdapter.cs (.../SurfaceLineSlopeAdapter.cs) (revision 971) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineSlopeAdapter.cs (.../SurfaceLineSlopeAdapter.cs) (revision 1053) @@ -20,10 +20,10 @@ // All rights reserved. using System.Linq; +using Deltares.DamEngine.Calculators.Properties; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.Geotechnics; using Deltares.DamEngine.Data.Standard; -using Deltares.DamEngine.Data.Standard.Language; using Deltares.DamEngine.Data.Standard.Validation; namespace Deltares.DamEngine.Calculators.DikesDesign @@ -102,8 +102,7 @@ // Check whether the surface line is extended. This is not allowed! if (surfaceLine.Geometry.GetMaxX() > orgMaxX) { - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(this, - "SurfaceLineShoulderAdapterNewShoulderHeightTooLargeError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderHeightTooLargeError); } // Restore traffic load RestoreTrafficLoad(); Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineAdapter.cs =================================================================== diff -u -r971 -r1053 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineAdapter.cs (.../SurfaceLineAdapter.cs) (revision 971) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineAdapter.cs (.../SurfaceLineAdapter.cs) (revision 1053) @@ -22,10 +22,10 @@ using System; using System.Collections.Generic; using System.Linq; +using Deltares.DamEngine.Calculators.Properties; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.Geometry; using Deltares.DamEngine.Data.Geotechnics; -using Deltares.DamEngine.Data.Standard.Language; namespace Deltares.DamEngine.Calculators.DikesDesign { @@ -190,7 +190,7 @@ } if (newSlopeEndPoint == null) { - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(this, "SlopeErrorNoIntersection")); + throw new SurfaceLineAdapterException(Resources.SlopeErrorNoIntersection); } var dikeToeAtPolder = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); if (newSlopeEndPoint.X > dikeToeAtPolder.X) @@ -253,8 +253,7 @@ if (!newSlopeEndPoint.LocationEquals(new Point2D(dikeToeAtPolder.X, dikeToeAtPolder.Z))) { // There is no shoulder so the slope must be too steep. - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(this, - "SlopeErrorNoIntersection")); + throw new SurfaceLineAdapterException(Resources.SlopeErrorNoIntersection); } } } @@ -286,45 +285,39 @@ var zeroPoint = new GeometryPoint(); if (zeroPoint.LocationEquals(p1) || zeroPoint.LocationEquals(p2)) - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(typeof(SurfaceLineAdapter), - "SurfaceLineAdapterDikeHeightError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineAdapterDikeHeightError); if (surfaceLine.HasShoulderInside()) { p1 = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); p2 = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); if (zeroPoint.LocationEquals(p1) || zeroPoint.LocationEquals(p2)) - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(typeof(SurfaceLineAdapter), - "SurfaceLineAdapterShoulderHeightError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineAdapterShoulderHeightError); } } private static void ThrowWhenSurfaceLineHasAShoulderInsideAndNoSurfaceLevel(SurfaceLine2 surfaceLine, GeometryPoint surfaceLevelPoint) { if (surfaceLine.HasShoulderInside() && surfaceLevelPoint == null) - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(typeof(SurfaceLineAdapter), - "SurfaceLineAdapterSurfaceLevelError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineAdapterSurfaceLevelError); } private static void ThrowWhenSurfaceHasNoDike(SurfaceLine2 surfaceLine) { if (!surfaceLine.HasDike()) - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(typeof(SurfaceLineAdapter), - "SurfaceLineAdapterInvalidDikeError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineAdapterInvalidDikeError); } private static void ThrowWhenSurfaceLineIsNull(SurfaceLine2 surfaceLine) { if (surfaceLine == null) - throw new ArgumentNullException("SurfaceLine", LocalizationManager.GetTranslatedText(typeof(SurfaceLineAdapter), - "SurfaceLineAdapterNoDikeError")); + throw new ArgumentNullException(Resources.SurfaceLineAdapterNoDikeError); } private static void ThrowWhenSurfaceLineHasNoOrLessThenFourPoints(ICollection points) { if (points == null || points.Count < 4) - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(typeof(SurfaceLineAdapter), - "SurfaceLineAdapterNoDikePointsError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineAdapterNoDikePointsError); } /// @@ -364,8 +357,7 @@ if (surfaceLine.HasDitch()) { // Incorrect ditch is an error here, this should have been checked already - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(typeof(SurfaceLineAdapter), - "SurfaceLineAdapterDikeDitchError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineAdapterDikeDitchError); } } return null; @@ -439,8 +431,7 @@ else { //new slope of ditch does not intersect with surface line (most probably because the bottom is too high) - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(typeof(SurfaceLineAdapter), - "SurfaceLineAdapterDitchSlopeError")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineAdapterDitchSlopeError); } return res; } @@ -492,7 +483,7 @@ double surfaceLevelInsideX = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.SurfaceLevelInside).X; if (coors.XAtPolder > surfaceLevelInsideX) { - throw new SurfaceLineAdapterException(LocalizationManager.GetTranslatedText(this, "SurfaceLineHeightAdapterDitchOutsideSurfaceLine")); + throw new SurfaceLineAdapterException(Resources.SurfaceLineHeightAdapterDitchOutsideSurfaceLine); } // Add the outside points of the new ditch surfaceLine.EnsurePointOfType(coors.XAtDike, coors.ZAtDike, CharacteristicPointType.DitchDikeSide);