From 05984917536990aa1f5a37147ac0dab5a4d5d9a1 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Mon, 26 Feb 2018 15:47:22 +0100 Subject: [PATCH] SequenceBase.TestResult2CvsLine( ) bug fix, ver. 2.18.826 --- TBF/BenchControl/Sequences/SequenceBase.cs | 16 +++++++++------- TBF/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/TBF/BenchControl/Sequences/SequenceBase.cs b/TBF/BenchControl/Sequences/SequenceBase.cs index cee00c08b..0ab3f58ac 100644 --- a/TBF/BenchControl/Sequences/SequenceBase.cs +++ b/TBF/BenchControl/Sequences/SequenceBase.cs @@ -836,9 +836,9 @@ namespace TBF.BenchControl.Sequences protected string TestResult2CsvLine(Results.Entities.TestRslt tstRslt) { - bool isPressureTest = tstRslt.MethodClass.Contains("PMaxTest") || tstRslt.MethodClass.Contains("LeakTest"); - bool isStartStop = tstRslt.MethodClass.Contains("FixedStart"); - bool isDiverter = tstRslt.MethodClass.Contains("FlyingStart") && tstRslt.MethodClass.Contains("MassColl"); + bool isPressureTest = (tstRslt.MethodClass != null) && (tstRslt.MethodClass.Contains("PMaxTest") || tstRslt.MethodClass.Contains("LeakTest")); + bool isStartStop = (tstRslt.MethodClass != null) && tstRslt.MethodClass.Contains("FixedStart"); + bool isDiverter = (tstRslt.MethodClass != null) && tstRslt.MethodClass.Contains("FlyingStart") && tstRslt.MethodClass.Contains("MassColl"); System.Text.StringBuilder sb = new System.Text.StringBuilder(); @@ -947,11 +947,12 @@ namespace TBF.BenchControl.Sequences if (!ProcessData.BatchRslts.WaterMeters[i].Compound() && !ProcessData.BatchRslts.WaterMeters[i].HeatMeter()) { Results.Entities.MeterTestRslt mtrRslt = ProcessData.BatchRslts.GetMeterTestRslt(tstRslt.Name(), i, CompoundMeterId.Single); - bool isCamera = mtrRslt.RegReaderClass.Equals("Network.Camera.Roi"); if (mtrRslt != null) { - sb.Append(";"); sb.Append(ProcessData.BatchRslts.WaterMeters[i].SerialNr); /// CE WM Ser.No. + bool isCamera = (mtrRslt.RegReaderClass != null) && mtrRslt.RegReaderClass.Equals("Network.Camera.Roi"); + + sb.Append(";"); sb.Append(ProcessData.BatchRslts.WaterMeters[i].SerialNr); /// CE WM Ser.No. sb.Append(";"); sb.Append(mtrRslt.VolumeStart); /// CF WM Vstart - pociatocny stav pri pevnom starte alebo zachyteny pri data streame sb.Append(";"); sb.Append(mtrRslt.VolumeEnd); /// CG WM Vend - konecny stav pri pevnom starte alebo zachyteny pri data streame sb.Append(";"); sb.Append(mtrRslt.VolumeMeter); /// CH WM Vmer - objem namerany vodomerom @@ -988,11 +989,12 @@ namespace TBF.BenchControl.Sequences for (byte b = (byte)CompoundMeterId.CompoundMain; b <= (byte)CompoundMeterId.Compound; b++) { Results.Entities.MeterTestRslt mtrRslt = ProcessData.BatchRslts.GetMeterTestRslt(tstRslt.Name(), i, (CompoundMeterId)b); - bool isCamera = mtrRslt.RegReaderClass.Equals("Network.Camera.Roi"); if (mtrRslt != null) { - sb.Append(";"); + bool isCamera = (mtrRslt.RegReaderClass != null) && mtrRslt.RegReaderClass.Equals("Network.Camera.Roi"); + + sb.Append(";"); switch ((CompoundMeterId)b) { case CompoundMeterId.CompoundMain: diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index 495ab3bd4..dcd0db5b0 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.825.0")] -[assembly: AssemblyFileVersion("2.18.825.0")] +[assembly: AssemblyVersion("2.18.826.0")] +[assembly: AssemblyFileVersion("2.18.826.0")]