Index: dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/Properties/Resources.Designer.cs
===================================================================
diff -u
--- dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/Properties/Resources.Designer.cs (revision 0)
+++ dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/Properties/Resources.Designer.cs (revision 324)
@@ -0,0 +1,90 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Deltares.DamPiping.BlighCalculator.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Deltares.DamPiping.BlighCalculator.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Parameter {0} is not a number (NaN)..
+ ///
+ internal static string PipingCalculatorBligh_LogParameterIsNaN_NaNParameterError {
+ get {
+ return ResourceManager.GetString("PipingCalculatorBligh_LogParameterIsNaN_NaNParameterError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to HRiver - HExit - (Rc*DTotal) may not be 0..
+ ///
+ internal static string PipingCalculatorBligh_PerformValidate_HRiver_HExit_Rc_DTotal_Zero {
+ get {
+ return ResourceManager.GetString("PipingCalculatorBligh_PerformValidate_HRiver_HExit_Rc_DTotal_Zero", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Rc may not be less than 0..
+ ///
+ internal static string PipingCalculatorBligh_PerformValidate_RcLessThan0 {
+ get {
+ return ResourceManager.GetString("PipingCalculatorBligh_PerformValidate_RcLessThan0", resourceCulture);
+ }
+ }
+ }
+}
Index: dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/Properties/Resources.nl-NL.resx
===================================================================
diff -u
--- dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/Properties/Resources.nl-NL.resx (revision 0)
+++ dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/Properties/Resources.nl-NL.resx (revision 324)
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Parameter {0} heeft geen waarde (NaN).
+
+
+ De term HRiver - HExit - (Rc*DTotal) mag niet nul zijn.
+
+
+ De waarde voor de dempingsfactor mag niet lager dan 0 zijn.
+
+
\ No newline at end of file
Index: dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/Properties/Resources.resx
===================================================================
diff -u
--- dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/Properties/Resources.resx (revision 0)
+++ dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/Properties/Resources.resx (revision 324)
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Rc may not be less than 0.
+
+
+ Parameter {0} is not a number (NaN).
+
+
+ HRiver - HExit - (Rc*DTotal) may not be 0.
+
+
\ No newline at end of file
Index: dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/Deltares.DamPiping.BlighCalculator.csproj
===================================================================
diff -u -r267 -r324
--- dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/Deltares.DamPiping.BlighCalculator.csproj (.../Deltares.DamPiping.BlighCalculator.csproj) (revision 267)
+++ dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/Deltares.DamPiping.BlighCalculator.csproj (.../Deltares.DamPiping.BlighCalculator.csproj) (revision 324)
@@ -46,10 +46,22 @@
+
+ True
+ True
+ Resources.resx
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
"$(ProjectDir)..\..\utils\svn_insert_version.cmd" "$(ProjectDir)Properties"
Index: dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/PipingCalculatorBligh.cs
===================================================================
diff -u -r270 -r324
--- dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/PipingCalculatorBligh.cs (.../PipingCalculatorBligh.cs) (revision 270)
+++ dam failuremechanisms/damPiping/trunk/src/Deltares.DamPiping.BlighCalculator/PipingCalculatorBligh.cs (.../PipingCalculatorBligh.cs) (revision 324)
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using Deltares.DamPiping.BlighCalculator.Properties;
namespace Deltares.DamPiping.BlighCalculator
{
@@ -20,7 +21,6 @@
private double rc = RcDefault;
private double zp;
private double reducedFall;
- // private LanguageType language = LanguageType.Dutch;
///
/// Model factor for piping as input
@@ -126,24 +126,11 @@
///
public void Calculate()
{
-// var restoreLanguage = LocalizationManager.CurrentLanguage;
-// LocalizationManager.CurrentLanguage = Language;
-// var dumper = new XmlDumper();
- try
- {
-// DumpThis(dumper);
-
- hc = GetHc();
- reducedFall = GetReducedFall();
- zp = (ModelFactorPiping*hc) - reducedFall;
- DetermineFactorOfSafety();
- hcp = (ModelFactorPiping*hc) + HExit + (Rc*DTotal);
- }
- finally
- {
-// DumpThis(dumper);
-// LocalizationManager.CurrentLanguage = restoreLanguage;
- }
+ hc = GetHc();
+ reducedFall = GetReducedFall();
+ zp = (ModelFactorPiping*hc) - reducedFall;
+ DetermineFactorOfSafety();
+ hcp = (ModelFactorPiping*hc) + HExit + (Rc*DTotal);
}
private void DetermineFactorOfSafety()
@@ -252,22 +239,8 @@
/// a filled list when errors are found else an empty list
public List Validate()
{
-// var restoreLanguage = LocalizationManager.CurrentLanguage;
-// LocalizationManager.CurrentLanguage = Language;
-
var errors = new List();
-// var dumper = new XmlDumper();
- try
- {
-// DumpThis(dumper);
- errors.AddRange(PerformValidate());
- }
- finally
- {
-// DumpThis(dumper);
-// LocalizationManager.CurrentLanguage = restoreLanguage;
- }
-
+ errors.AddRange(PerformValidate());
return errors;
}
@@ -276,7 +249,7 @@
var errors = new List();
if (Math.Abs(GetReducedFall()) < double.Epsilon)
{
- errors.Add(RiverHexitRcDTotalError);
+ errors.Add(Resources.PipingCalculatorBligh_PerformValidate_HRiver_HExit_Rc_DTotal_Zero);
}
if (double.IsNaN(SeepageLength))
@@ -293,7 +266,7 @@
}
if (Rc < 0)
{
- errors.Add(this.Translate("RcLessThan0"));
+ errors.Add(Resources.PipingCalculatorBligh_PerformValidate_RcLessThan0);
}
if (double.IsNaN(DTotal))
{
@@ -308,26 +281,18 @@
LogParameterIsNaN(errors, "HExit");
}
if (double.IsNaN(D50))
+ {
LogParameterIsNaN(errors, "D50");
+ }
return errors;
}
private void LogParameterIsNaN(IList list, string paramName)
{
- var msg = string.Format(this.Translate("NaNParameterError"), paramName);
+ var msg = string.Format(Resources.PipingCalculatorBligh_LogParameterIsNaN_NaNParameterError, paramName);
list.Add(msg);
}
- private string RiverHexitRcDTotalError
- {
- get { return this.Translate("HRiver_HExit_Rc_DTotal_Zero"); }
- }
-
- private string Translate(string error)
- {
- return error + ": %s";
- }
-
private bool IsPipingPossible()
{
var isCoverageLayerThicknessZero = Math.Abs(DTotal) < Epsilon;