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
+13 -8
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();
}