(1) CycleNr renamed to BatchNr (no DB change) and added to results/logs
(2) Safer result items
This commit is contained in:
@@ -269,13 +269,14 @@ namespace TBF.Screens
|
||||
string str;
|
||||
if (combined)
|
||||
{
|
||||
str = (item.PrintCombined == null) ? string.Empty : item.PrintCombined(testRslt.Meters[2 * mtr - 2],
|
||||
testRslt.Meters[2 * mtr - 1],
|
||||
testRslt.CombinedMeters[mtr - 1]);
|
||||
str = item.CanPrintCombined ? item.PrintCombined(testRslt.Meters[2 * mtr - 2],
|
||||
testRslt.Meters[2 * mtr - 1],
|
||||
testRslt.CombinedMeters[mtr - 1])
|
||||
: string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
str = (item.Print == null) ? string.Empty : item.Print(testRslt.Meters[mtr - 1]);
|
||||
str = item.CanPrintSingle ? item.Print(testRslt.Meters[mtr - 1]) : string.Empty;
|
||||
}
|
||||
|
||||
string[] texts = str.Split(new char[] { '|' });
|
||||
@@ -346,9 +347,9 @@ namespace TBF.Screens
|
||||
{
|
||||
foreach (var tr in trs)
|
||||
{
|
||||
string str = (item.PrintCombined == null || tr == null) ? string.Empty : item.PrintCombined(tr.Meters[2 * mtr - 2],
|
||||
tr.Meters[2 * mtr - 1],
|
||||
tr.CombinedMeters[mtr - 1]);
|
||||
string str = (!item.CanPrintCombined || tr == null) ? string.Empty : item.PrintCombined(tr.Meters[2 * mtr - 2],
|
||||
tr.Meters[2 * mtr - 1],
|
||||
tr.CombinedMeters[mtr - 1]);
|
||||
string[] texts = str.Split(new char[] { '|' });
|
||||
if (texts.Length == 1)
|
||||
{
|
||||
@@ -371,7 +372,7 @@ namespace TBF.Screens
|
||||
{
|
||||
foreach (var tr in trs)
|
||||
{
|
||||
string str = (item.Print == null || tr == null) ? string.Empty : item.Print(tr.Meters[mtr - 1]);
|
||||
string str = (!item.CanPrintSingle || tr == null) ? string.Empty : item.Print(tr.Meters[mtr - 1]);
|
||||
|
||||
string[] texts = str.Split(new char[] { '|' });
|
||||
if (texts.Length == 1)
|
||||
|
||||
Reference in New Issue
Block a user