From d2e8f4f0e3be31d5dedac51b8c86848d7b0bec24 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Fri, 5 Aug 2022 14:58:47 +0200 Subject: [PATCH] Better on-screen error message when a path is missing in a test, ver. 3.3.1941 --- TBF/Properties/AssemblyInfo.cs | 4 ++-- TBF/Resources/Strings.Designer.cs | 9 +++++++++ TBF/Resources/Strings.cs.resx | 3 +++ TBF/Resources/Strings.resx | 3 +++ TBF/Rig/StateMachine.cs | 8 ++++---- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index 2b87e7171..6f29d8a9b 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -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")] diff --git a/TBF/Resources/Strings.Designer.cs b/TBF/Resources/Strings.Designer.cs index 3095e6a7b..b0f8b7af3 100644 --- a/TBF/Resources/Strings.Designer.cs +++ b/TBF/Resources/Strings.Designer.cs @@ -5901,6 +5901,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Test {0} config. error : {1} is missing. + /// + internal static string Test_0_config_error_1_is_missing { + get { + return ResourceManager.GetString("Test_0_config_error_1_is_missing", resourceCulture); + } + } + /// /// Looks up a localized string similar to Test bench. /// diff --git a/TBF/Resources/Strings.cs.resx b/TBF/Resources/Strings.cs.resx index b49851f4d..afdb086f0 100644 --- a/TBF/Resources/Strings.cs.resx +++ b/TBF/Resources/Strings.cs.resx @@ -1728,4 +1728,7 @@ Počáteční hmotnost + + Konfigurace testu {0} : chybí {1} + \ No newline at end of file diff --git a/TBF/Resources/Strings.resx b/TBF/Resources/Strings.resx index 5aebb9aa1..abae7b97d 100644 --- a/TBF/Resources/Strings.resx +++ b/TBF/Resources/Strings.resx @@ -2383,4 +2383,7 @@ Start mass + + Test {0} config. error : {1} is missing + \ No newline at end of file diff --git a/TBF/Rig/StateMachine.cs b/TBF/Rig/StateMachine.cs index defcf3f1d..e3a8d1d11 100644 --- a/TBF/Rig/StateMachine.cs +++ b/TBF/Rig/StateMachine.cs @@ -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)) {