From 4ac72c6bbfa6bb6b72c5978539cef545f2804078 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Fri, 10 Feb 2023 13:43:18 +0100 Subject: [PATCH] IperlLogger handles more then 20 tests, previous results open on current screen, etc., ver. 2.31.2016 --- Results/Forms/BatchResultsDlg.Designer.cs | 1 + TBF/Properties/AssemblyInfo.cs | 4 ++-- TBF/Rig/Output/FileWriters/IperlLogger/Writer.cs | 2 +- TBF/Rig/Sequences/MainSeq.cs | 4 +++- TBF/UI/ResultsMI/PreviousResultsDlg.Designer.cs | 1 + 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Results/Forms/BatchResultsDlg.Designer.cs b/Results/Forms/BatchResultsDlg.Designer.cs index 2d53950a9..631d06700 100644 --- a/Results/Forms/BatchResultsDlg.Designer.cs +++ b/Results/Forms/BatchResultsDlg.Designer.cs @@ -47,6 +47,7 @@ this.ClientSize = new System.Drawing.Size(1058, 721); this.Controls.Add(this.flowLayoutPanel); this.Name = "BatchResultsDlg"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Results"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BatchResultsDlg_FormClosing); this.Load += new System.EventHandler(this.BatchResultsDlg_Load); diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index 0e9b01277..b6b2c6991 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.31.2014.0")] -[assembly: AssemblyFileVersion("2.31.2014.0")] +[assembly: AssemblyVersion("2.31.2016.0")] +[assembly: AssemblyFileVersion("2.31.2016.0")] diff --git a/TBF/Rig/Output/FileWriters/IperlLogger/Writer.cs b/TBF/Rig/Output/FileWriters/IperlLogger/Writer.cs index 63a895b0f..6733f61ed 100644 --- a/TBF/Rig/Output/FileWriters/IperlLogger/Writer.cs +++ b/TBF/Rig/Output/FileWriters/IperlLogger/Writer.cs @@ -255,7 +255,7 @@ namespace TBF.Rig.Output.FileWriters.IperlLogger /// Save the log file /// logger.WriteLine("[Wasserzähler-Daten]"); - logger.WriteLine(string.Format("PruefPunkte={0}", (maxPruefungsNr > 15) ? 20 : ((maxPruefungsNr > 10) ? 15 : ((maxPruefungsNr > 5) ? 10 : 5)))); + logger.WriteLine(string.Format("PruefPunkte={0}", (maxPruefungsNr > 20) ? 99 : (maxPruefungsNr > 15) ? 20 : ((maxPruefungsNr > 10) ? 15 : ((maxPruefungsNr > 5) ? 10 : 5)))); logger.WriteLine(string.Format("Typ={0}", batch.ProcedureName)); /// iP 020 Q3_4 R160 A XXXX logger.WriteLine(string.Format("MetroKlasse={0}", wmData.MetrologicalClass)); logger.WriteLine(string.Format("Zulassungszeichen={0}", wmData.ApprovalInfo)); diff --git a/TBF/Rig/Sequences/MainSeq.cs b/TBF/Rig/Sequences/MainSeq.cs index c41e76bfd..8a67cf60c 100644 --- a/TBF/Rig/Sequences/MainSeq.cs +++ b/TBF/Rig/Sequences/MainSeq.cs @@ -1347,9 +1347,10 @@ namespace TBF.Rig.Sequences if (!e.Contains(Event.ErrorProcessingResults)) { /// Results successfully saved and printed => update Batch record in Results DB in MySQL + MySql.Data.MySqlClient.MySqlConnection dbConn = null; try { - var dbConn = new MySql.Data.MySqlClient.MySqlConnection(Results.DB.ConnectionString); + dbConn = new MySql.Data.MySqlClient.MySqlConnection(Results.DB.ConnectionString); dbConn.Open(); var cmd = dbConn.CreateCommand(); cmd.CommandText = string.Format("UPDATE `batch` SET `RsltsSent` = '1' WHERE `batch`.`BatchNr` = {0};", ProcessData.BatchRslts.Batch.BatchNr); @@ -1367,6 +1368,7 @@ namespace TBF.Rig.Sequences } catch (Exception exc) { + if (dbConn != null) dbConn.Close(); string msg = string.Format("Unable to update Batch.RsltsSent in local MySQL DB, BatchNr = {0}", ProcessData.BatchRslts.Batch.BatchNr); Bridge.OnError(this, msg); diff --git a/TBF/UI/ResultsMI/PreviousResultsDlg.Designer.cs b/TBF/UI/ResultsMI/PreviousResultsDlg.Designer.cs index f3e59d84c..da556b820 100644 --- a/TBF/UI/ResultsMI/PreviousResultsDlg.Designer.cs +++ b/TBF/UI/ResultsMI/PreviousResultsDlg.Designer.cs @@ -247,6 +247,7 @@ this.MaximizeBox = false; this.Name = "PreviousResultsDlg"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Previous results"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PreviousResultsDlg_FormClosing); this.Load += new System.EventHandler(this.PreviousResultsDlg_Load);