Preparation for 'Print only good results', version = 1.3.21

This commit is contained in:
Milan Hanajik
2015-04-22 07:11:09 +02:00
parent c72f5652bd
commit 57378a9b0d
5 changed files with 45 additions and 19 deletions
+26 -13
View File
@@ -37,7 +37,8 @@ namespace TBF.Forms
this.cancelButton = new System.Windows.Forms.Button();
this.testerGroupBox = new System.Windows.Forms.GroupBox();
this.testerComboBox = new System.Windows.Forms.ComboBox();
this.printLastCheckBox = new System.Windows.Forms.CheckBox();
this.onlyLastCheckBox = new System.Windows.Forms.CheckBox();
this.onlyGoodCheckBox = new System.Windows.Forms.CheckBox();
this.purchaseOrderGroupBox.SuspendLayout();
this.testerGroupBox.SuspendLayout();
this.SuspendLayout();
@@ -62,7 +63,7 @@ namespace TBF.Forms
//
// printButton
//
this.printButton.Location = new System.Drawing.Point(106, 332);
this.printButton.Location = new System.Drawing.Point(106, 384);
this.printButton.Name = "printButton";
this.printButton.Size = new System.Drawing.Size(144, 64);
this.printButton.TabIndex = 2;
@@ -72,7 +73,7 @@ namespace TBF.Forms
//
// cancelButton
//
this.cancelButton.Location = new System.Drawing.Point(342, 332);
this.cancelButton.Location = new System.Drawing.Point(342, 384);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(144, 64);
this.cancelButton.TabIndex = 3;
@@ -100,20 +101,31 @@ namespace TBF.Forms
//
// printLastCheckBox
//
this.printLastCheckBox.AutoSize = true;
this.printLastCheckBox.Location = new System.Drawing.Point(105, 264);
this.printLastCheckBox.Name = "printLastCheckBox";
this.printLastCheckBox.Size = new System.Drawing.Size(335, 27);
this.printLastCheckBox.TabIndex = 5;
this.printLastCheckBox.Text = "Print only the last measurement";
this.printLastCheckBox.UseVisualStyleBackColor = true;
this.onlyLastCheckBox.AutoSize = true;
this.onlyLastCheckBox.Location = new System.Drawing.Point(106, 317);
this.onlyLastCheckBox.Name = "printLastCheckBox";
this.onlyLastCheckBox.Size = new System.Drawing.Size(335, 27);
this.onlyLastCheckBox.TabIndex = 5;
this.onlyLastCheckBox.Text = "Print only the last measurement";
this.onlyLastCheckBox.UseVisualStyleBackColor = true;
//
// onlyGoodCheckBox
//
this.onlyGoodCheckBox.AutoSize = true;
this.onlyGoodCheckBox.Location = new System.Drawing.Point(106, 270);
this.onlyGoodCheckBox.Name = "onlyGoodCheckBox";
this.onlyGoodCheckBox.Size = new System.Drawing.Size(247, 27);
this.onlyGoodCheckBox.TabIndex = 6;
this.onlyGoodCheckBox.Text = "Print only good results";
this.onlyGoodCheckBox.UseVisualStyleBackColor = true;
//
// PrintOrderForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 23F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(597, 435);
this.Controls.Add(this.printLastCheckBox);
this.ClientSize = new System.Drawing.Size(597, 491);
this.Controls.Add(this.onlyGoodCheckBox);
this.Controls.Add(this.onlyLastCheckBox);
this.Controls.Add(this.testerGroupBox);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.printButton);
@@ -142,6 +154,7 @@ namespace TBF.Forms
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.GroupBox testerGroupBox;
private System.Windows.Forms.ComboBox testerComboBox;
private System.Windows.Forms.CheckBox printLastCheckBox;
private System.Windows.Forms.CheckBox onlyLastCheckBox;
private System.Windows.Forms.CheckBox onlyGoodCheckBox;
}
}
+6 -3
View File
@@ -16,7 +16,8 @@ namespace TBF.Forms
{
public string PurchaseOrder;
public string Tester;
public bool PrintOnlyLastResult;
public bool OnlyGoodResults;
public bool OnlyLastResult;
public PrintOrderForm()
{
@@ -29,7 +30,8 @@ namespace TBF.Forms
Left = (ls.PrintOrderLeft != 0) ? ls.PrintOrderLeft : 200;
Top = (ls.PrintOrderTop != 0) ? ls.PrintOrderTop : 100;
printLastCheckBox.Checked = PrintOnlyLastResult = Program.LocalSettings.PrintOrderOnlyLastResult;
onlyGoodCheckBox.Checked = OnlyGoodResults = Program.LocalSettings.PrintOrderOnlyGoodResult;
onlyLastCheckBox.Checked = OnlyLastResult = Program.LocalSettings.PrintOrderOnlyLastResult;
PrepareOrderCombo(purchaseOrderComboBox);
PrepareTesterCombo(testerComboBox);
@@ -72,7 +74,8 @@ namespace TBF.Forms
PurchaseOrder = purchaseOrderComboBox.Text;
Tester = testerComboBox.Text;
Program.LocalSettings.PrintOrderOnlyLastResult = PrintOnlyLastResult = printLastCheckBox.Checked;
Program.LocalSettings.PrintOrderOnlyGoodResult = OnlyGoodResults = onlyGoodCheckBox.Checked;
Program.LocalSettings.PrintOrderOnlyLastResult = OnlyLastResult = onlyLastCheckBox.Checked;
Program.LocalSettings.PrintOrderLeft = Location.X;
Program.LocalSettings.PrintOrderTop = Location.Y;
+1
View File
@@ -157,6 +157,7 @@ namespace TBF
[XmlIgnore]
public int TesterHistoryCount { get { return (TesterHistory != null) ? TesterHistory.Length : 0; } }
public bool PrintOrderOnlyGoodResult;
public bool PrintOrderOnlyLastResult;
/// Configuration of results
+10 -1
View File
@@ -475,7 +475,16 @@ namespace TBF
return;
}
if (dlg.PrintOnlyLastResult)
if (dlg.OnlyGoodResults)
{
/// Proceed from the end of the list so that items can be removed by index
for (int i = testResults.Count - 1; i >= 0; i--)
{
// TODO: Complete
}
}
if (dlg.OnlyLastResult)
{
/// Remove test results if there exist a later test results for the same sn
/// Proceed from the end of the list so that items can be removed by index
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.3.20.1")]
[assembly: AssemblyFileVersion("1.3.20.1")]
[assembly: AssemblyVersion("1.3.21.1")]
[assembly: AssemblyFileVersion("1.3.21.1")]