From 483218ef02567da9e86a0bbb9034a21f4f54cc89 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Sun, 22 May 2016 14:11:37 +0200 Subject: [PATCH] Output.FileWriter.Enhanced: (1) support for compound meters, (2) better localization, ver.2.7.291 --- .../Output/FileWriters/Enhanced/Writer.cs | 34 +++++++++++-------- TestBenchFramework/Properties/AssemblyInfo.cs | 4 +-- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/Writer.cs b/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/Writer.cs index 292463e03..b324a7cd1 100644 --- a/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/Writer.cs +++ b/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/Writer.cs @@ -143,19 +143,18 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced string[] leftColumn = new string[] { - "Batch number: ", - "Date and time: ", - "Procedure:", - Strings.User_, - "Ambient temperature: ", - "Ambient pressure: ", - "Ambient humidity: ", +// "Batch number: ", + Strings.Date_and_time_ + " ", + Strings.Procedure_ + " ", + Strings.User_ + " ", + Strings.Ambient_temperature_ + " ", + Strings.Ambient_pressure_ + " ", + Strings.Ambient_humidity_ + " ", }; string[] rightColumn = new string[] { - batch.BatchNr.ToString(), - //batch.EndTime.ToShortDateString() + " " + batch.EndTime.ToShortTimeString(), +// batch.BatchNr.ToString(), string.Format("{0}.{1}.{2} {3}:{4}", batch.EndTime.Year.ToString("D4"), batch.EndTime.Month.ToString("D2"), batch.EndTime.Day.ToString("D2"), @@ -235,11 +234,18 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced totalWidth += 3 * (rsltItems.Count - 1); if (totalWidth < 0) totalWidth = 0; - - /// Write water meter number and s/n - writer.Write(string.Format("Water meter {0}", wm.WMPosition)); - if (!string.IsNullOrEmpty(wm.SerialNr)) writer.Write(string.Format(" s/n: {0}", wm.SerialNr)); - writer.WriteLine(string.Empty); + /// Write water meter number and s/n + writer.Write(string.Format("Water meter {0}", wm.WMPosition)); + if (!wm.Compound()) + { + if (!string.IsNullOrEmpty(wm.SerialNr)) writer.Write(string.Format(", s/n: {0}", wm.SerialNr)); + } + else + { + if (!string.IsNullOrEmpty(wm.SerialNr)) writer.Write(string.Format(", Main s/n: {0}", wm.SerialNr)); + if (!string.IsNullOrEmpty(wm.SerialNrAux)) writer.Write(string.Format(", Aux s/n: {0}", wm.SerialNrAux)); + } + writer.WriteLine(string.Empty); writer.WriteLine(new String('-', totalWidth)); /// Horizontal line above the header diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index c5f1d4052..51910d1f8 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.7.290.1")] -[assembly: AssemblyFileVersion("2.7.290.1")] +[assembly: AssemblyVersion("2.7.291.1")] +[assembly: AssemblyFileVersion("2.7.291.1")]