From 264e5d9cd0bee21572ea7b9de0fd1f84837575ca Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Wed, 22 Jun 2016 16:35:38 +0200 Subject: [PATCH] Displaying previous results: Window size saved and restored correctly, ver. 2.8.310 --- Results/Forms/BatchResultsDlg.Designer.cs | 1 + Results/Forms/BatchResultsDlg.cs | 21 ++++++++++++------- .../BenchControl/DB/SensusOracle/Database.cs | 2 +- TestBenchFramework/Properties/AssemblyInfo.cs | 4 ++-- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Results/Forms/BatchResultsDlg.Designer.cs b/Results/Forms/BatchResultsDlg.Designer.cs index 4a2a80986..2d53950a9 100644 --- a/Results/Forms/BatchResultsDlg.Designer.cs +++ b/Results/Forms/BatchResultsDlg.Designer.cs @@ -49,6 +49,7 @@ this.Name = "BatchResultsDlg"; this.Text = "Results"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BatchResultsDlg_FormClosing); + this.Load += new System.EventHandler(this.BatchResultsDlg_Load); this.ResumeLayout(false); } diff --git a/Results/Forms/BatchResultsDlg.cs b/Results/Forms/BatchResultsDlg.cs index 86e40de2a..f12714872 100644 --- a/Results/Forms/BatchResultsDlg.cs +++ b/Results/Forms/BatchResultsDlg.cs @@ -18,6 +18,7 @@ namespace Results.Forms DateTime lastRedraw; DateTime lastSizeChange; + bool loaded; /// /// Public members @@ -35,7 +36,7 @@ namespace Results.Forms public int PopupResultsWidth; public int PopupResultsHeight; - public Results.BatchResults Results { set { results = value; Redraw(); } } + public Results.BatchResults Results { set { Display(value); } } /// /// Private members @@ -68,17 +69,21 @@ namespace Results.Forms timer.Start(); } + private void BatchResultsDlg_Load(object sender, EventArgs e) + { + if (PopupResultsLeft != 0) Left = PopupResultsLeft; + if (PopupResultsTop != 0) Top = PopupResultsTop; + if (PopupResultsWidth != 0) Width = PopupResultsWidth; + if (PopupResultsHeight != 0) Height = PopupResultsHeight; + + loaded = true; + if (results != null) Redraw(); + } public void Display(Results.BatchResults results) { this.results = results; - - if (PopupResultsLeft != 0) Left = PopupResultsLeft; - if (PopupResultsTop != 0) Top = PopupResultsTop; - if (PopupResultsWidth != 0) Width = PopupResultsWidth; - if (PopupResultsHeight != 0) Height = PopupResultsHeight; - - Redraw(); + if (loaded) Redraw(); } diff --git a/TestBenchFramework/BenchControl/DB/SensusOracle/Database.cs b/TestBenchFramework/BenchControl/DB/SensusOracle/Database.cs index 8a9221d44..792bd03ce 100644 --- a/TestBenchFramework/BenchControl/DB/SensusOracle/Database.cs +++ b/TestBenchFramework/BenchControl/DB/SensusOracle/Database.cs @@ -764,7 +764,7 @@ namespace TBF.BenchControl.DB.SensusOracle { if (transaction != null) transaction.Rollback(); - log.ErrorFormat("Results of batch {0} not writen to ORACLE database: {1}", + log.ErrorFormat("Results of batch {0} not written to ORACLE database: {1}", batch.BatchNr, exc.Message); conn.Close(); diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index d4f74730b..bed123601 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.8.309.1")] -[assembly: AssemblyFileVersion("2.8.309.1")] +[assembly: AssemblyVersion("2.8.310.1")] +[assembly: AssemblyFileVersion("2.8.310.1")]