Displaying previous results: Window size saved and restored correctly, ver. 2.8.310

This commit is contained in:
Milan Hanajik 2016-06-22 16:35:38 +02:00
parent 448dbcdf2f
commit 264e5d9cd0
4 changed files with 17 additions and 11 deletions

View File

@ -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);
}

View File

@ -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();
}

View File

@ -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();

View File

@ -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")]