Pop-up dialog with previous results tested - fixed - is OK.

This commit is contained in:
Milan Hanajik
2016-06-10 18:21:06 +02:00
parent 147fb6fb30
commit 6fe2e01026
6 changed files with 416 additions and 67 deletions
+39 -39
View File
@@ -28,45 +28,45 @@
/// </summary>
private void InitializeComponent()
{
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.closeButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.AutoScroll = true;
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(971, 897);
this.flowLayoutPanel1.TabIndex = 0;
//
// closeButton
//
this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.closeButton.Location = new System.Drawing.Point(977, 12);
this.closeButton.Name = "closeButton";
this.closeButton.Size = new System.Drawing.Size(103, 37);
this.closeButton.TabIndex = 1;
this.closeButton.Text = "Close";
this.closeButton.UseVisualStyleBackColor = true;
this.closeButton.Click += new System.EventHandler(this.closeButton_Click);
//
// PreviousResultsDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.closeButton;
this.ClientSize = new System.Drawing.Size(1092, 892);
this.Controls.Add(this.closeButton);
this.Controls.Add(this.flowLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.Name = "PreviousResultsDlg";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "Previous results";
this.Load += new System.EventHandler(this.PreviousResultsDlg_Load);
this.ResumeLayout(false);
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.closeButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.AutoScroll = true;
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(1023, 897);
this.flowLayoutPanel1.TabIndex = 0;
//
// closeButton
//
this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.closeButton.Location = new System.Drawing.Point(1029, 12);
this.closeButton.Name = "closeButton";
this.closeButton.Size = new System.Drawing.Size(103, 37);
this.closeButton.TabIndex = 1;
this.closeButton.Text = "Close";
this.closeButton.UseVisualStyleBackColor = true;
this.closeButton.Click += new System.EventHandler(this.closeButton_Click);
//
// PreviousResultsDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.closeButton;
this.ClientSize = new System.Drawing.Size(1144, 892);
this.Controls.Add(this.closeButton);
this.Controls.Add(this.flowLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.Name = "PreviousResultsDlg";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "Previous results";
this.Load += new System.EventHandler(this.PreviousResultsDlg_Load);
this.ResumeLayout(false);
}
@@ -148,7 +148,13 @@ namespace TBF.Forms
public void DoShowResults(object sender, PreviousResultIdEventArgs data)
{
Results.Forms.BatchResultsDlg dlg = new Results.Forms.BatchResultsDlg();
dlg.PopupResultsLeft = Program.LocalSettings.PopupResultsLeft;
dlg.PopupResultsTop = Program.LocalSettings.PopupResultsTop;
dlg.PopupResultsWidth = Program.LocalSettings.PopupResultsWidth;
dlg.PopupResultsHeight = Program.LocalSettings.PopupResultsHeight;
dlg.MetersArrangement = Program.LocalSettings.ResultsConfigMeters;
dlg.TestsArrangement = Program.LocalSettings.ResultsConfigTests;
dlg.NrMetersInOneGroup = Math.Max(1, Program.LocalSettings.ResultsConfigMetersInOneGroup);
@@ -162,9 +168,22 @@ namespace TBF.Forms
if (b.BatchNr == data.BatchNr)
{
dlg.Results = Results.BatchResults.FromBatch(b);
dlg.ShowDialog();
break;
}
}
if (dlg.PopupResultsLeft != Program.LocalSettings.PopupResultsLeft ||
dlg.PopupResultsTop != Program.LocalSettings.PopupResultsTop ||
dlg.PopupResultsWidth != Program.LocalSettings.PopupResultsWidth ||
dlg.PopupResultsHeight != Program.LocalSettings.PopupResultsHeight)
{
Program.LocalSettings.PopupResultsLeft = dlg.PopupResultsLeft;
Program.LocalSettings.PopupResultsTop = dlg.PopupResultsTop;
Program.LocalSettings.PopupResultsWidth = dlg.PopupResultsWidth;
Program.LocalSettings.PopupResultsHeight = dlg.PopupResultsHeight;
Program.LocalSettings.Save();
}
}
+7
View File
@@ -64,6 +64,13 @@ namespace TBF
public int ComponentsDlgWidth;
public int ComponentsDlgHeight;
/// Pop-up results
public int PopupResultsLeft;
public int PopupResultsTop;
public int PopupResultsWidth;
public int PopupResultsHeight;
[XmlArrayAttribute("ComponentsColumnWidths")]
public int[] ComponentsColumnWidths;
[XmlIgnore]