diff --git a/Results/ItemID.cs b/Results/ItemID.cs index b133eb6ad..cf0a1b036 100644 --- a/Results/ItemID.cs +++ b/Results/ItemID.cs @@ -285,6 +285,8 @@ namespace Results Prod_ResultCode, /// 244 Prod_Q2CorrRL, /// 245 Prod_Q2CorrLR, /// 246 + + TestPartStr, /// 247 Count, } diff --git a/Results/Properties/AssemblyInfo.cs b/Results/Properties/AssemblyInfo.cs index eade14e22..c85e6d6c4 100644 --- a/Results/Properties/AssemblyInfo.cs +++ b/Results/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.18.1126.0")] -[assembly: AssemblyFileVersion("2.18.1126.0")] +[assembly: AssemblyVersion("2.18.1127.0")] +[assembly: AssemblyFileVersion("2.18.1127.0")] diff --git a/Results/WMeterRsltItemSpec.cs b/Results/WMeterRsltItemSpec.cs index 067475e30..add2dd695 100644 --- a/Results/WMeterRsltItemSpec.cs +++ b/Results/WMeterRsltItemSpec.cs @@ -464,6 +464,7 @@ namespace Results AllItems.Add(new WMeterRsltItemSpec(ItemID.E15, "E15 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x4000) != 0) ? Strings.Yes : Strings.No)); AllItems.Add(new WMeterRsltItemSpec(ItemID.E16, "E16 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x8000) != 0) ? Strings.Yes : Strings.No)); AllItems.Add(new WMeterRsltItemSpec(ItemID.E21, "E21 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x100000) != 0) ? Strings.Yes : Strings.No)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.TestPartStr, "Test part str.", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => FormatEnum(f, (w.GetMeterTestRslt(t) != null) ? w.GetMeterTestRslt(t).TestRslt.Part : 0))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Table_row_nr, "Table row #", Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? TableRowNr.ToString() : string.Format(f, TableRowNr))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Table_column_nr, "Table column #", Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? TableColumnNr.ToString() : string.Format(f, TableColumnNr))); @@ -494,6 +495,23 @@ namespace Results } } + public static string FormatEnum(string format, int value) + { + if (string.IsNullOrEmpty(format)) + { + return value.ToString(); + } + else + { + string[] texts = format.Split(new char[] { '~' }); + + if (value >= 0 && value < texts.Length) + return texts[value]; + else + return value.ToString(); + } + } + public static string FormatInt(string format, int value) { return string.IsNullOrEmpty(format) ? value.ToString() : string.Format(format, value); diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index 1c9011b60..8cea816c8 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.18.1126.0")] -[assembly: AssemblyFileVersion("2.18.1126.0")] +[assembly: AssemblyVersion("2.18.1127.0")] +[assembly: AssemblyFileVersion("2.18.1127.0")]