Better on-screen error message when a path is missing in a test, ver. 3.3.1941

This commit is contained in:
Milan Hanajik 2022-08-05 14:58:47 +02:00
parent c9ea85b7b8
commit d2e8f4f0e3
5 changed files with 21 additions and 6 deletions

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.3.1940.0")]
[assembly: AssemblyFileVersion("3.3.1940.0")]
[assembly: AssemblyVersion("3.3.1941.0")]
[assembly: AssemblyFileVersion("3.3.1941.0")]

View File

@ -5901,6 +5901,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Test {0} config. error : {1} is missing.
/// </summary>
internal static string Test_0_config_error_1_is_missing {
get {
return ResourceManager.GetString("Test_0_config_error_1_is_missing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Test bench.
/// </summary>

View File

@ -1728,4 +1728,7 @@
<data name="Start_mass" xml:space="preserve">
<value>Počáteční hmotnost</value>
</data>
<data name="Test_0_config_error_1_is_missing" xml:space="preserve">
<value>Konfigurace testu {0} : chybí {1}</value>
</data>
</root>

View File

@ -2383,4 +2383,7 @@
<data name="Start_mass" xml:space="preserve">
<value>Start mass</value>
</data>
<data name="Test_0_config_error_1_is_missing" xml:space="preserve">
<value>Test {0} config. error : {1} is missing</value>
</data>
</root>

View File

@ -658,10 +658,10 @@ namespace TBF.Rig
pmtrs = GetMetersPath(test);
if (isHydroTest && (pfeed == null)) errorMsg = Strings.Cannot_load_feeding_path;
else if (isHydroTest && (pben == null)) errorMsg = Strings.Cannot_load_bench_path;
else if (isHydroTest && (pout == null)) errorMsg = Strings.Cannot_load_output_path;
else if (pmtrs == null) errorMsg = Strings.Cannot_load_sensor_path;
if (isHydroTest && (pfeed == null)) errorMsg = string.Format(Strings.Test_0_config_error_1_is_missing, test.Name, Strings.Feeding_chdr);
else if (isHydroTest && (pben == null)) errorMsg = string.Format(Strings.Test_0_config_error_1_is_missing, test.Name, Strings.Bench_chdr);
else if (isHydroTest && (pout == null)) errorMsg = string.Format(Strings.Test_0_config_error_1_is_missing, test.Name, Strings.Output_chdr);
else if (pmtrs == null) errorMsg = string.Format(Strings.Test_0_config_error_1_is_missing, test.Name, Strings.Sensors_chdr);
else errorMsg = string.Empty;
if ((isHydroTest && (pfeed == null || pben == null || pout == null)) || (pmtrs == null))
{