PrintOrder: Print only the last results, version = 1.3.18

This commit is contained in:
Milan Hanajik
2015-04-21 07:34:41 +02:00
parent d1987d968e
commit 7ff2a98ccf
5 changed files with 61 additions and 5 deletions
+17 -3
View File
@@ -37,6 +37,7 @@ 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.purchaseOrderGroupBox.SuspendLayout();
this.testerGroupBox.SuspendLayout();
this.SuspendLayout();
@@ -61,7 +62,7 @@ namespace TBF.Forms
//
// printButton
//
this.printButton.Location = new System.Drawing.Point(106, 269);
this.printButton.Location = new System.Drawing.Point(106, 332);
this.printButton.Name = "printButton";
this.printButton.Size = new System.Drawing.Size(144, 64);
this.printButton.TabIndex = 2;
@@ -71,7 +72,7 @@ namespace TBF.Forms
//
// cancelButton
//
this.cancelButton.Location = new System.Drawing.Point(342, 269);
this.cancelButton.Location = new System.Drawing.Point(342, 332);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(144, 64);
this.cancelButton.TabIndex = 3;
@@ -97,11 +98,22 @@ namespace TBF.Forms
this.testerComboBox.Size = new System.Drawing.Size(380, 31);
this.testerComboBox.TabIndex = 0;
//
// 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;
//
// PrintOrderForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 23F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(597, 380);
this.ClientSize = new System.Drawing.Size(597, 435);
this.Controls.Add(this.printLastCheckBox);
this.Controls.Add(this.testerGroupBox);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.printButton);
@@ -118,6 +130,7 @@ namespace TBF.Forms
this.purchaseOrderGroupBox.ResumeLayout(false);
this.testerGroupBox.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
@@ -129,5 +142,6 @@ 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;
}
}
@@ -16,6 +16,7 @@ namespace TBF.Forms
{
public string PurchaseOrder;
public string Tester;
public bool PrintOnlyLastResult;
public PrintOrderForm()
{
@@ -28,6 +29,8 @@ namespace TBF.Forms
Left = (ls.PrintOrderLeft != 0) ? ls.PrintOrderLeft : 200;
Top = (ls.PrintOrderTop != 0) ? ls.PrintOrderTop : 100;
printLastCheckBox.Checked = PrintOnlyLastResult = Program.LocalSettings.PrintOrderOnlyLastResult;
PrepareOrderCombo(purchaseOrderComboBox);
PrepareTesterCombo(testerComboBox);
}
@@ -69,6 +72,8 @@ namespace TBF.Forms
PurchaseOrder = purchaseOrderComboBox.Text;
Tester = testerComboBox.Text;
Program.LocalSettings.PrintOrderOnlyLastResult = PrintOnlyLastResult = printLastCheckBox.Checked;
Program.LocalSettings.PrintOrderLeft = Location.X;
Program.LocalSettings.PrintOrderTop = Location.Y;
bool b1 = Program.LocalSettings.UpdateHistory(testerComboBox.Text,