All Output.Printers components : string PrinterName parameter specifies printer to be used.

This commit is contained in:
Milan Hanajik 2023-03-13 15:31:39 +01:00
parent 08c4541914
commit 799e5be919
28 changed files with 738 additions and 342 deletions

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2017-2020 Sensus Slovensko a.s.
/// Copyright (c) 2017-2023 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -206,7 +206,9 @@ namespace TBF.Rig.Output.Printers.Enhanced
for (int i = 1; i <= printerCfg.NrOfCopies; i++)
{
string docName = string.Format(((printerCfg.NrOfCopies == 1) ? "{0}" : "{0}-{1}"), documentName, i);
new Results.Output.Printers.Enhanced.EnhancedPrintDocument(batch, cfg, docName).Print();
var pd = new Results.Output.Printers.Enhanced.EnhancedPrintDocument(batch, cfg, docName);
if (!string.IsNullOrEmpty(printerCfg.PrinterName)) pd.PrinterSettings.PrinterName = printerCfg.PrinterName;
pd.Print();
}
}
}

View File

@ -1,7 +1,8 @@
///
/// Copyright (c) 2017-2020 Sensus Slovensko a.s.
/// Copyright (c) 2017-2023 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using System.Drawing.Printing;
using System.Xml.Serialization;
using Common;
using TBF.Rig.Generic;
@ -21,7 +22,8 @@ namespace TBF.Rig.Output.Printers.Enhanced
///
/// Serialized parameters
///
public PageOrientation PageOrientation;
public string PrinterName;
public PageOrientation PageOrientation;
public string Template;
public int TopMargin;
public int BottomMargin;

View File

@ -33,7 +33,6 @@ namespace TBF.Rig.Output.Printers.Enhanced
{
this.nameTextBox = new System.Windows.Forms.TextBox();
this.nameLabel = new System.Windows.Forms.Label();
this.classNameLabel = new System.Windows.Forms.Label();
this.supressPrintingCheckBox = new System.Windows.Forms.CheckBox();
this.orientationLabel = new System.Windows.Forms.Label();
this.orientationComboBox = new System.Windows.Forms.ComboBox();
@ -82,12 +81,16 @@ namespace TBF.Rig.Output.Printers.Enhanced
this.label5 = new System.Windows.Forms.Label();
this.barcodeHeightTextBox = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.printerLabel = new System.Windows.Forms.Label();
this.selectPrinterButton = new System.Windows.Forms.Button();
this.printerComboBox = new System.Windows.Forms.ComboBox();
this.classNameLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(142, 39);
this.nameTextBox.Location = new System.Drawing.Point(142, 20);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(218, 20);
this.nameTextBox.TabIndex = 2;
@ -95,21 +98,12 @@ namespace TBF.Rig.Output.Printers.Enhanced
// nameLabel
//
this.nameLabel.AutoSize = true;
this.nameLabel.Location = new System.Drawing.Point(16, 42);
this.nameLabel.Location = new System.Drawing.Point(16, 23);
this.nameLabel.Name = "nameLabel";
this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.TabIndex = 1;
this.nameLabel.Text = "Name";
//
// classNameLabel
//
this.classNameLabel.AutoSize = true;
this.classNameLabel.Location = new System.Drawing.Point(139, 16);
this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
this.classNameLabel.TabIndex = 0;
this.classNameLabel.Text = "ComonentName";
//
// supressPrintingCheckBox
//
this.supressPrintingCheckBox.AutoSize = true;
@ -124,7 +118,7 @@ namespace TBF.Rig.Output.Printers.Enhanced
// orientationLabel
//
this.orientationLabel.AutoSize = true;
this.orientationLabel.Location = new System.Drawing.Point(16, 86);
this.orientationLabel.Location = new System.Drawing.Point(16, 87);
this.orientationLabel.Name = "orientationLabel";
this.orientationLabel.Size = new System.Drawing.Size(84, 13);
this.orientationLabel.TabIndex = 5;
@ -134,7 +128,7 @@ namespace TBF.Rig.Output.Printers.Enhanced
//
this.orientationComboBox.Enabled = false;
this.orientationComboBox.FormattingEnabled = true;
this.orientationComboBox.Location = new System.Drawing.Point(142, 83);
this.orientationComboBox.Location = new System.Drawing.Point(142, 84);
this.orientationComboBox.Name = "orientationComboBox";
this.orientationComboBox.Size = new System.Drawing.Size(146, 21);
this.orientationComboBox.TabIndex = 6;
@ -469,7 +463,7 @@ namespace TBF.Rig.Output.Printers.Enhanced
// templateTextBox
//
this.templateTextBox.Enabled = false;
this.templateTextBox.Location = new System.Drawing.Point(142, 61);
this.templateTextBox.Location = new System.Drawing.Point(142, 63);
this.templateTextBox.Name = "templateTextBox";
this.templateTextBox.Size = new System.Drawing.Size(218, 20);
this.templateTextBox.TabIndex = 4;
@ -477,7 +471,7 @@ namespace TBF.Rig.Output.Printers.Enhanced
// templateLabel
//
this.templateLabel.AutoSize = true;
this.templateLabel.Location = new System.Drawing.Point(16, 64);
this.templateLabel.Location = new System.Drawing.Point(16, 66);
this.templateLabel.Name = "templateLabel";
this.templateLabel.Size = new System.Drawing.Size(51, 13);
this.templateLabel.TabIndex = 3;
@ -486,7 +480,7 @@ namespace TBF.Rig.Output.Printers.Enhanced
// nrOfCopiesTextBox
//
this.nrOfCopiesTextBox.Enabled = false;
this.nrOfCopiesTextBox.Location = new System.Drawing.Point(340, 83);
this.nrOfCopiesTextBox.Location = new System.Drawing.Point(340, 84);
this.nrOfCopiesTextBox.Name = "nrOfCopiesTextBox";
this.nrOfCopiesTextBox.Size = new System.Drawing.Size(20, 20);
this.nrOfCopiesTextBox.TabIndex = 43;
@ -494,7 +488,7 @@ namespace TBF.Rig.Output.Printers.Enhanced
// nrOfCopiesLabel
//
this.nrOfCopiesLabel.AutoSize = true;
this.nrOfCopiesLabel.Location = new System.Drawing.Point(291, 86);
this.nrOfCopiesLabel.Location = new System.Drawing.Point(291, 87);
this.nrOfCopiesLabel.Name = "nrOfCopiesLabel";
this.nrOfCopiesLabel.Size = new System.Drawing.Size(48, 13);
this.nrOfCopiesLabel.TabIndex = 44;
@ -552,10 +546,52 @@ namespace TBF.Rig.Output.Printers.Enhanced
this.label6.TabIndex = 18;
this.label6.Text = "Height";
//
// printerLabel
//
this.printerLabel.AutoSize = true;
this.printerLabel.Location = new System.Drawing.Point(16, 44);
this.printerLabel.Name = "printerLabel";
this.printerLabel.Size = new System.Drawing.Size(37, 13);
this.printerLabel.TabIndex = 47;
this.printerLabel.Text = "Printer";
//
// selectPrinterButton
//
this.selectPrinterButton.Enabled = false;
this.selectPrinterButton.Location = new System.Drawing.Point(90, 40);
this.selectPrinterButton.Name = "selectPrinterButton";
this.selectPrinterButton.Size = new System.Drawing.Size(50, 22);
this.selectPrinterButton.TabIndex = 49;
this.selectPrinterButton.Text = "Select";
this.selectPrinterButton.UseVisualStyleBackColor = true;
this.selectPrinterButton.Click += new System.EventHandler(this.selectPrinterButton_Click);
//
// printerComboBox
//
this.printerComboBox.Enabled = false;
this.printerComboBox.FormattingEnabled = true;
this.printerComboBox.Location = new System.Drawing.Point(142, 41);
this.printerComboBox.Name = "printerComboBox";
this.printerComboBox.Size = new System.Drawing.Size(218, 21);
this.printerComboBox.TabIndex = 50;
//
// classNameLabel
//
this.classNameLabel.AutoSize = true;
this.classNameLabel.Location = new System.Drawing.Point(139, 4);
this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Size = new System.Drawing.Size(117, 13);
this.classNameLabel.TabIndex = 51;
this.classNameLabel.Text = "Component class name";
//
// PrinterCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.classNameLabel);
this.Controls.Add(this.printerComboBox);
this.Controls.Add(this.selectPrinterButton);
this.Controls.Add(this.printerLabel);
this.Controls.Add(this.barcodeLabel);
this.Controls.Add(this.barcodeTypeComboBox);
this.Controls.Add(this.label6);
@ -606,7 +642,6 @@ namespace TBF.Rig.Output.Printers.Enhanced
this.Controls.Add(this.supressPrintingCheckBox);
this.Controls.Add(this.nameTextBox);
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.classNameLabel);
this.Name = "PrinterCfgCtrl";
this.Size = new System.Drawing.Size(400, 350);
this.Load += new System.EventHandler(this.PrinterCfgCtrl_Load);
@ -618,8 +653,7 @@ namespace TBF.Rig.Output.Printers.Enhanced
#endregion
private System.Windows.Forms.TextBox nameTextBox;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label classNameLabel;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.CheckBox supressPrintingCheckBox;
private System.Windows.Forms.Label orientationLabel;
private System.Windows.Forms.ComboBox orientationComboBox;
@ -668,5 +702,9 @@ namespace TBF.Rig.Output.Printers.Enhanced
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox barcodeHeightTextBox;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label printerLabel;
private System.Windows.Forms.Button selectPrinterButton;
private System.Windows.Forms.ComboBox printerComboBox;
private System.Windows.Forms.Label classNameLabel;
}
}

View File

@ -1,12 +1,11 @@
///
/// Copyright (c) 2017-2020 Sensus Slovensko a.s.
/// Copyright (c) 2017-2023 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Drawing.Printing;
using System.Windows.Forms;
using log4net;
using Common;
using Config.Entities;
using Results.Output.Printers;
using TBF.Rig.Configs;
using TBF.Rig.Generic;
@ -62,6 +61,9 @@ namespace TBF.Rig.Output.Printers.Enhanced
{
for (Culture s = 0; s < Culture.Count; s++) cultureComboBox.Items.Add(s.ToString());
printerComboBox.Items.Add(Strings.default_printer);
foreach (var p in PrinterSettings.InstalledPrinters) printerComboBox.Items.Add(p);
header = config.Header;
commonItems = config.CommonItems;
testItems = config.SelectedItems;
@ -72,7 +74,10 @@ namespace TBF.Rig.Output.Printers.Enhanced
void Localize()
{
classNameLabel.Text = config.ClassName;
nameLabel.Text = Strings.Name;
printerLabel.Text = Strings.Printer;
selectPrinterButton.Text = "Select";
cultureLabel.Text = "Culture";
headerButton.Text = Strings.Header;
commonItemsButton.Text = "Common items";
@ -87,8 +92,8 @@ namespace TBF.Rig.Output.Printers.Enhanced
void Redraw()
{
if (config == null) return; /// Control was not loaded, settings were not changed
classNameLabel.Text = config.Factory.ClassName;
nameTextBox.Text = config.Name;
printerComboBox.Text = string.IsNullOrEmpty(config.PrinterName) ? Strings.default_printer : config.PrinterName;
templateTextBox.Text = config.Template;
orientationComboBox.Text = config.PageOrientation.ToString();
topMarginTextBox.Text = config.TopMargin.ToString();
@ -130,6 +135,8 @@ namespace TBF.Rig.Output.Printers.Enhanced
public void Unlock()
{
nameTextBox.Enabled = true;
printerComboBox.Enabled = true;
selectPrinterButton.Enabled = true;
templateTextBox.Enabled = true;
orientationComboBox.Enabled = true;
topMarginTextBox.Enabled = true;
@ -262,6 +269,13 @@ namespace TBF.Rig.Output.Printers.Enhanced
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
}
string newPrinter = (printerComboBox.Text == Strings.default_printer) ? string.Empty : printerComboBox.Text;
if (config.PrinterName != newPrinter)
{
config.PrinterName = newPrinter;
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
}
if (config.PageOrientation != GetOrientation(orientationComboBox.Text))
{
config.PageOrientation = GetOrientation(orientationComboBox.Text);
@ -404,5 +418,14 @@ namespace TBF.Rig.Output.Printers.Enhanced
public void StopResponseHandler() { }
#endregion Configuration Change Handling
private void selectPrinterButton_Click(object sender, EventArgs e)
{
PrintDialog dlg = new PrintDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
printerComboBox.Text = dlg.PrinterSettings.PrinterName;
}
}
}
}

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2020 Sensus Slovensko a.s.
/// Copyright (c) 2015-2023 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -163,8 +163,10 @@ namespace TBF.Rig.Output.Printers.Label
for (int i = 1; i <= printerCfg.NrOfCopies; i++)
{
string docNameEx = string.Format(((printerCfg.NrOfCopies == 1) ? "{0}" : "{0}_{1}"), documentName, i);
new Results.Output.Printers.Label.LabelPrintDocument(batch, cfg, wm, docNameEx).Print();
}
var pd = new Results.Output.Printers.Label.LabelPrintDocument(batch, cfg, wm, docNameEx);
if (!string.IsNullOrEmpty(printerCfg.PrinterName)) pd.PrinterSettings.PrinterName = printerCfg.PrinterName;
pd.Print();
}
}
}
}

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2020 Sensus Slovensko a.s.
/// Copyright (c) 2015-2023 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -20,7 +20,8 @@ namespace TBF.Rig.Output.Printers.Label
///
/// Serialized parameters
///
public string Template; /// Full path to a 'png' file
public string PrinterName;
public string Template; /// Full path to a 'png' file
public PageOrientation PageOrientation;
public int PaperWidth; /// In 0,254 mm = 1/100 in = 100dpi pixels count
public int PaperHeight; /// In 0,254 mm = 1/100 in = 100dpi pixels count

View File

@ -64,20 +64,23 @@ namespace TBF.Rig.Output.Printers.Label
this.barcodeHeightLabel = new System.Windows.Forms.Label();
this.barcodeTypeComboBox = new System.Windows.Forms.ComboBox();
this.barcodeLabel = new System.Windows.Forms.Label();
this.printerComboBox = new System.Windows.Forms.ComboBox();
this.selectPrinterButton = new System.Windows.Forms.Button();
this.printerLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(122, 35);
this.nameTextBox.Location = new System.Drawing.Point(122, 41);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
this.nameTextBox.Size = new System.Drawing.Size(228, 20);
this.nameTextBox.TabIndex = 2;
//
// nameLabel
//
this.nameLabel.AutoSize = true;
this.nameLabel.Location = new System.Drawing.Point(8, 38);
this.nameLabel.Location = new System.Drawing.Point(8, 44);
this.nameLabel.Name = "nameLabel";
this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.TabIndex = 1;
@ -86,7 +89,7 @@ namespace TBF.Rig.Output.Printers.Label
// classNameLabel
//
this.classNameLabel.AutoSize = true;
this.classNameLabel.Location = new System.Drawing.Point(119, 11);
this.classNameLabel.Location = new System.Drawing.Point(119, 17);
this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Size = new System.Drawing.Size(61, 13);
this.classNameLabel.TabIndex = 0;
@ -95,7 +98,7 @@ namespace TBF.Rig.Output.Printers.Label
// orientationLabel
//
this.orientationLabel.AutoSize = true;
this.orientationLabel.Location = new System.Drawing.Point(8, 84);
this.orientationLabel.Location = new System.Drawing.Point(8, 114);
this.orientationLabel.Name = "orientationLabel";
this.orientationLabel.Size = new System.Drawing.Size(84, 13);
this.orientationLabel.TabIndex = 3;
@ -105,7 +108,7 @@ namespace TBF.Rig.Output.Printers.Label
//
this.orientationComboBox.Enabled = false;
this.orientationComboBox.FormattingEnabled = true;
this.orientationComboBox.Location = new System.Drawing.Point(122, 81);
this.orientationComboBox.Location = new System.Drawing.Point(122, 111);
this.orientationComboBox.Name = "orientationComboBox";
this.orientationComboBox.Size = new System.Drawing.Size(130, 21);
this.orientationComboBox.TabIndex = 4;
@ -113,7 +116,7 @@ namespace TBF.Rig.Output.Printers.Label
// templateTextBox
//
this.templateTextBox.Enabled = false;
this.templateTextBox.Location = new System.Drawing.Point(122, 58);
this.templateTextBox.Location = new System.Drawing.Point(122, 88);
this.templateTextBox.Name = "templateTextBox";
this.templateTextBox.Size = new System.Drawing.Size(228, 20);
this.templateTextBox.TabIndex = 10;
@ -121,7 +124,7 @@ namespace TBF.Rig.Output.Printers.Label
// templateLabel
//
this.templateLabel.AutoSize = true;
this.templateLabel.Location = new System.Drawing.Point(8, 61);
this.templateLabel.Location = new System.Drawing.Point(8, 91);
this.templateLabel.Name = "templateLabel";
this.templateLabel.Size = new System.Drawing.Size(67, 13);
this.templateLabel.TabIndex = 9;
@ -130,7 +133,7 @@ namespace TBF.Rig.Output.Printers.Label
// paperWidthTextBox
//
this.paperWidthTextBox.Enabled = false;
this.paperWidthTextBox.Location = new System.Drawing.Point(122, 105);
this.paperWidthTextBox.Location = new System.Drawing.Point(122, 135);
this.paperWidthTextBox.Name = "paperWidthTextBox";
this.paperWidthTextBox.Size = new System.Drawing.Size(51, 20);
this.paperWidthTextBox.TabIndex = 6;
@ -138,7 +141,7 @@ namespace TBF.Rig.Output.Printers.Label
// paperWidthLabel
//
this.paperWidthLabel.AutoSize = true;
this.paperWidthLabel.Location = new System.Drawing.Point(8, 108);
this.paperWidthLabel.Location = new System.Drawing.Point(8, 138);
this.paperWidthLabel.Name = "paperWidthLabel";
this.paperWidthLabel.Size = new System.Drawing.Size(103, 13);
this.paperWidthLabel.TabIndex = 5;
@ -147,7 +150,7 @@ namespace TBF.Rig.Output.Printers.Label
// paperHeightTextBox
//
this.paperHeightTextBox.Enabled = false;
this.paperHeightTextBox.Location = new System.Drawing.Point(176, 105);
this.paperHeightTextBox.Location = new System.Drawing.Point(176, 135);
this.paperHeightTextBox.Name = "paperHeightTextBox";
this.paperHeightTextBox.Size = new System.Drawing.Size(51, 20);
this.paperHeightTextBox.TabIndex = 8;
@ -156,7 +159,7 @@ namespace TBF.Rig.Output.Printers.Label
//
this.italicCheckBox.AutoSize = true;
this.italicCheckBox.Enabled = false;
this.italicCheckBox.Location = new System.Drawing.Point(335, 134);
this.italicCheckBox.Location = new System.Drawing.Point(335, 164);
this.italicCheckBox.Name = "italicCheckBox";
this.italicCheckBox.Size = new System.Drawing.Size(15, 14);
this.italicCheckBox.TabIndex = 47;
@ -166,7 +169,7 @@ namespace TBF.Rig.Output.Printers.Label
//
this.boldCheckBox.AutoSize = true;
this.boldCheckBox.Enabled = false;
this.boldCheckBox.Location = new System.Drawing.Point(307, 134);
this.boldCheckBox.Location = new System.Drawing.Point(307, 164);
this.boldCheckBox.Name = "boldCheckBox";
this.boldCheckBox.Size = new System.Drawing.Size(15, 14);
this.boldCheckBox.TabIndex = 46;
@ -175,7 +178,7 @@ namespace TBF.Rig.Output.Printers.Label
// fontSizeTextBox
//
this.fontSizeTextBox.Enabled = false;
this.fontSizeTextBox.Location = new System.Drawing.Point(259, 128);
this.fontSizeTextBox.Location = new System.Drawing.Point(259, 158);
this.fontSizeTextBox.Name = "fontSizeTextBox";
this.fontSizeTextBox.Size = new System.Drawing.Size(29, 20);
this.fontSizeTextBox.TabIndex = 45;
@ -184,7 +187,7 @@ namespace TBF.Rig.Output.Printers.Label
//
this.fontFamilyComboBox.Enabled = false;
this.fontFamilyComboBox.FormattingEnabled = true;
this.fontFamilyComboBox.Location = new System.Drawing.Point(122, 128);
this.fontFamilyComboBox.Location = new System.Drawing.Point(122, 158);
this.fontFamilyComboBox.Name = "fontFamilyComboBox";
this.fontFamilyComboBox.Size = new System.Drawing.Size(130, 21);
this.fontFamilyComboBox.TabIndex = 44;
@ -192,7 +195,7 @@ namespace TBF.Rig.Output.Printers.Label
// bodyFontLabel
//
this.bodyFontLabel.AutoSize = true;
this.bodyFontLabel.Location = new System.Drawing.Point(8, 131);
this.bodyFontLabel.Location = new System.Drawing.Point(8, 161);
this.bodyFontLabel.Name = "bodyFontLabel";
this.bodyFontLabel.Size = new System.Drawing.Size(106, 13);
this.bodyFontLabel.TabIndex = 43;
@ -202,7 +205,7 @@ namespace TBF.Rig.Output.Printers.Label
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label2.Location = new System.Drawing.Point(331, 119);
this.label2.Location = new System.Drawing.Point(331, 149);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(24, 13);
this.label2.TabIndex = 49;
@ -212,7 +215,7 @@ namespace TBF.Rig.Output.Printers.Label
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label1.Location = new System.Drawing.Point(297, 119);
this.label1.Location = new System.Drawing.Point(297, 149);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 13);
this.label1.TabIndex = 48;
@ -221,7 +224,7 @@ namespace TBF.Rig.Output.Printers.Label
// itemsToPrintButton
//
this.itemsToPrintButton.Enabled = false;
this.itemsToPrintButton.Location = new System.Drawing.Point(259, 85);
this.itemsToPrintButton.Location = new System.Drawing.Point(259, 115);
this.itemsToPrintButton.Name = "itemsToPrintButton";
this.itemsToPrintButton.Size = new System.Drawing.Size(91, 30);
this.itemsToPrintButton.TabIndex = 50;
@ -232,7 +235,7 @@ namespace TBF.Rig.Output.Printers.Label
// nrOfCopiesLabel
//
this.nrOfCopiesLabel.AutoSize = true;
this.nrOfCopiesLabel.Location = new System.Drawing.Point(8, 179);
this.nrOfCopiesLabel.Location = new System.Drawing.Point(8, 209);
this.nrOfCopiesLabel.Name = "nrOfCopiesLabel";
this.nrOfCopiesLabel.Size = new System.Drawing.Size(90, 13);
this.nrOfCopiesLabel.TabIndex = 52;
@ -241,7 +244,7 @@ namespace TBF.Rig.Output.Printers.Label
// nrOfCopiesTextBox
//
this.nrOfCopiesTextBox.Enabled = false;
this.nrOfCopiesTextBox.Location = new System.Drawing.Point(122, 176);
this.nrOfCopiesTextBox.Location = new System.Drawing.Point(122, 206);
this.nrOfCopiesTextBox.Name = "nrOfCopiesTextBox";
this.nrOfCopiesTextBox.Size = new System.Drawing.Size(51, 20);
this.nrOfCopiesTextBox.TabIndex = 51;
@ -250,7 +253,7 @@ namespace TBF.Rig.Output.Printers.Label
//
this.cultureComboBox.Enabled = false;
this.cultureComboBox.FormattingEnabled = true;
this.cultureComboBox.Location = new System.Drawing.Point(122, 152);
this.cultureComboBox.Location = new System.Drawing.Point(122, 182);
this.cultureComboBox.Name = "cultureComboBox";
this.cultureComboBox.Size = new System.Drawing.Size(228, 21);
this.cultureComboBox.TabIndex = 54;
@ -258,7 +261,7 @@ namespace TBF.Rig.Output.Printers.Label
// cultureLabel
//
this.cultureLabel.AutoSize = true;
this.cultureLabel.Location = new System.Drawing.Point(8, 155);
this.cultureLabel.Location = new System.Drawing.Point(8, 185);
this.cultureLabel.Name = "cultureLabel";
this.cultureLabel.Size = new System.Drawing.Size(42, 13);
this.cultureLabel.TabIndex = 53;
@ -268,7 +271,7 @@ namespace TBF.Rig.Output.Printers.Label
//
this.goodOnlyCheckBox.AutoSize = true;
this.goodOnlyCheckBox.Enabled = false;
this.goodOnlyCheckBox.Location = new System.Drawing.Point(245, 179);
this.goodOnlyCheckBox.Location = new System.Drawing.Point(245, 209);
this.goodOnlyCheckBox.Name = "goodOnlyCheckBox";
this.goodOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
this.goodOnlyCheckBox.TabIndex = 55;
@ -278,7 +281,7 @@ namespace TBF.Rig.Output.Printers.Label
// barcodeLeftLabel
//
this.barcodeLeftLabel.AutoSize = true;
this.barcodeLeftLabel.Location = new System.Drawing.Point(97, 250);
this.barcodeLeftLabel.Location = new System.Drawing.Point(97, 257);
this.barcodeLeftLabel.Name = "barcodeLeftLabel";
this.barcodeLeftLabel.Size = new System.Drawing.Size(25, 13);
this.barcodeLeftLabel.TabIndex = 9;
@ -287,7 +290,7 @@ namespace TBF.Rig.Output.Printers.Label
// barcodeLeftTextBox
//
this.barcodeLeftTextBox.Enabled = false;
this.barcodeLeftTextBox.Location = new System.Drawing.Point(122, 246);
this.barcodeLeftTextBox.Location = new System.Drawing.Point(122, 253);
this.barcodeLeftTextBox.Name = "barcodeLeftTextBox";
this.barcodeLeftTextBox.Size = new System.Drawing.Size(31, 20);
this.barcodeLeftTextBox.TabIndex = 10;
@ -295,7 +298,7 @@ namespace TBF.Rig.Output.Printers.Label
// barcodeTopTextBox
//
this.barcodeTopTextBox.Enabled = false;
this.barcodeTopTextBox.Location = new System.Drawing.Point(181, 246);
this.barcodeTopTextBox.Location = new System.Drawing.Point(181, 253);
this.barcodeTopTextBox.Name = "barcodeTopTextBox";
this.barcodeTopTextBox.Size = new System.Drawing.Size(31, 20);
this.barcodeTopTextBox.TabIndex = 11;
@ -303,7 +306,7 @@ namespace TBF.Rig.Output.Printers.Label
// barcodeTopLabel
//
this.barcodeTopLabel.AutoSize = true;
this.barcodeTopLabel.Location = new System.Drawing.Point(155, 250);
this.barcodeTopLabel.Location = new System.Drawing.Point(155, 257);
this.barcodeTopLabel.Name = "barcodeTopLabel";
this.barcodeTopLabel.Size = new System.Drawing.Size(26, 13);
this.barcodeTopLabel.TabIndex = 13;
@ -312,7 +315,7 @@ namespace TBF.Rig.Output.Printers.Label
// barcodeWidthTextBox
//
this.barcodeWidthTextBox.Enabled = false;
this.barcodeWidthTextBox.Location = new System.Drawing.Point(249, 246);
this.barcodeWidthTextBox.Location = new System.Drawing.Point(249, 253);
this.barcodeWidthTextBox.Name = "barcodeWidthTextBox";
this.barcodeWidthTextBox.Size = new System.Drawing.Size(31, 20);
this.barcodeWidthTextBox.TabIndex = 14;
@ -320,7 +323,7 @@ namespace TBF.Rig.Output.Printers.Label
// barcodeWidthLabel
//
this.barcodeWidthLabel.AutoSize = true;
this.barcodeWidthLabel.Location = new System.Drawing.Point(214, 250);
this.barcodeWidthLabel.Location = new System.Drawing.Point(214, 257);
this.barcodeWidthLabel.Name = "barcodeWidthLabel";
this.barcodeWidthLabel.Size = new System.Drawing.Size(35, 13);
this.barcodeWidthLabel.TabIndex = 15;
@ -329,7 +332,7 @@ namespace TBF.Rig.Output.Printers.Label
// barcodeHeightTextBox
//
this.barcodeHeightTextBox.Enabled = false;
this.barcodeHeightTextBox.Location = new System.Drawing.Point(320, 246);
this.barcodeHeightTextBox.Location = new System.Drawing.Point(320, 253);
this.barcodeHeightTextBox.Name = "barcodeHeightTextBox";
this.barcodeHeightTextBox.Size = new System.Drawing.Size(30, 20);
this.barcodeHeightTextBox.TabIndex = 17;
@ -337,7 +340,7 @@ namespace TBF.Rig.Output.Printers.Label
// barcodeHeightLabel
//
this.barcodeHeightLabel.AutoSize = true;
this.barcodeHeightLabel.Location = new System.Drawing.Point(282, 250);
this.barcodeHeightLabel.Location = new System.Drawing.Point(282, 257);
this.barcodeHeightLabel.Name = "barcodeHeightLabel";
this.barcodeHeightLabel.Size = new System.Drawing.Size(38, 13);
this.barcodeHeightLabel.TabIndex = 18;
@ -347,7 +350,7 @@ namespace TBF.Rig.Output.Printers.Label
//
this.barcodeTypeComboBox.Enabled = false;
this.barcodeTypeComboBox.FormattingEnabled = true;
this.barcodeTypeComboBox.Location = new System.Drawing.Point(122, 222);
this.barcodeTypeComboBox.Location = new System.Drawing.Point(122, 229);
this.barcodeTypeComboBox.Name = "barcodeTypeComboBox";
this.barcodeTypeComboBox.Size = new System.Drawing.Size(228, 21);
this.barcodeTypeComboBox.TabIndex = 19;
@ -355,16 +358,48 @@ namespace TBF.Rig.Output.Printers.Label
// barcodeLabel
//
this.barcodeLabel.AutoSize = true;
this.barcodeLabel.Location = new System.Drawing.Point(8, 225);
this.barcodeLabel.Location = new System.Drawing.Point(8, 232);
this.barcodeLabel.Name = "barcodeLabel";
this.barcodeLabel.Size = new System.Drawing.Size(88, 13);
this.barcodeLabel.TabIndex = 56;
this.barcodeLabel.Text = "Barcode with s/n";
//
// printerComboBox
//
this.printerComboBox.Enabled = false;
this.printerComboBox.FormattingEnabled = true;
this.printerComboBox.Location = new System.Drawing.Point(122, 64);
this.printerComboBox.Name = "printerComboBox";
this.printerComboBox.Size = new System.Drawing.Size(228, 21);
this.printerComboBox.TabIndex = 59;
//
// selectPrinterButton
//
this.selectPrinterButton.Enabled = false;
this.selectPrinterButton.Location = new System.Drawing.Point(70, 63);
this.selectPrinterButton.Name = "selectPrinterButton";
this.selectPrinterButton.Size = new System.Drawing.Size(50, 22);
this.selectPrinterButton.TabIndex = 58;
this.selectPrinterButton.Text = "Select";
this.selectPrinterButton.UseVisualStyleBackColor = true;
this.selectPrinterButton.Click += new System.EventHandler(this.selectPrinterButton_Click);
//
// printerLabel
//
this.printerLabel.AutoSize = true;
this.printerLabel.Location = new System.Drawing.Point(8, 67);
this.printerLabel.Name = "printerLabel";
this.printerLabel.Size = new System.Drawing.Size(37, 13);
this.printerLabel.TabIndex = 57;
this.printerLabel.Text = "Printer";
//
// PrinterCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.printerComboBox);
this.Controls.Add(this.selectPrinterButton);
this.Controls.Add(this.printerLabel);
this.Controls.Add(this.barcodeLabel);
this.Controls.Add(this.barcodeTypeComboBox);
this.Controls.Add(this.barcodeHeightLabel);
@ -441,5 +476,8 @@ namespace TBF.Rig.Output.Printers.Label
private System.Windows.Forms.Label barcodeHeightLabel;
private System.Windows.Forms.ComboBox barcodeTypeComboBox;
private System.Windows.Forms.Label barcodeLabel;
private System.Windows.Forms.ComboBox printerComboBox;
private System.Windows.Forms.Button selectPrinterButton;
private System.Windows.Forms.Label printerLabel;
}
}

View File

@ -1,14 +1,14 @@
///
/// Copyright (c) 2015-2020 Sensus Slovensko a.s.
/// Copyright (c) 2015-2023 Sensus Slovensko a.s.
///
using System;
using System.Drawing;
using System.Drawing.Printing;
using System.IO;
using System.Windows.Forms;
using log4net;
using Common;
using Config.Entities;
using Results.Output.Printers;
using TBF.Resources;
using TBF.Rig.Generic;
using TBF.Rig.Configs;
@ -56,6 +56,9 @@ namespace TBF.Rig.Output.Printers.Label
{
for (Culture s = 0; s < Culture.Count; s++) cultureComboBox.Items.Add(s.ToString());
printerComboBox.Items.Add(Strings.default_printer);
foreach (var p in PrinterSettings.InstalledPrinters) printerComboBox.Items.Add(p);
itemsToPrint = config.ItemsToPrint;
Redraw();
@ -74,7 +77,8 @@ namespace TBF.Rig.Output.Printers.Label
if (config == null) return; /// Control was not loaded, settings were not changed
classNameLabel.Text = config.Factory.ClassName;
nameTextBox.Text = config.Name;
templateTextBox.Text = config.Template;
printerComboBox.Text = string.IsNullOrEmpty(config.PrinterName) ? Strings.default_printer : config.PrinterName;
templateTextBox.Text = config.Template;
orientationComboBox.Text = config.PageOrientation.ToString();
paperWidthTextBox.Text = config.PaperWidth.ToString();
paperHeightTextBox.Text = config.PaperHeight.ToString();
@ -98,7 +102,9 @@ namespace TBF.Rig.Output.Printers.Label
public void Unlock()
{
nameTextBox.Enabled = true;
templateTextBox.Enabled = true;
printerComboBox.Enabled = true;
selectPrinterButton.Enabled = true;
templateTextBox.Enabled = true;
orientationComboBox.Enabled = true;
paperWidthTextBox.Enabled = true;
paperHeightTextBox.Enabled = true;
@ -203,6 +209,13 @@ namespace TBF.Rig.Output.Printers.Label
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
}
string newPrinter = (printerComboBox.Text == Strings.default_printer) ? string.Empty : printerComboBox.Text;
if (config.PrinterName != newPrinter)
{
config.PrinterName = newPrinter;
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
}
flags |= UpdateDifferent(ref config.Template, templateTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
if (config.PageOrientation != GetOrientation(orientationComboBox.Text))
@ -286,5 +299,14 @@ namespace TBF.Rig.Output.Printers.Label
public void StopResponseHandler() { }
#endregion Configuration Change Handling
private void selectPrinterButton_Click(object sender, EventArgs e)
{
PrintDialog dlg = new PrintDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
printerComboBox.Text = dlg.PrinterSettings.PrinterName;
}
}
}
}

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2020 Sensus Slovensko a.s.
/// Copyright (c) 2020-2023 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -165,8 +165,10 @@ namespace TBF.Rig.Output.Printers.MultiLabel
for (int i = 1; i <= printerCfg.NrOfCopies; i++)
{
string docNameEx = string.Format(((printerCfg.NrOfCopies == 1) ? "{0}" : "{0}_{1}"), documentName, i);
new Results.Output.Printers.MultiLabel.MultiLabelPrintDocument(batch, cfg, docNameEx).Print();
}
var pd = new Results.Output.Printers.MultiLabel.MultiLabelPrintDocument(batch, cfg, docNameEx);
if (!string.IsNullOrEmpty(printerCfg.PrinterName)) pd.PrinterSettings.PrinterName = printerCfg.PrinterName;
pd.Print();
}
}
}
}

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2020 Sensus Slovensko a.s.
/// Copyright (c) 2020-2023 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -20,7 +20,8 @@ namespace TBF.Rig.Output.Printers.MultiLabel
///
/// Serialized parameters
///
public PageOrientation PageOrientation;
public string PrinterName;
public PageOrientation PageOrientation;
public int LabelColumnsCount;
public int LeftTopLabelLeft;
public int LeftTopLabelTop;

View File

@ -71,21 +71,24 @@ namespace TBF.Rig.Output.Printers.MultiLabel
this.labelColumnsCountTextBox = new System.Windows.Forms.TextBox();
this.labelColumnsCountLabel = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.printerComboBox = new System.Windows.Forms.ComboBox();
this.selectPrinterButton = new System.Windows.Forms.Button();
this.printerLabel = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(122, 35);
this.nameTextBox.Location = new System.Drawing.Point(122, 34);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
this.nameTextBox.Size = new System.Drawing.Size(229, 20);
this.nameTextBox.TabIndex = 2;
//
// nameLabel
//
this.nameLabel.AutoSize = true;
this.nameLabel.Location = new System.Drawing.Point(8, 38);
this.nameLabel.Location = new System.Drawing.Point(8, 37);
this.nameLabel.Name = "nameLabel";
this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.TabIndex = 1;
@ -103,7 +106,7 @@ namespace TBF.Rig.Output.Printers.MultiLabel
// orientationLabel
//
this.orientationLabel.AutoSize = true;
this.orientationLabel.Location = new System.Drawing.Point(8, 60);
this.orientationLabel.Location = new System.Drawing.Point(8, 82);
this.orientationLabel.Name = "orientationLabel";
this.orientationLabel.Size = new System.Drawing.Size(84, 13);
this.orientationLabel.TabIndex = 3;
@ -113,7 +116,7 @@ namespace TBF.Rig.Output.Printers.MultiLabel
//
this.orientationComboBox.Enabled = false;
this.orientationComboBox.FormattingEnabled = true;
this.orientationComboBox.Location = new System.Drawing.Point(122, 57);
this.orientationComboBox.Location = new System.Drawing.Point(122, 79);
this.orientationComboBox.Name = "orientationComboBox";
this.orientationComboBox.Size = new System.Drawing.Size(130, 21);
this.orientationComboBox.TabIndex = 4;
@ -240,7 +243,7 @@ namespace TBF.Rig.Output.Printers.MultiLabel
// nrOfCopiesLabel
//
this.nrOfCopiesLabel.AutoSize = true;
this.nrOfCopiesLabel.Location = new System.Drawing.Point(8, 105);
this.nrOfCopiesLabel.Location = new System.Drawing.Point(8, 127);
this.nrOfCopiesLabel.Name = "nrOfCopiesLabel";
this.nrOfCopiesLabel.Size = new System.Drawing.Size(90, 13);
this.nrOfCopiesLabel.TabIndex = 52;
@ -249,7 +252,7 @@ namespace TBF.Rig.Output.Printers.MultiLabel
// nrOfCopiesTextBox
//
this.nrOfCopiesTextBox.Enabled = false;
this.nrOfCopiesTextBox.Location = new System.Drawing.Point(122, 102);
this.nrOfCopiesTextBox.Location = new System.Drawing.Point(122, 124);
this.nrOfCopiesTextBox.Name = "nrOfCopiesTextBox";
this.nrOfCopiesTextBox.Size = new System.Drawing.Size(32, 20);
this.nrOfCopiesTextBox.TabIndex = 51;
@ -276,7 +279,7 @@ namespace TBF.Rig.Output.Printers.MultiLabel
//
this.goodOnlyCheckBox.AutoSize = true;
this.goodOnlyCheckBox.Enabled = false;
this.goodOnlyCheckBox.Location = new System.Drawing.Point(261, 104);
this.goodOnlyCheckBox.Location = new System.Drawing.Point(261, 126);
this.goodOnlyCheckBox.Name = "goodOnlyCheckBox";
this.goodOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
this.goodOnlyCheckBox.TabIndex = 55;
@ -372,7 +375,7 @@ namespace TBF.Rig.Output.Printers.MultiLabel
// leftTopLabelTopLabel
//
this.leftTopLabelTopLabel.AutoSize = true;
this.leftTopLabelTopLabel.Location = new System.Drawing.Point(294, 84);
this.leftTopLabelTopLabel.Location = new System.Drawing.Point(294, 106);
this.leftTopLabelTopLabel.Name = "leftTopLabelTopLabel";
this.leftTopLabelTopLabel.Size = new System.Drawing.Size(26, 13);
this.leftTopLabelTopLabel.TabIndex = 60;
@ -381,7 +384,7 @@ namespace TBF.Rig.Output.Printers.MultiLabel
// leftTopLabelTopTextBox
//
this.leftTopLabelTopTextBox.Enabled = false;
this.leftTopLabelTopTextBox.Location = new System.Drawing.Point(320, 80);
this.leftTopLabelTopTextBox.Location = new System.Drawing.Point(320, 102);
this.leftTopLabelTopTextBox.Name = "leftTopLabelTopTextBox";
this.leftTopLabelTopTextBox.Size = new System.Drawing.Size(31, 20);
this.leftTopLabelTopTextBox.TabIndex = 59;
@ -389,7 +392,7 @@ namespace TBF.Rig.Output.Printers.MultiLabel
// leftTopLabelLeftTextBox
//
this.leftTopLabelLeftTextBox.Enabled = false;
this.leftTopLabelLeftTextBox.Location = new System.Drawing.Point(261, 80);
this.leftTopLabelLeftTextBox.Location = new System.Drawing.Point(261, 102);
this.leftTopLabelLeftTextBox.Name = "leftTopLabelLeftTextBox";
this.leftTopLabelLeftTextBox.Size = new System.Drawing.Size(31, 20);
this.leftTopLabelLeftTextBox.TabIndex = 58;
@ -397,7 +400,7 @@ namespace TBF.Rig.Output.Printers.MultiLabel
// leftTopLabelLeftLabel
//
this.leftTopLabelLeftLabel.AutoSize = true;
this.leftTopLabelLeftLabel.Location = new System.Drawing.Point(167, 83);
this.leftTopLabelLeftLabel.Location = new System.Drawing.Point(167, 105);
this.leftTopLabelLeftLabel.Name = "leftTopLabelLeftLabel";
this.leftTopLabelLeftLabel.Size = new System.Drawing.Size(93, 13);
this.leftTopLabelLeftLabel.TabIndex = 57;
@ -406,7 +409,7 @@ namespace TBF.Rig.Output.Printers.MultiLabel
// labelColumnsCountTextBox
//
this.labelColumnsCountTextBox.Enabled = false;
this.labelColumnsCountTextBox.Location = new System.Drawing.Point(122, 80);
this.labelColumnsCountTextBox.Location = new System.Drawing.Point(122, 102);
this.labelColumnsCountTextBox.Name = "labelColumnsCountTextBox";
this.labelColumnsCountTextBox.Size = new System.Drawing.Size(32, 20);
this.labelColumnsCountTextBox.TabIndex = 61;
@ -414,7 +417,7 @@ namespace TBF.Rig.Output.Printers.MultiLabel
// labelColumnsCountLabel
//
this.labelColumnsCountLabel.AutoSize = true;
this.labelColumnsCountLabel.Location = new System.Drawing.Point(9, 83);
this.labelColumnsCountLabel.Location = new System.Drawing.Point(9, 105);
this.labelColumnsCountLabel.Name = "labelColumnsCountLabel";
this.labelColumnsCountLabel.Size = new System.Drawing.Size(105, 13);
this.labelColumnsCountLabel.TabIndex = 62;
@ -447,17 +450,49 @@ namespace TBF.Rig.Output.Printers.MultiLabel
this.groupBox1.Controls.Add(this.barcodeWidthTextBox);
this.groupBox1.Controls.Add(this.barcodeTopLabel);
this.groupBox1.Controls.Add(this.barcodeTopTextBox);
this.groupBox1.Location = new System.Drawing.Point(3, 127);
this.groupBox1.Location = new System.Drawing.Point(3, 149);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(366, 164);
this.groupBox1.TabIndex = 63;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "One label";
//
// printerComboBox
//
this.printerComboBox.Enabled = false;
this.printerComboBox.FormattingEnabled = true;
this.printerComboBox.Location = new System.Drawing.Point(122, 56);
this.printerComboBox.Name = "printerComboBox";
this.printerComboBox.Size = new System.Drawing.Size(229, 21);
this.printerComboBox.TabIndex = 66;
//
// selectPrinterButton
//
this.selectPrinterButton.Enabled = false;
this.selectPrinterButton.Location = new System.Drawing.Point(70, 55);
this.selectPrinterButton.Name = "selectPrinterButton";
this.selectPrinterButton.Size = new System.Drawing.Size(50, 22);
this.selectPrinterButton.TabIndex = 65;
this.selectPrinterButton.Text = "Select";
this.selectPrinterButton.UseVisualStyleBackColor = true;
this.selectPrinterButton.Click += new System.EventHandler(this.selectPrinterButton_Click);
//
// printerLabel
//
this.printerLabel.AutoSize = true;
this.printerLabel.Location = new System.Drawing.Point(8, 59);
this.printerLabel.Name = "printerLabel";
this.printerLabel.Size = new System.Drawing.Size(37, 13);
this.printerLabel.TabIndex = 64;
this.printerLabel.Text = "Printer";
//
// PrinterCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.printerComboBox);
this.Controls.Add(this.selectPrinterButton);
this.Controls.Add(this.printerLabel);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.labelColumnsCountLabel);
this.Controls.Add(this.labelColumnsCountTextBox);
@ -474,7 +509,7 @@ namespace TBF.Rig.Output.Printers.MultiLabel
this.Controls.Add(this.nrOfCopiesLabel);
this.Controls.Add(this.nrOfCopiesTextBox);
this.Name = "PrinterCfgCtrl";
this.Size = new System.Drawing.Size(372, 299);
this.Size = new System.Drawing.Size(400, 350);
this.Load += new System.EventHandler(this.PrinterCfgCtrl_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
@ -525,5 +560,8 @@ namespace TBF.Rig.Output.Printers.MultiLabel
private System.Windows.Forms.TextBox labelColumnsCountTextBox;
private System.Windows.Forms.Label labelColumnsCountLabel;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ComboBox printerComboBox;
private System.Windows.Forms.Button selectPrinterButton;
private System.Windows.Forms.Label printerLabel;
}
}

View File

@ -1,13 +1,14 @@
///
/// Copyright (c) 2020 Sensus Slovensko a.s.
/// Copyright (c) 2020-2023 Sensus Slovensko a.s.
///
using System;
using System.Drawing.Printing;
using System.IO;
using System.Windows.Forms;
using log4net;
using Common;
using Config.Entities;
using Results.Output.Printers;
using TBF.Resources;
using TBF.Rig.Generic;
using TBF.Rig.Configs;
@ -55,6 +56,9 @@ namespace TBF.Rig.Output.Printers.MultiLabel
{
for (Culture s = 0; s < Culture.Count; s++) cultureComboBox.Items.Add(s.ToString());
printerComboBox.Items.Add(Strings.default_printer);
foreach (var p in PrinterSettings.InstalledPrinters) printerComboBox.Items.Add(p);
itemsToPrint = config.ItemsToPrint;
Redraw();
@ -73,7 +77,8 @@ namespace TBF.Rig.Output.Printers.MultiLabel
if (config == null) return; /// Control was not loaded, settings were not changed
classNameLabel.Text = config.Factory.ClassName;
nameTextBox.Text = config.Name;
orientationComboBox.Text = config.PageOrientation.ToString();
printerComboBox.Text = string.IsNullOrEmpty(config.PrinterName) ? Strings.default_printer : config.PrinterName;
orientationComboBox.Text = config.PageOrientation.ToString();
labelColumnsCountTextBox.Text = config.LabelColumnsCount.ToString();
leftTopLabelLeftTextBox.Text = config.LeftTopLabelLeft.ToString();
leftTopLabelTopTextBox.Text = config.LeftTopLabelTop.ToString();
@ -99,7 +104,9 @@ namespace TBF.Rig.Output.Printers.MultiLabel
public void Unlock()
{
nameTextBox.Enabled = true;
orientationComboBox.Enabled = true;
printerComboBox.Enabled = true;
selectPrinterButton.Enabled = true;
orientationComboBox.Enabled = true;
labelColumnsCountTextBox.Enabled = true;
leftTopLabelLeftTextBox.Enabled = true;
leftTopLabelTopTextBox.Enabled = true;
@ -223,6 +230,13 @@ namespace TBF.Rig.Output.Printers.MultiLabel
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
}
string newPrinter = (printerComboBox.Text == Strings.default_printer) ? string.Empty : printerComboBox.Text;
if (config.PrinterName != newPrinter)
{
config.PrinterName = newPrinter;
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
}
if (config.PageOrientation != GetOrientation(orientationComboBox.Text))
{
config.PageOrientation = GetOrientation(orientationComboBox.Text);
@ -307,5 +321,14 @@ namespace TBF.Rig.Output.Printers.MultiLabel
public void StopResponseHandler() { }
#endregion Configuration Change Handling
private void selectPrinterButton_Click(object sender, EventArgs e)
{
PrintDialog dlg = new PrintDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
printerComboBox.Text = dlg.PrinterSettings.PrinterName;
}
}
}
}

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2017 Sensus Slovensko a.s.
/// Copyright (c) 2013-2023 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -56,8 +56,10 @@ namespace TBF.Rig.Output.Printers.Munich
{
foreach (var wm in batch.WaterMeters)
{
new Results.Output.Printers.Munich.MunichPrintDocument(printerCfg.Version, wm, printerCfg.PageOrientation).Print();
}
var pd = new Results.Output.Printers.Munich.MunichPrintDocument(printerCfg.Version, wm, printerCfg.PageOrientation);
if (!string.IsNullOrEmpty(printerCfg.PrinterName)) pd.PrinterSettings.PrinterName = printerCfg.PrinterName;
pd.Print();
}
}
/// <summary>Run this operation</summary>

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
/// Copyright (c) 2013-2023 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -20,6 +20,7 @@ namespace TBF.Rig.Output.Printers.Munich
///
/// Serialized parameters
///
public string PrinterName;
public string Version;
public PageOrientation PageOrientation;
public bool SupressPrinting; /// Bypass printing when true

View File

@ -1,11 +1,12 @@
///
/// Copyright (c) 2013-2017 Sensus Slovensko a.s.
/// Copyright (c) 2013-2023 Sensus Slovensko a.s.
///
using System;
using System.Drawing.Printing;
using System.Windows.Forms;
using log4net;
using Common;
using Config.Entities;
using TBF.Resources;
using TBF.Rig.Generic;
namespace TBF.Rig.Output.Printers.Munich
@ -37,7 +38,10 @@ namespace TBF.Rig.Output.Printers.Munich
private void PrinterCfgCtrl_Load(object sender, EventArgs e)
{
Redraw();
printerComboBox.Items.Add(Strings.default_printer);
foreach (var p in PrinterSettings.InstalledPrinters) printerComboBox.Items.Add(p);
Redraw();
}
public void Closing()
@ -56,6 +60,7 @@ namespace TBF.Rig.Output.Printers.Munich
if (config == null) return; /// Control was not loaded, settings were not changed
classNameLabel.Text = config.Factory.ClassName;
nameTextBox.Text = config.Name;
printerComboBox.Text = string.IsNullOrEmpty(config.PrinterName) ? Strings.default_printer : config.PrinterName;
versionTextBox.Text = config.Version;
orientationComboBox.Text = config.PageOrientation.ToString();
supressPrintingCheckBox.Checked = config.SupressPrinting;
@ -64,6 +69,8 @@ namespace TBF.Rig.Output.Printers.Munich
public void Unlock()
{
nameTextBox.Enabled = true;
printerComboBox.Enabled = true;
selectPrinterButton.Enabled = true;
versionTextBox.Enabled = true;
orientationComboBox.Enabled = true;
supressPrintingCheckBox.Enabled = true;
@ -89,11 +96,21 @@ namespace TBF.Rig.Output.Printers.Munich
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
config.Name = nameTextBox.Text;
config.PrinterName = (printerComboBox.Text == Strings.default_printer) ? string.Empty : printerComboBox.Text;
config.Version = versionTextBox.Text;
config.PageOrientation = GetOrientation(orientationComboBox.Text);
config.SupressPrinting = supressPrintingCheckBox.Checked;
return flags;
}
private void selectPrinterButton_Click(object sender, EventArgs e)
{
PrintDialog dlg = new PrintDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
printerComboBox.Text = dlg.PrinterSettings.PrinterName;
}
}
}
}

View File

@ -39,6 +39,9 @@ namespace TBF.Rig.Output.Printers.Munich
this.supressPrintingCheckBox = new System.Windows.Forms.CheckBox();
this.versionTextBox = new System.Windows.Forms.TextBox();
this.versionLabel = new System.Windows.Forms.Label();
this.printerComboBox = new System.Windows.Forms.ComboBox();
this.selectPrinterButton = new System.Windows.Forms.Button();
this.printerLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// nameTextBox
@ -71,7 +74,7 @@ namespace TBF.Rig.Output.Printers.Munich
//
this.orientationComboBox.Enabled = false;
this.orientationComboBox.FormattingEnabled = true;
this.orientationComboBox.Location = new System.Drawing.Point(143, 109);
this.orientationComboBox.Location = new System.Drawing.Point(143, 136);
this.orientationComboBox.Name = "orientationComboBox";
this.orientationComboBox.Size = new System.Drawing.Size(130, 21);
this.orientationComboBox.TabIndex = 6;
@ -79,7 +82,7 @@ namespace TBF.Rig.Output.Printers.Munich
// orientationLabel
//
this.orientationLabel.AutoSize = true;
this.orientationLabel.Location = new System.Drawing.Point(25, 112);
this.orientationLabel.Location = new System.Drawing.Point(25, 139);
this.orientationLabel.Name = "orientationLabel";
this.orientationLabel.Size = new System.Drawing.Size(84, 13);
this.orientationLabel.TabIndex = 5;
@ -89,7 +92,7 @@ namespace TBF.Rig.Output.Printers.Munich
//
this.supressPrintingCheckBox.AutoSize = true;
this.supressPrintingCheckBox.Enabled = false;
this.supressPrintingCheckBox.Location = new System.Drawing.Point(143, 137);
this.supressPrintingCheckBox.Location = new System.Drawing.Point(143, 164);
this.supressPrintingCheckBox.Name = "supressPrintingCheckBox";
this.supressPrintingCheckBox.Size = new System.Drawing.Size(101, 17);
this.supressPrintingCheckBox.TabIndex = 7;
@ -99,7 +102,7 @@ namespace TBF.Rig.Output.Printers.Munich
// versionTextBox
//
this.versionTextBox.Enabled = false;
this.versionTextBox.Location = new System.Drawing.Point(143, 83);
this.versionTextBox.Location = new System.Drawing.Point(143, 110);
this.versionTextBox.Name = "versionTextBox";
this.versionTextBox.Size = new System.Drawing.Size(130, 20);
this.versionTextBox.TabIndex = 4;
@ -107,16 +110,48 @@ namespace TBF.Rig.Output.Printers.Munich
// versionLabel
//
this.versionLabel.AutoSize = true;
this.versionLabel.Location = new System.Drawing.Point(25, 86);
this.versionLabel.Location = new System.Drawing.Point(25, 113);
this.versionLabel.Name = "versionLabel";
this.versionLabel.Size = new System.Drawing.Size(42, 13);
this.versionLabel.TabIndex = 3;
this.versionLabel.Text = "Version";
//
// printerComboBox
//
this.printerComboBox.Enabled = false;
this.printerComboBox.FormattingEnabled = true;
this.printerComboBox.Location = new System.Drawing.Point(143, 83);
this.printerComboBox.Name = "printerComboBox";
this.printerComboBox.Size = new System.Drawing.Size(218, 21);
this.printerComboBox.TabIndex = 53;
//
// selectPrinterButton
//
this.selectPrinterButton.Enabled = false;
this.selectPrinterButton.Location = new System.Drawing.Point(89, 82);
this.selectPrinterButton.Name = "selectPrinterButton";
this.selectPrinterButton.Size = new System.Drawing.Size(50, 22);
this.selectPrinterButton.TabIndex = 52;
this.selectPrinterButton.Text = "Select";
this.selectPrinterButton.UseVisualStyleBackColor = true;
this.selectPrinterButton.Click += new System.EventHandler(this.selectPrinterButton_Click);
//
// printerLabel
//
this.printerLabel.AutoSize = true;
this.printerLabel.Location = new System.Drawing.Point(25, 86);
this.printerLabel.Name = "printerLabel";
this.printerLabel.Size = new System.Drawing.Size(37, 13);
this.printerLabel.TabIndex = 51;
this.printerLabel.Text = "Printer";
//
// PrinterCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.printerComboBox);
this.Controls.Add(this.selectPrinterButton);
this.Controls.Add(this.printerLabel);
this.Controls.Add(this.versionTextBox);
this.Controls.Add(this.versionLabel);
this.Controls.Add(this.orientationComboBox);
@ -126,7 +161,7 @@ namespace TBF.Rig.Output.Printers.Munich
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.classNameLabel);
this.Name = "PrinterCfgCtrl";
this.Size = new System.Drawing.Size(300, 200);
this.Size = new System.Drawing.Size(400, 350);
this.Load += new System.EventHandler(this.PrinterCfgCtrl_Load);
this.ResumeLayout(false);
this.PerformLayout();
@ -143,5 +178,8 @@ namespace TBF.Rig.Output.Printers.Munich
private System.Windows.Forms.CheckBox supressPrintingCheckBox;
private System.Windows.Forms.TextBox versionTextBox;
private System.Windows.Forms.Label versionLabel;
private System.Windows.Forms.ComboBox printerComboBox;
private System.Windows.Forms.Button selectPrinterButton;
private System.Windows.Forms.Label printerLabel;
}
}

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2020 Sensus Slovensko a.s.
/// Copyright (c) 2020-2023 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -251,7 +251,9 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
ImgFullPathName = (wm.ArchivePath != null) ? System.IO.Path.Combine(wm.ArchivePath, printerCfg.ImgName) : null,
};
new OnePerBatchPrintDocument(batch, cfg, wm, documentName).Print();
}
var pd = new OnePerBatchPrintDocument(batch, cfg, wm, documentName);
if (!string.IsNullOrEmpty(printerCfg.PrinterName)) pd.PrinterSettings.PrinterName = printerCfg.PrinterName;
pd.Print();
}
}
}

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2020 Sensus Slovensko a.s.
/// Copyright (c) 2020-2023 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using System.Xml.Serialization;
@ -18,6 +18,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
///
/// Serialized parameters
///
public string PrinterName;
public string AutoTestParam;
public PageOrientation PageOrientation;
public string Template;

View File

@ -33,7 +33,6 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
{
this.nameTextBox = new System.Windows.Forms.TextBox();
this.nameLabel = new System.Windows.Forms.Label();
this.classNameLabel = new System.Windows.Forms.Label();
this.supressPrintingCheckBox = new System.Windows.Forms.CheckBox();
this.orientationLabel = new System.Windows.Forms.Label();
this.orientationComboBox = new System.Windows.Forms.ComboBox();
@ -109,12 +108,15 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
this.graphLeftTextBox = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.autoTestParamTextBox = new System.Windows.Forms.TextBox();
this.printerComboBox = new System.Windows.Forms.ComboBox();
this.selectPrinterButton = new System.Windows.Forms.Button();
this.printerLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(142, 22);
this.nameTextBox.Location = new System.Drawing.Point(142, 1);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(146, 20);
this.nameTextBox.TabIndex = 2;
@ -122,26 +124,17 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// nameLabel
//
this.nameLabel.AutoSize = true;
this.nameLabel.Location = new System.Drawing.Point(16, 25);
this.nameLabel.Location = new System.Drawing.Point(16, 4);
this.nameLabel.Name = "nameLabel";
this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.TabIndex = 1;
this.nameLabel.Text = "Name";
//
// classNameLabel
//
this.classNameLabel.AutoSize = true;
this.classNameLabel.Location = new System.Drawing.Point(139, 5);
this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
this.classNameLabel.TabIndex = 0;
this.classNameLabel.Text = "ComonentName";
//
// supressPrintingCheckBox
//
this.supressPrintingCheckBox.AutoSize = true;
this.supressPrintingCheckBox.Enabled = false;
this.supressPrintingCheckBox.Location = new System.Drawing.Point(334, 51);
this.supressPrintingCheckBox.Location = new System.Drawing.Point(334, 52);
this.supressPrintingCheckBox.Name = "supressPrintingCheckBox";
this.supressPrintingCheckBox.Size = new System.Drawing.Size(101, 17);
this.supressPrintingCheckBox.TabIndex = 33;
@ -151,7 +144,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// orientationLabel
//
this.orientationLabel.AutoSize = true;
this.orientationLabel.Location = new System.Drawing.Point(16, 67);
this.orientationLabel.Location = new System.Drawing.Point(16, 68);
this.orientationLabel.Name = "orientationLabel";
this.orientationLabel.Size = new System.Drawing.Size(84, 13);
this.orientationLabel.TabIndex = 5;
@ -161,7 +154,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.orientationComboBox.Enabled = false;
this.orientationComboBox.FormattingEnabled = true;
this.orientationComboBox.Location = new System.Drawing.Point(142, 64);
this.orientationComboBox.Location = new System.Drawing.Point(142, 65);
this.orientationComboBox.Name = "orientationComboBox";
this.orientationComboBox.Size = new System.Drawing.Size(146, 21);
this.orientationComboBox.TabIndex = 6;
@ -169,7 +162,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// topMarginTextBox
//
this.topMarginTextBox.Enabled = false;
this.topMarginTextBox.Location = new System.Drawing.Point(142, 86);
this.topMarginTextBox.Location = new System.Drawing.Point(142, 87);
this.topMarginTextBox.Name = "topMarginTextBox";
this.topMarginTextBox.Size = new System.Drawing.Size(44, 20);
this.topMarginTextBox.TabIndex = 8;
@ -177,7 +170,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// topMarginLabel
//
this.topMarginLabel.AutoSize = true;
this.topMarginLabel.Location = new System.Drawing.Point(16, 88);
this.topMarginLabel.Location = new System.Drawing.Point(16, 89);
this.topMarginLabel.Name = "topMarginLabel";
this.topMarginLabel.Size = new System.Drawing.Size(116, 13);
this.topMarginLabel.TabIndex = 7;
@ -186,7 +179,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// leftMarginTextBox
//
this.leftMarginTextBox.Enabled = false;
this.leftMarginTextBox.Location = new System.Drawing.Point(244, 86);
this.leftMarginTextBox.Location = new System.Drawing.Point(244, 87);
this.leftMarginTextBox.Name = "leftMarginTextBox";
this.leftMarginTextBox.Size = new System.Drawing.Size(44, 20);
this.leftMarginTextBox.TabIndex = 10;
@ -194,7 +187,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// bottomMarginTextBox
//
this.bottomMarginTextBox.Enabled = false;
this.bottomMarginTextBox.Location = new System.Drawing.Point(193, 86);
this.bottomMarginTextBox.Location = new System.Drawing.Point(193, 87);
this.bottomMarginTextBox.Name = "bottomMarginTextBox";
this.bottomMarginTextBox.Size = new System.Drawing.Size(44, 20);
this.bottomMarginTextBox.TabIndex = 9;
@ -203,7 +196,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.cultureComboBox.Enabled = false;
this.cultureComboBox.FormattingEnabled = true;
this.cultureComboBox.Location = new System.Drawing.Point(142, 192);
this.cultureComboBox.Location = new System.Drawing.Point(142, 193);
this.cultureComboBox.Name = "cultureComboBox";
this.cultureComboBox.Size = new System.Drawing.Size(110, 21);
this.cultureComboBox.TabIndex = 32;
@ -211,7 +204,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// cultureLabel
//
this.cultureLabel.AutoSize = true;
this.cultureLabel.Location = new System.Drawing.Point(16, 197);
this.cultureLabel.Location = new System.Drawing.Point(16, 198);
this.cultureLabel.Name = "cultureLabel";
this.cultureLabel.Size = new System.Drawing.Size(42, 13);
this.cultureLabel.TabIndex = 31;
@ -220,7 +213,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// footerButton
//
this.footerButton.Enabled = false;
this.footerButton.Location = new System.Drawing.Point(291, 285);
this.footerButton.Location = new System.Drawing.Point(291, 286);
this.footerButton.Name = "footerButton";
this.footerButton.Size = new System.Drawing.Size(100, 20);
this.footerButton.TabIndex = 41;
@ -231,7 +224,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// headerButton
//
this.headerButton.Enabled = false;
this.headerButton.Location = new System.Drawing.Point(291, 190);
this.headerButton.Location = new System.Drawing.Point(291, 191);
this.headerButton.Name = "headerButton";
this.headerButton.Size = new System.Drawing.Size(100, 20);
this.headerButton.TabIndex = 37;
@ -242,7 +235,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// testItemsButton
//
this.testItemsButton.Enabled = false;
this.testItemsButton.Location = new System.Drawing.Point(291, 228);
this.testItemsButton.Location = new System.Drawing.Point(291, 229);
this.testItemsButton.Name = "testItemsButton";
this.testItemsButton.Size = new System.Drawing.Size(100, 20);
this.testItemsButton.TabIndex = 39;
@ -253,7 +246,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// headerFontLabel
//
this.headerFontLabel.AutoSize = true;
this.headerFontLabel.Location = new System.Drawing.Point(16, 131);
this.headerFontLabel.Location = new System.Drawing.Point(16, 132);
this.headerFontLabel.Name = "headerFontLabel";
this.headerFontLabel.Size = new System.Drawing.Size(112, 13);
this.headerFontLabel.TabIndex = 16;
@ -262,7 +255,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// titleFontLabel
//
this.titleFontLabel.AutoSize = true;
this.titleFontLabel.Location = new System.Drawing.Point(16, 110);
this.titleFontLabel.Location = new System.Drawing.Point(16, 111);
this.titleFontLabel.Name = "titleFontLabel";
this.titleFontLabel.Size = new System.Drawing.Size(97, 13);
this.titleFontLabel.TabIndex = 11;
@ -272,7 +265,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.titleFontFamilyComboBox.Enabled = false;
this.titleFontFamilyComboBox.FormattingEnabled = true;
this.titleFontFamilyComboBox.Location = new System.Drawing.Point(142, 107);
this.titleFontFamilyComboBox.Location = new System.Drawing.Point(142, 108);
this.titleFontFamilyComboBox.Name = "titleFontFamilyComboBox";
this.titleFontFamilyComboBox.Size = new System.Drawing.Size(110, 21);
this.titleFontFamilyComboBox.TabIndex = 12;
@ -281,7 +274,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.headerFontFamilyComboBox.Enabled = false;
this.headerFontFamilyComboBox.FormattingEnabled = true;
this.headerFontFamilyComboBox.Location = new System.Drawing.Point(142, 128);
this.headerFontFamilyComboBox.Location = new System.Drawing.Point(142, 129);
this.headerFontFamilyComboBox.Name = "headerFontFamilyComboBox";
this.headerFontFamilyComboBox.Size = new System.Drawing.Size(110, 21);
this.headerFontFamilyComboBox.TabIndex = 17;
@ -290,7 +283,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.bodyFontFamilyComboBox.Enabled = false;
this.bodyFontFamilyComboBox.FormattingEnabled = true;
this.bodyFontFamilyComboBox.Location = new System.Drawing.Point(142, 149);
this.bodyFontFamilyComboBox.Location = new System.Drawing.Point(142, 150);
this.bodyFontFamilyComboBox.Name = "bodyFontFamilyComboBox";
this.bodyFontFamilyComboBox.Size = new System.Drawing.Size(110, 21);
this.bodyFontFamilyComboBox.TabIndex = 22;
@ -298,7 +291,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// bodyFontLabel
//
this.bodyFontLabel.AutoSize = true;
this.bodyFontLabel.Location = new System.Drawing.Point(16, 152);
this.bodyFontLabel.Location = new System.Drawing.Point(16, 153);
this.bodyFontLabel.Name = "bodyFontLabel";
this.bodyFontLabel.Size = new System.Drawing.Size(101, 13);
this.bodyFontLabel.TabIndex = 21;
@ -307,7 +300,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// titleFontSizeTextBox
//
this.titleFontSizeTextBox.Enabled = false;
this.titleFontSizeTextBox.Location = new System.Drawing.Point(258, 107);
this.titleFontSizeTextBox.Location = new System.Drawing.Point(258, 108);
this.titleFontSizeTextBox.Name = "titleFontSizeTextBox";
this.titleFontSizeTextBox.Size = new System.Drawing.Size(30, 20);
this.titleFontSizeTextBox.TabIndex = 13;
@ -315,7 +308,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// headerFontSizeTextBox
//
this.headerFontSizeTextBox.Enabled = false;
this.headerFontSizeTextBox.Location = new System.Drawing.Point(258, 128);
this.headerFontSizeTextBox.Location = new System.Drawing.Point(258, 129);
this.headerFontSizeTextBox.Name = "headerFontSizeTextBox";
this.headerFontSizeTextBox.Size = new System.Drawing.Size(30, 20);
this.headerFontSizeTextBox.TabIndex = 18;
@ -323,7 +316,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// bodyFontSizeTextBox
//
this.bodyFontSizeTextBox.Enabled = false;
this.bodyFontSizeTextBox.Location = new System.Drawing.Point(258, 149);
this.bodyFontSizeTextBox.Location = new System.Drawing.Point(258, 150);
this.bodyFontSizeTextBox.Name = "bodyFontSizeTextBox";
this.bodyFontSizeTextBox.Size = new System.Drawing.Size(30, 20);
this.bodyFontSizeTextBox.TabIndex = 23;
@ -332,7 +325,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.titleBoldCheckBox.AutoSize = true;
this.titleBoldCheckBox.Enabled = false;
this.titleBoldCheckBox.Location = new System.Drawing.Point(306, 110);
this.titleBoldCheckBox.Location = new System.Drawing.Point(306, 111);
this.titleBoldCheckBox.Name = "titleBoldCheckBox";
this.titleBoldCheckBox.Size = new System.Drawing.Size(15, 14);
this.titleBoldCheckBox.TabIndex = 14;
@ -342,7 +335,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.titleItalicCheckBox.AutoSize = true;
this.titleItalicCheckBox.Enabled = false;
this.titleItalicCheckBox.Location = new System.Drawing.Point(334, 110);
this.titleItalicCheckBox.Location = new System.Drawing.Point(334, 111);
this.titleItalicCheckBox.Name = "titleItalicCheckBox";
this.titleItalicCheckBox.Size = new System.Drawing.Size(15, 14);
this.titleItalicCheckBox.TabIndex = 15;
@ -352,7 +345,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.headerItalicCheckBox.AutoSize = true;
this.headerItalicCheckBox.Enabled = false;
this.headerItalicCheckBox.Location = new System.Drawing.Point(334, 131);
this.headerItalicCheckBox.Location = new System.Drawing.Point(334, 132);
this.headerItalicCheckBox.Name = "headerItalicCheckBox";
this.headerItalicCheckBox.Size = new System.Drawing.Size(15, 14);
this.headerItalicCheckBox.TabIndex = 20;
@ -362,7 +355,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.headerBoldCheckBox.AutoSize = true;
this.headerBoldCheckBox.Enabled = false;
this.headerBoldCheckBox.Location = new System.Drawing.Point(306, 131);
this.headerBoldCheckBox.Location = new System.Drawing.Point(306, 132);
this.headerBoldCheckBox.Name = "headerBoldCheckBox";
this.headerBoldCheckBox.Size = new System.Drawing.Size(15, 14);
this.headerBoldCheckBox.TabIndex = 19;
@ -372,7 +365,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.bodyItalicCheckBox.AutoSize = true;
this.bodyItalicCheckBox.Enabled = false;
this.bodyItalicCheckBox.Location = new System.Drawing.Point(334, 152);
this.bodyItalicCheckBox.Location = new System.Drawing.Point(334, 153);
this.bodyItalicCheckBox.Name = "bodyItalicCheckBox";
this.bodyItalicCheckBox.Size = new System.Drawing.Size(15, 14);
this.bodyItalicCheckBox.TabIndex = 25;
@ -382,7 +375,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.bodyBoldCheckBox.AutoSize = true;
this.bodyBoldCheckBox.Enabled = false;
this.bodyBoldCheckBox.Location = new System.Drawing.Point(306, 152);
this.bodyBoldCheckBox.Location = new System.Drawing.Point(306, 153);
this.bodyBoldCheckBox.Name = "bodyBoldCheckBox";
this.bodyBoldCheckBox.Size = new System.Drawing.Size(15, 14);
this.bodyBoldCheckBox.TabIndex = 24;
@ -392,7 +385,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label1.Location = new System.Drawing.Point(296, 94);
this.label1.Location = new System.Drawing.Point(296, 95);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 13);
this.label1.TabIndex = 37;
@ -402,7 +395,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label2.Location = new System.Drawing.Point(330, 94);
this.label2.Location = new System.Drawing.Point(330, 95);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(24, 13);
this.label2.TabIndex = 38;
@ -411,7 +404,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// testItems2Button
//
this.testItems2Button.Enabled = false;
this.testItems2Button.Location = new System.Drawing.Point(291, 247);
this.testItems2Button.Location = new System.Drawing.Point(291, 248);
this.testItems2Button.Name = "testItems2Button";
this.testItems2Button.Size = new System.Drawing.Size(100, 20);
this.testItems2Button.TabIndex = 40;
@ -423,7 +416,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.goodOnlyCheckBox.AutoSize = true;
this.goodOnlyCheckBox.Enabled = false;
this.goodOnlyCheckBox.Location = new System.Drawing.Point(334, 69);
this.goodOnlyCheckBox.Location = new System.Drawing.Point(334, 70);
this.goodOnlyCheckBox.Name = "goodOnlyCheckBox";
this.goodOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
this.goodOnlyCheckBox.TabIndex = 34;
@ -433,7 +426,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// templateTextBox
//
this.templateTextBox.Enabled = false;
this.templateTextBox.Location = new System.Drawing.Point(142, 43);
this.templateTextBox.Location = new System.Drawing.Point(142, 44);
this.templateTextBox.Name = "templateTextBox";
this.templateTextBox.Size = new System.Drawing.Size(146, 20);
this.templateTextBox.TabIndex = 4;
@ -441,7 +434,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// templateLabel
//
this.templateLabel.AutoSize = true;
this.templateLabel.Location = new System.Drawing.Point(16, 46);
this.templateLabel.Location = new System.Drawing.Point(16, 47);
this.templateLabel.Name = "templateLabel";
this.templateLabel.Size = new System.Drawing.Size(51, 13);
this.templateLabel.TabIndex = 3;
@ -450,7 +443,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// docNameLabel
//
this.docNameLabel.AutoSize = true;
this.docNameLabel.Location = new System.Drawing.Point(16, 331);
this.docNameLabel.Location = new System.Drawing.Point(16, 332);
this.docNameLabel.Name = "docNameLabel";
this.docNameLabel.Size = new System.Drawing.Size(246, 13);
this.docNameLabel.TabIndex = 42;
@ -459,7 +452,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// docNameTextBox
//
this.docNameTextBox.Enabled = false;
this.docNameTextBox.Location = new System.Drawing.Point(261, 328);
this.docNameTextBox.Location = new System.Drawing.Point(261, 329);
this.docNameTextBox.Name = "docNameTextBox";
this.docNameTextBox.Size = new System.Drawing.Size(135, 20);
this.docNameTextBox.TabIndex = 43;
@ -468,7 +461,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.footerItalicCheckBox.AutoSize = true;
this.footerItalicCheckBox.Enabled = false;
this.footerItalicCheckBox.Location = new System.Drawing.Point(334, 173);
this.footerItalicCheckBox.Location = new System.Drawing.Point(334, 174);
this.footerItalicCheckBox.Name = "footerItalicCheckBox";
this.footerItalicCheckBox.Size = new System.Drawing.Size(15, 14);
this.footerItalicCheckBox.TabIndex = 30;
@ -478,7 +471,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.footerBoldCheckBox.AutoSize = true;
this.footerBoldCheckBox.Enabled = false;
this.footerBoldCheckBox.Location = new System.Drawing.Point(306, 173);
this.footerBoldCheckBox.Location = new System.Drawing.Point(306, 174);
this.footerBoldCheckBox.Name = "footerBoldCheckBox";
this.footerBoldCheckBox.Size = new System.Drawing.Size(15, 14);
this.footerBoldCheckBox.TabIndex = 29;
@ -487,7 +480,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// footerFontSizeTextBox
//
this.footerFontSizeTextBox.Enabled = false;
this.footerFontSizeTextBox.Location = new System.Drawing.Point(258, 170);
this.footerFontSizeTextBox.Location = new System.Drawing.Point(258, 171);
this.footerFontSizeTextBox.Name = "footerFontSizeTextBox";
this.footerFontSizeTextBox.Size = new System.Drawing.Size(30, 20);
this.footerFontSizeTextBox.TabIndex = 28;
@ -496,7 +489,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.footerFontFamilyComboBox.Enabled = false;
this.footerFontFamilyComboBox.FormattingEnabled = true;
this.footerFontFamilyComboBox.Location = new System.Drawing.Point(142, 170);
this.footerFontFamilyComboBox.Location = new System.Drawing.Point(142, 171);
this.footerFontFamilyComboBox.Name = "footerFontFamilyComboBox";
this.footerFontFamilyComboBox.Size = new System.Drawing.Size(110, 21);
this.footerFontFamilyComboBox.TabIndex = 27;
@ -504,7 +497,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// footerFontLabel
//
this.footerFontLabel.AutoSize = true;
this.footerFontLabel.Location = new System.Drawing.Point(16, 173);
this.footerFontLabel.Location = new System.Drawing.Point(16, 174);
this.footerFontLabel.Name = "footerFontLabel";
this.footerFontLabel.Size = new System.Drawing.Size(107, 13);
this.footerFontLabel.TabIndex = 26;
@ -513,7 +506,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// imageNameTextBox
//
this.imageNameTextBox.Enabled = false;
this.imageNameTextBox.Location = new System.Drawing.Point(287, 306);
this.imageNameTextBox.Location = new System.Drawing.Point(287, 307);
this.imageNameTextBox.Name = "imageNameTextBox";
this.imageNameTextBox.Size = new System.Drawing.Size(135, 20);
this.imageNameTextBox.TabIndex = 44;
@ -521,7 +514,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// imageLeftTextBox
//
this.imageLeftTextBox.Enabled = false;
this.imageLeftTextBox.Location = new System.Drawing.Point(141, 306);
this.imageLeftTextBox.Location = new System.Drawing.Point(141, 307);
this.imageLeftTextBox.Name = "imageLeftTextBox";
this.imageLeftTextBox.Size = new System.Drawing.Size(33, 20);
this.imageLeftTextBox.TabIndex = 46;
@ -529,7 +522,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// imageTopTextBox
//
this.imageTopTextBox.Enabled = false;
this.imageTopTextBox.Location = new System.Drawing.Point(177, 306);
this.imageTopTextBox.Location = new System.Drawing.Point(177, 307);
this.imageTopTextBox.Name = "imageTopTextBox";
this.imageTopTextBox.Size = new System.Drawing.Size(31, 20);
this.imageTopTextBox.TabIndex = 47;
@ -537,7 +530,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// imageWidthTextBox
//
this.imageWidthTextBox.Enabled = false;
this.imageWidthTextBox.Location = new System.Drawing.Point(211, 306);
this.imageWidthTextBox.Location = new System.Drawing.Point(211, 307);
this.imageWidthTextBox.Name = "imageWidthTextBox";
this.imageWidthTextBox.Size = new System.Drawing.Size(31, 20);
this.imageWidthTextBox.TabIndex = 48;
@ -545,7 +538,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// imageHeightTextBox
//
this.imageHeightTextBox.Enabled = false;
this.imageHeightTextBox.Location = new System.Drawing.Point(245, 306);
this.imageHeightTextBox.Location = new System.Drawing.Point(245, 307);
this.imageHeightTextBox.Name = "imageHeightTextBox";
this.imageHeightTextBox.Size = new System.Drawing.Size(31, 20);
this.imageHeightTextBox.TabIndex = 49;
@ -553,7 +546,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(17, 309);
this.label4.Location = new System.Drawing.Point(17, 310);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(115, 13);
this.label4.TabIndex = 50;
@ -562,7 +555,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(55, 269);
this.label8.Location = new System.Drawing.Point(55, 270);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(224, 13);
this.label8.TabIndex = 57;
@ -571,7 +564,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(172, 219);
this.label6.Location = new System.Drawing.Point(172, 220);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(15, 13);
this.label6.TabIndex = 67;
@ -580,7 +573,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// colW0TextBox
//
this.colW0TextBox.Enabled = false;
this.colW0TextBox.Location = new System.Drawing.Point(142, 216);
this.colW0TextBox.Location = new System.Drawing.Point(142, 217);
this.colW0TextBox.Name = "colW0TextBox";
this.colW0TextBox.Size = new System.Drawing.Size(30, 20);
this.colW0TextBox.TabIndex = 66;
@ -588,7 +581,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(16, 219);
this.label5.Location = new System.Drawing.Point(16, 220);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(97, 13);
this.label5.TabIndex = 58;
@ -597,7 +590,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(264, 219);
this.label7.Location = new System.Drawing.Point(264, 220);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(15, 13);
this.label7.TabIndex = 62;
@ -606,7 +599,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(218, 219);
this.label9.Location = new System.Drawing.Point(218, 220);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(15, 13);
this.label9.TabIndex = 60;
@ -615,7 +608,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// colW2TextBox
//
this.colW2TextBox.Enabled = false;
this.colW2TextBox.Location = new System.Drawing.Point(234, 216);
this.colW2TextBox.Location = new System.Drawing.Point(234, 217);
this.colW2TextBox.Name = "colW2TextBox";
this.colW2TextBox.Size = new System.Drawing.Size(30, 20);
this.colW2TextBox.TabIndex = 61;
@ -623,7 +616,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// colW1TextBox
//
this.colW1TextBox.Enabled = false;
this.colW1TextBox.Location = new System.Drawing.Point(188, 216);
this.colW1TextBox.Location = new System.Drawing.Point(188, 217);
this.colW1TextBox.Name = "colW1TextBox";
this.colW1TextBox.Size = new System.Drawing.Size(30, 20);
this.colW1TextBox.TabIndex = 59;
@ -631,7 +624,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// commonItems3Button
//
this.commonItems3Button.Enabled = false;
this.commonItems3Button.Location = new System.Drawing.Point(397, 209);
this.commonItems3Button.Location = new System.Drawing.Point(397, 210);
this.commonItems3Button.Name = "commonItems3Button";
this.commonItems3Button.Size = new System.Drawing.Size(47, 20);
this.commonItems3Button.TabIndex = 65;
@ -642,7 +635,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// commonItems2Button
//
this.commonItems2Button.Enabled = false;
this.commonItems2Button.Location = new System.Drawing.Point(344, 209);
this.commonItems2Button.Location = new System.Drawing.Point(344, 210);
this.commonItems2Button.Name = "commonItems2Button";
this.commonItems2Button.Size = new System.Drawing.Size(47, 20);
this.commonItems2Button.TabIndex = 64;
@ -653,7 +646,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// commonItems1Button
//
this.commonItems1Button.Enabled = false;
this.commonItems1Button.Location = new System.Drawing.Point(291, 209);
this.commonItems1Button.Location = new System.Drawing.Point(291, 210);
this.commonItems1Button.Name = "commonItems1Button";
this.commonItems1Button.Size = new System.Drawing.Size(47, 20);
this.commonItems1Button.TabIndex = 63;
@ -664,7 +657,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(172, 244);
this.label10.Location = new System.Drawing.Point(172, 245);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(15, 13);
this.label10.TabIndex = 74;
@ -673,7 +666,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// belowW0TextBox
//
this.belowW0TextBox.Enabled = false;
this.belowW0TextBox.Location = new System.Drawing.Point(142, 241);
this.belowW0TextBox.Location = new System.Drawing.Point(142, 242);
this.belowW0TextBox.Name = "belowW0TextBox";
this.belowW0TextBox.Size = new System.Drawing.Size(30, 20);
this.belowW0TextBox.TabIndex = 73;
@ -681,7 +674,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(16, 244);
this.label11.Location = new System.Drawing.Point(16, 245);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(97, 13);
this.label11.TabIndex = 68;
@ -690,7 +683,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(264, 244);
this.label12.Location = new System.Drawing.Point(264, 245);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(15, 13);
this.label12.TabIndex = 72;
@ -699,7 +692,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(218, 244);
this.label13.Location = new System.Drawing.Point(218, 245);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(15, 13);
this.label13.TabIndex = 70;
@ -708,7 +701,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// belowW2TextBox
//
this.belowW2TextBox.Enabled = false;
this.belowW2TextBox.Location = new System.Drawing.Point(234, 241);
this.belowW2TextBox.Location = new System.Drawing.Point(234, 242);
this.belowW2TextBox.Name = "belowW2TextBox";
this.belowW2TextBox.Size = new System.Drawing.Size(30, 20);
this.belowW2TextBox.TabIndex = 71;
@ -716,7 +709,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// belowW1TextBox
//
this.belowW1TextBox.Enabled = false;
this.belowW1TextBox.Location = new System.Drawing.Point(188, 241);
this.belowW1TextBox.Location = new System.Drawing.Point(188, 242);
this.belowW1TextBox.Name = "belowW1TextBox";
this.belowW1TextBox.Size = new System.Drawing.Size(30, 20);
this.belowW1TextBox.TabIndex = 69;
@ -724,7 +717,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// belowItems3Button
//
this.belowItems3Button.Enabled = false;
this.belowItems3Button.Location = new System.Drawing.Point(397, 266);
this.belowItems3Button.Location = new System.Drawing.Point(397, 267);
this.belowItems3Button.Name = "belowItems3Button";
this.belowItems3Button.Size = new System.Drawing.Size(47, 20);
this.belowItems3Button.TabIndex = 77;
@ -735,7 +728,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// belowItems2Button
//
this.belowItems2Button.Enabled = false;
this.belowItems2Button.Location = new System.Drawing.Point(344, 266);
this.belowItems2Button.Location = new System.Drawing.Point(344, 267);
this.belowItems2Button.Name = "belowItems2Button";
this.belowItems2Button.Size = new System.Drawing.Size(47, 20);
this.belowItems2Button.TabIndex = 76;
@ -746,7 +739,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// belowItems1Button
//
this.belowItems1Button.Enabled = false;
this.belowItems1Button.Location = new System.Drawing.Point(291, 266);
this.belowItems1Button.Location = new System.Drawing.Point(291, 267);
this.belowItems1Button.Name = "belowItems1Button";
this.belowItems1Button.Size = new System.Drawing.Size(47, 20);
this.belowItems1Button.TabIndex = 75;
@ -758,7 +751,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
//
this.table1FormComboBox.Enabled = false;
this.table1FormComboBox.FormattingEnabled = true;
this.table1FormComboBox.Location = new System.Drawing.Point(392, 237);
this.table1FormComboBox.Location = new System.Drawing.Point(392, 238);
this.table1FormComboBox.Name = "table1FormComboBox";
this.table1FormComboBox.Size = new System.Drawing.Size(64, 21);
this.table1FormComboBox.TabIndex = 78;
@ -766,7 +759,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(17, 288);
this.label3.Location = new System.Drawing.Point(17, 289);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(97, 13);
this.label3.TabIndex = 83;
@ -775,7 +768,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// graphHeightTextBox
//
this.graphHeightTextBox.Enabled = false;
this.graphHeightTextBox.Location = new System.Drawing.Point(245, 285);
this.graphHeightTextBox.Location = new System.Drawing.Point(245, 286);
this.graphHeightTextBox.Name = "graphHeightTextBox";
this.graphHeightTextBox.Size = new System.Drawing.Size(31, 20);
this.graphHeightTextBox.TabIndex = 82;
@ -783,7 +776,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// graphWidthTextBox
//
this.graphWidthTextBox.Enabled = false;
this.graphWidthTextBox.Location = new System.Drawing.Point(211, 285);
this.graphWidthTextBox.Location = new System.Drawing.Point(211, 286);
this.graphWidthTextBox.Name = "graphWidthTextBox";
this.graphWidthTextBox.Size = new System.Drawing.Size(31, 20);
this.graphWidthTextBox.TabIndex = 81;
@ -791,7 +784,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// graphTopTextBox
//
this.graphTopTextBox.Enabled = false;
this.graphTopTextBox.Location = new System.Drawing.Point(177, 285);
this.graphTopTextBox.Location = new System.Drawing.Point(177, 286);
this.graphTopTextBox.Name = "graphTopTextBox";
this.graphTopTextBox.Size = new System.Drawing.Size(31, 20);
this.graphTopTextBox.TabIndex = 80;
@ -799,7 +792,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// graphLeftTextBox
//
this.graphLeftTextBox.Enabled = false;
this.graphLeftTextBox.Location = new System.Drawing.Point(141, 285);
this.graphLeftTextBox.Location = new System.Drawing.Point(141, 286);
this.graphLeftTextBox.Name = "graphLeftTextBox";
this.graphLeftTextBox.Size = new System.Drawing.Size(33, 20);
this.graphLeftTextBox.TabIndex = 79;
@ -807,7 +800,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(298, 25);
this.label14.Location = new System.Drawing.Point(298, 4);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(32, 13);
this.label14.TabIndex = 87;
@ -816,15 +809,47 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
// autoTestParamTextBox
//
this.autoTestParamTextBox.Enabled = false;
this.autoTestParamTextBox.Location = new System.Drawing.Point(333, 22);
this.autoTestParamTextBox.Location = new System.Drawing.Point(333, 1);
this.autoTestParamTextBox.Name = "autoTestParamTextBox";
this.autoTestParamTextBox.Size = new System.Drawing.Size(107, 20);
this.autoTestParamTextBox.TabIndex = 86;
//
// printerComboBox
//
this.printerComboBox.Enabled = false;
this.printerComboBox.FormattingEnabled = true;
this.printerComboBox.Location = new System.Drawing.Point(142, 22);
this.printerComboBox.Name = "printerComboBox";
this.printerComboBox.Size = new System.Drawing.Size(249, 21);
this.printerComboBox.TabIndex = 90;
//
// selectPrinterButton
//
this.selectPrinterButton.Enabled = false;
this.selectPrinterButton.Location = new System.Drawing.Point(391, 22);
this.selectPrinterButton.Name = "selectPrinterButton";
this.selectPrinterButton.Size = new System.Drawing.Size(50, 22);
this.selectPrinterButton.TabIndex = 89;
this.selectPrinterButton.Text = "Select";
this.selectPrinterButton.UseVisualStyleBackColor = true;
this.selectPrinterButton.Click += new System.EventHandler(this.selectPrinterButton_Click);
//
// printerLabel
//
this.printerLabel.AutoSize = true;
this.printerLabel.Location = new System.Drawing.Point(16, 25);
this.printerLabel.Name = "printerLabel";
this.printerLabel.Size = new System.Drawing.Size(37, 13);
this.printerLabel.TabIndex = 88;
this.printerLabel.Text = "Printer";
//
// PrinterCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.printerComboBox);
this.Controls.Add(this.selectPrinterButton);
this.Controls.Add(this.printerLabel);
this.Controls.Add(this.label14);
this.Controls.Add(this.autoTestParamTextBox);
this.Controls.Add(this.label3);
@ -902,7 +927,6 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
this.Controls.Add(this.supressPrintingCheckBox);
this.Controls.Add(this.nameTextBox);
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.classNameLabel);
this.Name = "PrinterCfgCtrl";
this.Size = new System.Drawing.Size(455, 350);
this.Load += new System.EventHandler(this.PrinterCfgCtrl_Load);
@ -914,8 +938,7 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
#endregion
private System.Windows.Forms.TextBox nameTextBox;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label classNameLabel;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.CheckBox supressPrintingCheckBox;
private System.Windows.Forms.Label orientationLabel;
private System.Windows.Forms.ComboBox orientationComboBox;
@ -991,5 +1014,8 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
private System.Windows.Forms.TextBox graphLeftTextBox;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox autoTestParamTextBox;
private System.Windows.Forms.ComboBox printerComboBox;
private System.Windows.Forms.Button selectPrinterButton;
private System.Windows.Forms.Label printerLabel;
}
}

View File

@ -1,16 +1,14 @@
///
/// Copyright (c) 2020 Sensus Slovensko a.s.
/// Copyright (c) 2020-2023 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Linq;
using System.Drawing.Printing;
using System.Windows.Forms;
using log4net;
using Common;
using Config.Entities;
using TBF.Rig.Generic;
using TBF.Resources;
using TBF.Rig.Configs;
using TBF.Rig.Generic;
namespace TBF.Rig.Output.Printers.OnePerBatch
{
@ -68,6 +66,9 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
{
for (Culture s = 0; s < Culture.Count; s++) cultureComboBox.Items.Add(s.ToString());
printerComboBox.Items.Add(Strings.default_printer);
foreach (var p in PrinterSettings.InstalledPrinters) printerComboBox.Items.Add(p);
header = config.Header;
commonItems1 = config.CommonItems1;
commonItems2 = config.CommonItems2;
@ -98,8 +99,8 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
void Redraw()
{
if (config == null) return; /// Control was not loaded, settings were not changed
classNameLabel.Text = config.Factory.ClassName;
nameTextBox.Text = config.Name;
printerComboBox.Text = string.IsNullOrEmpty(config.PrinterName) ? Strings.default_printer : config.PrinterName;
autoTestParamTextBox.Text = config.AutoTestParam;
templateTextBox.Text = config.Template;
orientationComboBox.Text = config.PageOrientation.ToString();
@ -158,6 +159,8 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
public void Unlock()
{
nameTextBox.Enabled = true;
printerComboBox.Enabled = true;
selectPrinterButton.Enabled = true;
autoTestParamTextBox.Enabled = true;
templateTextBox.Enabled = true;
orientationComboBox.Enabled = true;
@ -380,6 +383,14 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
config.Name = nameTextBox.Text;
flags |= CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange;
}
string newPrinter = (printerComboBox.Text == Strings.default_printer) ? string.Empty : printerComboBox.Text;
if (config.PrinterName != newPrinter)
{
config.PrinterName = newPrinter;
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
}
if (config.AutoTestParam != autoTestParamTextBox.Text)
{
config.AutoTestParam = autoTestParamTextBox.Text;
@ -633,5 +644,14 @@ namespace TBF.Rig.Output.Printers.OnePerBatch
public void StopResponseHandler() { }
#endregion Configuration Change Handling
private void selectPrinterButton_Click(object sender, EventArgs e)
{
PrintDialog dlg = new PrintDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
printerComboBox.Text = dlg.PrinterSettings.PrinterName;
}
}
}
}

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2017-2020 Sensus Slovensko a.s.
/// Copyright (c) 2017-2023 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -254,7 +254,9 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
BarcodeHeight = printerCfg.BarcodeHeight,
};
new OnePerMeterPrintDocument(batch, cfg, wm, documentName).Print();
}
var pd = new OnePerMeterPrintDocument(batch, cfg, wm, documentName);
if (!string.IsNullOrEmpty(printerCfg.PrinterName)) pd.PrinterSettings.PrinterName = printerCfg.PrinterName;
pd.Print();
}
}
}

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2017-2020 Sensus Slovensko a.s.
/// Copyright (c) 2017-2023 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using System.Xml.Serialization;
@ -18,7 +18,8 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
///
/// Serialized parameters
///
public PageOrientation PageOrientation;
public string PrinterName;
public PageOrientation PageOrientation;
public string Template;
public int TopMargin;
public int BottomMargin;

View File

@ -33,7 +33,6 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
{
this.nameTextBox = new System.Windows.Forms.TextBox();
this.nameLabel = new System.Windows.Forms.Label();
this.classNameLabel = new System.Windows.Forms.Label();
this.supressPrintingCheckBox = new System.Windows.Forms.CheckBox();
this.orientationLabel = new System.Windows.Forms.Label();
this.orientationComboBox = new System.Windows.Forms.ComboBox();
@ -114,12 +113,15 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
this.barcodeTopTextBox = new System.Windows.Forms.TextBox();
this.barcodeLeftTextBox = new System.Windows.Forms.TextBox();
this.barcodeTypeComboBox = new System.Windows.Forms.ComboBox();
this.printerComboBox = new System.Windows.Forms.ComboBox();
this.selectPrinterButton = new System.Windows.Forms.Button();
this.printerLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(142, 22);
this.nameTextBox.Location = new System.Drawing.Point(142, 3);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(146, 20);
this.nameTextBox.TabIndex = 2;
@ -127,26 +129,17 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// nameLabel
//
this.nameLabel.AutoSize = true;
this.nameLabel.Location = new System.Drawing.Point(16, 25);
this.nameLabel.Location = new System.Drawing.Point(16, 6);
this.nameLabel.Name = "nameLabel";
this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.TabIndex = 1;
this.nameLabel.Text = "Name";
//
// classNameLabel
//
this.classNameLabel.AutoSize = true;
this.classNameLabel.Location = new System.Drawing.Point(139, 5);
this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
this.classNameLabel.TabIndex = 0;
this.classNameLabel.Text = "ComonentName";
//
// supressPrintingCheckBox
//
this.supressPrintingCheckBox.AutoSize = true;
this.supressPrintingCheckBox.Enabled = false;
this.supressPrintingCheckBox.Location = new System.Drawing.Point(306, 5);
this.supressPrintingCheckBox.Location = new System.Drawing.Point(357, 93);
this.supressPrintingCheckBox.Name = "supressPrintingCheckBox";
this.supressPrintingCheckBox.Size = new System.Drawing.Size(101, 17);
this.supressPrintingCheckBox.TabIndex = 33;
@ -156,7 +149,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// orientationLabel
//
this.orientationLabel.AutoSize = true;
this.orientationLabel.Location = new System.Drawing.Point(16, 67);
this.orientationLabel.Location = new System.Drawing.Point(16, 70);
this.orientationLabel.Name = "orientationLabel";
this.orientationLabel.Size = new System.Drawing.Size(84, 13);
this.orientationLabel.TabIndex = 5;
@ -166,7 +159,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.orientationComboBox.Enabled = false;
this.orientationComboBox.FormattingEnabled = true;
this.orientationComboBox.Location = new System.Drawing.Point(142, 64);
this.orientationComboBox.Location = new System.Drawing.Point(142, 67);
this.orientationComboBox.Name = "orientationComboBox";
this.orientationComboBox.Size = new System.Drawing.Size(146, 21);
this.orientationComboBox.TabIndex = 6;
@ -174,7 +167,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// topMarginTextBox
//
this.topMarginTextBox.Enabled = false;
this.topMarginTextBox.Location = new System.Drawing.Point(142, 86);
this.topMarginTextBox.Location = new System.Drawing.Point(142, 89);
this.topMarginTextBox.Name = "topMarginTextBox";
this.topMarginTextBox.Size = new System.Drawing.Size(44, 20);
this.topMarginTextBox.TabIndex = 8;
@ -182,7 +175,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// topMarginLabel
//
this.topMarginLabel.AutoSize = true;
this.topMarginLabel.Location = new System.Drawing.Point(16, 88);
this.topMarginLabel.Location = new System.Drawing.Point(16, 91);
this.topMarginLabel.Name = "topMarginLabel";
this.topMarginLabel.Size = new System.Drawing.Size(116, 13);
this.topMarginLabel.TabIndex = 7;
@ -191,7 +184,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// leftMarginTextBox
//
this.leftMarginTextBox.Enabled = false;
this.leftMarginTextBox.Location = new System.Drawing.Point(244, 86);
this.leftMarginTextBox.Location = new System.Drawing.Point(244, 89);
this.leftMarginTextBox.Name = "leftMarginTextBox";
this.leftMarginTextBox.Size = new System.Drawing.Size(44, 20);
this.leftMarginTextBox.TabIndex = 10;
@ -199,7 +192,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// bottomMarginTextBox
//
this.bottomMarginTextBox.Enabled = false;
this.bottomMarginTextBox.Location = new System.Drawing.Point(193, 86);
this.bottomMarginTextBox.Location = new System.Drawing.Point(193, 89);
this.bottomMarginTextBox.Name = "bottomMarginTextBox";
this.bottomMarginTextBox.Size = new System.Drawing.Size(44, 20);
this.bottomMarginTextBox.TabIndex = 9;
@ -208,7 +201,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.cultureComboBox.Enabled = false;
this.cultureComboBox.FormattingEnabled = true;
this.cultureComboBox.Location = new System.Drawing.Point(142, 192);
this.cultureComboBox.Location = new System.Drawing.Point(142, 195);
this.cultureComboBox.Name = "cultureComboBox";
this.cultureComboBox.Size = new System.Drawing.Size(110, 21);
this.cultureComboBox.TabIndex = 32;
@ -216,7 +209,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// cultureLabel
//
this.cultureLabel.AutoSize = true;
this.cultureLabel.Location = new System.Drawing.Point(16, 197);
this.cultureLabel.Location = new System.Drawing.Point(16, 200);
this.cultureLabel.Name = "cultureLabel";
this.cultureLabel.Size = new System.Drawing.Size(42, 13);
this.cultureLabel.TabIndex = 31;
@ -225,7 +218,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// footerButton
//
this.footerButton.Enabled = false;
this.footerButton.Location = new System.Drawing.Point(291, 285);
this.footerButton.Location = new System.Drawing.Point(291, 288);
this.footerButton.Name = "footerButton";
this.footerButton.Size = new System.Drawing.Size(100, 20);
this.footerButton.TabIndex = 41;
@ -236,7 +229,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// headerButton
//
this.headerButton.Enabled = false;
this.headerButton.Location = new System.Drawing.Point(291, 190);
this.headerButton.Location = new System.Drawing.Point(291, 193);
this.headerButton.Name = "headerButton";
this.headerButton.Size = new System.Drawing.Size(100, 20);
this.headerButton.TabIndex = 37;
@ -247,7 +240,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// testItemsButton
//
this.testItemsButton.Enabled = false;
this.testItemsButton.Location = new System.Drawing.Point(291, 228);
this.testItemsButton.Location = new System.Drawing.Point(291, 231);
this.testItemsButton.Name = "testItemsButton";
this.testItemsButton.Size = new System.Drawing.Size(100, 20);
this.testItemsButton.TabIndex = 39;
@ -258,7 +251,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// headerFontLabel
//
this.headerFontLabel.AutoSize = true;
this.headerFontLabel.Location = new System.Drawing.Point(16, 131);
this.headerFontLabel.Location = new System.Drawing.Point(16, 134);
this.headerFontLabel.Name = "headerFontLabel";
this.headerFontLabel.Size = new System.Drawing.Size(112, 13);
this.headerFontLabel.TabIndex = 16;
@ -267,7 +260,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// titleFontLabel
//
this.titleFontLabel.AutoSize = true;
this.titleFontLabel.Location = new System.Drawing.Point(16, 110);
this.titleFontLabel.Location = new System.Drawing.Point(16, 113);
this.titleFontLabel.Name = "titleFontLabel";
this.titleFontLabel.Size = new System.Drawing.Size(97, 13);
this.titleFontLabel.TabIndex = 11;
@ -277,7 +270,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.titleFontFamilyComboBox.Enabled = false;
this.titleFontFamilyComboBox.FormattingEnabled = true;
this.titleFontFamilyComboBox.Location = new System.Drawing.Point(142, 107);
this.titleFontFamilyComboBox.Location = new System.Drawing.Point(142, 110);
this.titleFontFamilyComboBox.Name = "titleFontFamilyComboBox";
this.titleFontFamilyComboBox.Size = new System.Drawing.Size(110, 21);
this.titleFontFamilyComboBox.TabIndex = 12;
@ -286,7 +279,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.headerFontFamilyComboBox.Enabled = false;
this.headerFontFamilyComboBox.FormattingEnabled = true;
this.headerFontFamilyComboBox.Location = new System.Drawing.Point(142, 128);
this.headerFontFamilyComboBox.Location = new System.Drawing.Point(142, 131);
this.headerFontFamilyComboBox.Name = "headerFontFamilyComboBox";
this.headerFontFamilyComboBox.Size = new System.Drawing.Size(110, 21);
this.headerFontFamilyComboBox.TabIndex = 17;
@ -295,7 +288,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.bodyFontFamilyComboBox.Enabled = false;
this.bodyFontFamilyComboBox.FormattingEnabled = true;
this.bodyFontFamilyComboBox.Location = new System.Drawing.Point(142, 149);
this.bodyFontFamilyComboBox.Location = new System.Drawing.Point(142, 152);
this.bodyFontFamilyComboBox.Name = "bodyFontFamilyComboBox";
this.bodyFontFamilyComboBox.Size = new System.Drawing.Size(110, 21);
this.bodyFontFamilyComboBox.TabIndex = 22;
@ -303,7 +296,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// bodyFontLabel
//
this.bodyFontLabel.AutoSize = true;
this.bodyFontLabel.Location = new System.Drawing.Point(16, 152);
this.bodyFontLabel.Location = new System.Drawing.Point(16, 155);
this.bodyFontLabel.Name = "bodyFontLabel";
this.bodyFontLabel.Size = new System.Drawing.Size(101, 13);
this.bodyFontLabel.TabIndex = 21;
@ -312,7 +305,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// titleFontSizeTextBox
//
this.titleFontSizeTextBox.Enabled = false;
this.titleFontSizeTextBox.Location = new System.Drawing.Point(258, 107);
this.titleFontSizeTextBox.Location = new System.Drawing.Point(258, 110);
this.titleFontSizeTextBox.Name = "titleFontSizeTextBox";
this.titleFontSizeTextBox.Size = new System.Drawing.Size(30, 20);
this.titleFontSizeTextBox.TabIndex = 13;
@ -320,7 +313,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// headerFontSizeTextBox
//
this.headerFontSizeTextBox.Enabled = false;
this.headerFontSizeTextBox.Location = new System.Drawing.Point(258, 128);
this.headerFontSizeTextBox.Location = new System.Drawing.Point(258, 131);
this.headerFontSizeTextBox.Name = "headerFontSizeTextBox";
this.headerFontSizeTextBox.Size = new System.Drawing.Size(30, 20);
this.headerFontSizeTextBox.TabIndex = 18;
@ -328,7 +321,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// bodyFontSizeTextBox
//
this.bodyFontSizeTextBox.Enabled = false;
this.bodyFontSizeTextBox.Location = new System.Drawing.Point(258, 149);
this.bodyFontSizeTextBox.Location = new System.Drawing.Point(258, 152);
this.bodyFontSizeTextBox.Name = "bodyFontSizeTextBox";
this.bodyFontSizeTextBox.Size = new System.Drawing.Size(30, 20);
this.bodyFontSizeTextBox.TabIndex = 23;
@ -337,7 +330,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.titleBoldCheckBox.AutoSize = true;
this.titleBoldCheckBox.Enabled = false;
this.titleBoldCheckBox.Location = new System.Drawing.Point(306, 110);
this.titleBoldCheckBox.Location = new System.Drawing.Point(306, 113);
this.titleBoldCheckBox.Name = "titleBoldCheckBox";
this.titleBoldCheckBox.Size = new System.Drawing.Size(15, 14);
this.titleBoldCheckBox.TabIndex = 14;
@ -347,7 +340,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.titleItalicCheckBox.AutoSize = true;
this.titleItalicCheckBox.Enabled = false;
this.titleItalicCheckBox.Location = new System.Drawing.Point(334, 110);
this.titleItalicCheckBox.Location = new System.Drawing.Point(331, 113);
this.titleItalicCheckBox.Name = "titleItalicCheckBox";
this.titleItalicCheckBox.Size = new System.Drawing.Size(15, 14);
this.titleItalicCheckBox.TabIndex = 15;
@ -357,7 +350,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.headerItalicCheckBox.AutoSize = true;
this.headerItalicCheckBox.Enabled = false;
this.headerItalicCheckBox.Location = new System.Drawing.Point(334, 131);
this.headerItalicCheckBox.Location = new System.Drawing.Point(331, 134);
this.headerItalicCheckBox.Name = "headerItalicCheckBox";
this.headerItalicCheckBox.Size = new System.Drawing.Size(15, 14);
this.headerItalicCheckBox.TabIndex = 20;
@ -367,7 +360,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.headerBoldCheckBox.AutoSize = true;
this.headerBoldCheckBox.Enabled = false;
this.headerBoldCheckBox.Location = new System.Drawing.Point(306, 131);
this.headerBoldCheckBox.Location = new System.Drawing.Point(306, 134);
this.headerBoldCheckBox.Name = "headerBoldCheckBox";
this.headerBoldCheckBox.Size = new System.Drawing.Size(15, 14);
this.headerBoldCheckBox.TabIndex = 19;
@ -377,7 +370,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.bodyItalicCheckBox.AutoSize = true;
this.bodyItalicCheckBox.Enabled = false;
this.bodyItalicCheckBox.Location = new System.Drawing.Point(334, 152);
this.bodyItalicCheckBox.Location = new System.Drawing.Point(331, 155);
this.bodyItalicCheckBox.Name = "bodyItalicCheckBox";
this.bodyItalicCheckBox.Size = new System.Drawing.Size(15, 14);
this.bodyItalicCheckBox.TabIndex = 25;
@ -387,7 +380,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.bodyBoldCheckBox.AutoSize = true;
this.bodyBoldCheckBox.Enabled = false;
this.bodyBoldCheckBox.Location = new System.Drawing.Point(306, 152);
this.bodyBoldCheckBox.Location = new System.Drawing.Point(306, 155);
this.bodyBoldCheckBox.Name = "bodyBoldCheckBox";
this.bodyBoldCheckBox.Size = new System.Drawing.Size(15, 14);
this.bodyBoldCheckBox.TabIndex = 24;
@ -397,7 +390,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label1.Location = new System.Drawing.Point(296, 94);
this.label1.Location = new System.Drawing.Point(296, 97);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 13);
this.label1.TabIndex = 37;
@ -407,7 +400,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label2.Location = new System.Drawing.Point(330, 94);
this.label2.Location = new System.Drawing.Point(327, 97);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(24, 13);
this.label2.TabIndex = 38;
@ -416,7 +409,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// testItems2Button
//
this.testItems2Button.Enabled = false;
this.testItems2Button.Location = new System.Drawing.Point(291, 247);
this.testItems2Button.Location = new System.Drawing.Point(291, 250);
this.testItems2Button.Name = "testItems2Button";
this.testItems2Button.Size = new System.Drawing.Size(100, 20);
this.testItems2Button.TabIndex = 40;
@ -428,7 +421,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.goodOnlyCheckBox.AutoSize = true;
this.goodOnlyCheckBox.Enabled = false;
this.goodOnlyCheckBox.Location = new System.Drawing.Point(306, 21);
this.goodOnlyCheckBox.Location = new System.Drawing.Point(357, 107);
this.goodOnlyCheckBox.Name = "goodOnlyCheckBox";
this.goodOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
this.goodOnlyCheckBox.TabIndex = 34;
@ -438,7 +431,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// templateTextBox
//
this.templateTextBox.Enabled = false;
this.templateTextBox.Location = new System.Drawing.Point(142, 43);
this.templateTextBox.Location = new System.Drawing.Point(142, 46);
this.templateTextBox.Name = "templateTextBox";
this.templateTextBox.Size = new System.Drawing.Size(146, 20);
this.templateTextBox.TabIndex = 4;
@ -446,7 +439,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// templateLabel
//
this.templateLabel.AutoSize = true;
this.templateLabel.Location = new System.Drawing.Point(16, 46);
this.templateLabel.Location = new System.Drawing.Point(16, 49);
this.templateLabel.Name = "templateLabel";
this.templateLabel.Size = new System.Drawing.Size(51, 13);
this.templateLabel.TabIndex = 3;
@ -455,7 +448,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// docNameLabel
//
this.docNameLabel.AutoSize = true;
this.docNameLabel.Location = new System.Drawing.Point(297, 41);
this.docNameLabel.Location = new System.Drawing.Point(297, 46);
this.docNameLabel.Name = "docNameLabel";
this.docNameLabel.Size = new System.Drawing.Size(127, 13);
this.docNameLabel.TabIndex = 42;
@ -464,7 +457,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// docNameTextBox
//
this.docNameTextBox.Enabled = false;
this.docNameTextBox.Location = new System.Drawing.Point(302, 69);
this.docNameTextBox.Location = new System.Drawing.Point(302, 72);
this.docNameTextBox.Name = "docNameTextBox";
this.docNameTextBox.Size = new System.Drawing.Size(151, 20);
this.docNameTextBox.TabIndex = 43;
@ -473,7 +466,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.footerItalicCheckBox.AutoSize = true;
this.footerItalicCheckBox.Enabled = false;
this.footerItalicCheckBox.Location = new System.Drawing.Point(334, 173);
this.footerItalicCheckBox.Location = new System.Drawing.Point(331, 176);
this.footerItalicCheckBox.Name = "footerItalicCheckBox";
this.footerItalicCheckBox.Size = new System.Drawing.Size(15, 14);
this.footerItalicCheckBox.TabIndex = 30;
@ -483,7 +476,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.footerBoldCheckBox.AutoSize = true;
this.footerBoldCheckBox.Enabled = false;
this.footerBoldCheckBox.Location = new System.Drawing.Point(306, 173);
this.footerBoldCheckBox.Location = new System.Drawing.Point(306, 176);
this.footerBoldCheckBox.Name = "footerBoldCheckBox";
this.footerBoldCheckBox.Size = new System.Drawing.Size(15, 14);
this.footerBoldCheckBox.TabIndex = 29;
@ -492,7 +485,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// footerFontSizeTextBox
//
this.footerFontSizeTextBox.Enabled = false;
this.footerFontSizeTextBox.Location = new System.Drawing.Point(258, 170);
this.footerFontSizeTextBox.Location = new System.Drawing.Point(258, 173);
this.footerFontSizeTextBox.Name = "footerFontSizeTextBox";
this.footerFontSizeTextBox.Size = new System.Drawing.Size(30, 20);
this.footerFontSizeTextBox.TabIndex = 28;
@ -501,7 +494,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.footerFontFamilyComboBox.Enabled = false;
this.footerFontFamilyComboBox.FormattingEnabled = true;
this.footerFontFamilyComboBox.Location = new System.Drawing.Point(142, 170);
this.footerFontFamilyComboBox.Location = new System.Drawing.Point(142, 173);
this.footerFontFamilyComboBox.Name = "footerFontFamilyComboBox";
this.footerFontFamilyComboBox.Size = new System.Drawing.Size(110, 21);
this.footerFontFamilyComboBox.TabIndex = 27;
@ -509,7 +502,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// footerFontLabel
//
this.footerFontLabel.AutoSize = true;
this.footerFontLabel.Location = new System.Drawing.Point(16, 173);
this.footerFontLabel.Location = new System.Drawing.Point(16, 176);
this.footerFontLabel.Name = "footerFontLabel";
this.footerFontLabel.Size = new System.Drawing.Size(107, 13);
this.footerFontLabel.TabIndex = 26;
@ -518,7 +511,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// imageNameTextBox
//
this.imageNameTextBox.Enabled = false;
this.imageNameTextBox.Location = new System.Drawing.Point(287, 306);
this.imageNameTextBox.Location = new System.Drawing.Point(287, 308);
this.imageNameTextBox.Name = "imageNameTextBox";
this.imageNameTextBox.Size = new System.Drawing.Size(166, 20);
this.imageNameTextBox.TabIndex = 44;
@ -526,7 +519,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// imageLeftTextBox
//
this.imageLeftTextBox.Enabled = false;
this.imageLeftTextBox.Location = new System.Drawing.Point(141, 306);
this.imageLeftTextBox.Location = new System.Drawing.Point(141, 309);
this.imageLeftTextBox.Name = "imageLeftTextBox";
this.imageLeftTextBox.Size = new System.Drawing.Size(33, 20);
this.imageLeftTextBox.TabIndex = 46;
@ -534,7 +527,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// imageTopTextBox
//
this.imageTopTextBox.Enabled = false;
this.imageTopTextBox.Location = new System.Drawing.Point(177, 306);
this.imageTopTextBox.Location = new System.Drawing.Point(177, 309);
this.imageTopTextBox.Name = "imageTopTextBox";
this.imageTopTextBox.Size = new System.Drawing.Size(31, 20);
this.imageTopTextBox.TabIndex = 47;
@ -542,7 +535,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// imageWidthTextBox
//
this.imageWidthTextBox.Enabled = false;
this.imageWidthTextBox.Location = new System.Drawing.Point(211, 306);
this.imageWidthTextBox.Location = new System.Drawing.Point(211, 309);
this.imageWidthTextBox.Name = "imageWidthTextBox";
this.imageWidthTextBox.Size = new System.Drawing.Size(31, 20);
this.imageWidthTextBox.TabIndex = 48;
@ -550,7 +543,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// imageHeightTextBox
//
this.imageHeightTextBox.Enabled = false;
this.imageHeightTextBox.Location = new System.Drawing.Point(245, 306);
this.imageHeightTextBox.Location = new System.Drawing.Point(245, 309);
this.imageHeightTextBox.Name = "imageHeightTextBox";
this.imageHeightTextBox.Size = new System.Drawing.Size(31, 20);
this.imageHeightTextBox.TabIndex = 49;
@ -558,7 +551,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(17, 309);
this.label4.Location = new System.Drawing.Point(17, 312);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(115, 13);
this.label4.TabIndex = 50;
@ -567,7 +560,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(55, 269);
this.label8.Location = new System.Drawing.Point(55, 272);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(224, 13);
this.label8.TabIndex = 57;
@ -576,7 +569,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(172, 219);
this.label6.Location = new System.Drawing.Point(172, 222);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(15, 13);
this.label6.TabIndex = 67;
@ -585,7 +578,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// colW0TextBox
//
this.colW0TextBox.Enabled = false;
this.colW0TextBox.Location = new System.Drawing.Point(142, 216);
this.colW0TextBox.Location = new System.Drawing.Point(142, 219);
this.colW0TextBox.Name = "colW0TextBox";
this.colW0TextBox.Size = new System.Drawing.Size(30, 20);
this.colW0TextBox.TabIndex = 66;
@ -593,7 +586,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(16, 219);
this.label5.Location = new System.Drawing.Point(16, 222);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(97, 13);
this.label5.TabIndex = 58;
@ -602,7 +595,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(264, 219);
this.label7.Location = new System.Drawing.Point(264, 222);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(15, 13);
this.label7.TabIndex = 62;
@ -611,7 +604,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(218, 219);
this.label9.Location = new System.Drawing.Point(218, 222);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(15, 13);
this.label9.TabIndex = 60;
@ -620,7 +613,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// colW2TextBox
//
this.colW2TextBox.Enabled = false;
this.colW2TextBox.Location = new System.Drawing.Point(234, 216);
this.colW2TextBox.Location = new System.Drawing.Point(234, 219);
this.colW2TextBox.Name = "colW2TextBox";
this.colW2TextBox.Size = new System.Drawing.Size(30, 20);
this.colW2TextBox.TabIndex = 61;
@ -628,7 +621,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// colW1TextBox
//
this.colW1TextBox.Enabled = false;
this.colW1TextBox.Location = new System.Drawing.Point(188, 216);
this.colW1TextBox.Location = new System.Drawing.Point(188, 219);
this.colW1TextBox.Name = "colW1TextBox";
this.colW1TextBox.Size = new System.Drawing.Size(30, 20);
this.colW1TextBox.TabIndex = 59;
@ -636,7 +629,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// commonItems3Button
//
this.commonItems3Button.Enabled = false;
this.commonItems3Button.Location = new System.Drawing.Point(397, 209);
this.commonItems3Button.Location = new System.Drawing.Point(397, 212);
this.commonItems3Button.Name = "commonItems3Button";
this.commonItems3Button.Size = new System.Drawing.Size(47, 20);
this.commonItems3Button.TabIndex = 65;
@ -647,7 +640,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// commonItems2Button
//
this.commonItems2Button.Enabled = false;
this.commonItems2Button.Location = new System.Drawing.Point(344, 209);
this.commonItems2Button.Location = new System.Drawing.Point(344, 212);
this.commonItems2Button.Name = "commonItems2Button";
this.commonItems2Button.Size = new System.Drawing.Size(47, 20);
this.commonItems2Button.TabIndex = 64;
@ -658,7 +651,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// commonItems1Button
//
this.commonItems1Button.Enabled = false;
this.commonItems1Button.Location = new System.Drawing.Point(291, 209);
this.commonItems1Button.Location = new System.Drawing.Point(291, 212);
this.commonItems1Button.Name = "commonItems1Button";
this.commonItems1Button.Size = new System.Drawing.Size(47, 20);
this.commonItems1Button.TabIndex = 63;
@ -669,7 +662,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(172, 244);
this.label10.Location = new System.Drawing.Point(172, 247);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(15, 13);
this.label10.TabIndex = 74;
@ -678,7 +671,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// belowW0TextBox
//
this.belowW0TextBox.Enabled = false;
this.belowW0TextBox.Location = new System.Drawing.Point(142, 241);
this.belowW0TextBox.Location = new System.Drawing.Point(142, 244);
this.belowW0TextBox.Name = "belowW0TextBox";
this.belowW0TextBox.Size = new System.Drawing.Size(30, 20);
this.belowW0TextBox.TabIndex = 73;
@ -686,7 +679,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(16, 244);
this.label11.Location = new System.Drawing.Point(16, 247);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(97, 13);
this.label11.TabIndex = 68;
@ -695,7 +688,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(264, 244);
this.label12.Location = new System.Drawing.Point(264, 247);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(15, 13);
this.label12.TabIndex = 72;
@ -704,7 +697,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(218, 244);
this.label13.Location = new System.Drawing.Point(218, 247);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(15, 13);
this.label13.TabIndex = 70;
@ -713,7 +706,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// belowW2TextBox
//
this.belowW2TextBox.Enabled = false;
this.belowW2TextBox.Location = new System.Drawing.Point(234, 241);
this.belowW2TextBox.Location = new System.Drawing.Point(234, 244);
this.belowW2TextBox.Name = "belowW2TextBox";
this.belowW2TextBox.Size = new System.Drawing.Size(30, 20);
this.belowW2TextBox.TabIndex = 71;
@ -721,7 +714,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// belowW1TextBox
//
this.belowW1TextBox.Enabled = false;
this.belowW1TextBox.Location = new System.Drawing.Point(188, 241);
this.belowW1TextBox.Location = new System.Drawing.Point(188, 244);
this.belowW1TextBox.Name = "belowW1TextBox";
this.belowW1TextBox.Size = new System.Drawing.Size(30, 20);
this.belowW1TextBox.TabIndex = 69;
@ -729,7 +722,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// belowItems3Button
//
this.belowItems3Button.Enabled = false;
this.belowItems3Button.Location = new System.Drawing.Point(397, 266);
this.belowItems3Button.Location = new System.Drawing.Point(397, 269);
this.belowItems3Button.Name = "belowItems3Button";
this.belowItems3Button.Size = new System.Drawing.Size(47, 20);
this.belowItems3Button.TabIndex = 77;
@ -740,7 +733,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// belowItems2Button
//
this.belowItems2Button.Enabled = false;
this.belowItems2Button.Location = new System.Drawing.Point(344, 266);
this.belowItems2Button.Location = new System.Drawing.Point(344, 269);
this.belowItems2Button.Name = "belowItems2Button";
this.belowItems2Button.Size = new System.Drawing.Size(47, 20);
this.belowItems2Button.TabIndex = 76;
@ -751,7 +744,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// belowItems1Button
//
this.belowItems1Button.Enabled = false;
this.belowItems1Button.Location = new System.Drawing.Point(291, 266);
this.belowItems1Button.Location = new System.Drawing.Point(291, 269);
this.belowItems1Button.Name = "belowItems1Button";
this.belowItems1Button.Size = new System.Drawing.Size(47, 20);
this.belowItems1Button.TabIndex = 75;
@ -763,7 +756,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.table1FormComboBox.Enabled = false;
this.table1FormComboBox.FormattingEnabled = true;
this.table1FormComboBox.Location = new System.Drawing.Point(392, 237);
this.table1FormComboBox.Location = new System.Drawing.Point(392, 240);
this.table1FormComboBox.Name = "table1FormComboBox";
this.table1FormComboBox.Size = new System.Drawing.Size(61, 21);
this.table1FormComboBox.TabIndex = 78;
@ -771,7 +764,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(17, 288);
this.label3.Location = new System.Drawing.Point(17, 291);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(97, 13);
this.label3.TabIndex = 83;
@ -780,7 +773,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// graphHeightTextBox
//
this.graphHeightTextBox.Enabled = false;
this.graphHeightTextBox.Location = new System.Drawing.Point(245, 285);
this.graphHeightTextBox.Location = new System.Drawing.Point(245, 288);
this.graphHeightTextBox.Name = "graphHeightTextBox";
this.graphHeightTextBox.Size = new System.Drawing.Size(31, 20);
this.graphHeightTextBox.TabIndex = 82;
@ -788,7 +781,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// graphWidthTextBox
//
this.graphWidthTextBox.Enabled = false;
this.graphWidthTextBox.Location = new System.Drawing.Point(211, 285);
this.graphWidthTextBox.Location = new System.Drawing.Point(211, 288);
this.graphWidthTextBox.Name = "graphWidthTextBox";
this.graphWidthTextBox.Size = new System.Drawing.Size(31, 20);
this.graphWidthTextBox.TabIndex = 81;
@ -796,7 +789,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// graphTopTextBox
//
this.graphTopTextBox.Enabled = false;
this.graphTopTextBox.Location = new System.Drawing.Point(177, 285);
this.graphTopTextBox.Location = new System.Drawing.Point(177, 288);
this.graphTopTextBox.Name = "graphTopTextBox";
this.graphTopTextBox.Size = new System.Drawing.Size(31, 20);
this.graphTopTextBox.TabIndex = 80;
@ -804,7 +797,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// graphLeftTextBox
//
this.graphLeftTextBox.Enabled = false;
this.graphLeftTextBox.Location = new System.Drawing.Point(141, 285);
this.graphLeftTextBox.Location = new System.Drawing.Point(141, 288);
this.graphLeftTextBox.Name = "graphLeftTextBox";
this.graphLeftTextBox.Size = new System.Drawing.Size(33, 20);
this.graphLeftTextBox.TabIndex = 79;
@ -812,7 +805,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(339, 56);
this.label14.Location = new System.Drawing.Point(339, 59);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(120, 13);
this.label14.TabIndex = 84;
@ -821,7 +814,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// barcodeLabel
//
this.barcodeLabel.AutoSize = true;
this.barcodeLabel.Location = new System.Drawing.Point(17, 330);
this.barcodeLabel.Location = new System.Drawing.Point(17, 333);
this.barcodeLabel.Name = "barcodeLabel";
this.barcodeLabel.Size = new System.Drawing.Size(121, 13);
this.barcodeLabel.TabIndex = 89;
@ -830,7 +823,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// barcodeHeightTextBox
//
this.barcodeHeightTextBox.Enabled = false;
this.barcodeHeightTextBox.Location = new System.Drawing.Point(245, 327);
this.barcodeHeightTextBox.Location = new System.Drawing.Point(245, 330);
this.barcodeHeightTextBox.Name = "barcodeHeightTextBox";
this.barcodeHeightTextBox.Size = new System.Drawing.Size(31, 20);
this.barcodeHeightTextBox.TabIndex = 88;
@ -838,7 +831,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// barcodeWidthTextBox
//
this.barcodeWidthTextBox.Enabled = false;
this.barcodeWidthTextBox.Location = new System.Drawing.Point(211, 327);
this.barcodeWidthTextBox.Location = new System.Drawing.Point(211, 330);
this.barcodeWidthTextBox.Name = "barcodeWidthTextBox";
this.barcodeWidthTextBox.Size = new System.Drawing.Size(31, 20);
this.barcodeWidthTextBox.TabIndex = 87;
@ -846,7 +839,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// barcodeTopTextBox
//
this.barcodeTopTextBox.Enabled = false;
this.barcodeTopTextBox.Location = new System.Drawing.Point(177, 327);
this.barcodeTopTextBox.Location = new System.Drawing.Point(177, 330);
this.barcodeTopTextBox.Name = "barcodeTopTextBox";
this.barcodeTopTextBox.Size = new System.Drawing.Size(31, 20);
this.barcodeTopTextBox.TabIndex = 86;
@ -854,7 +847,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
// barcodeLeftTextBox
//
this.barcodeLeftTextBox.Enabled = false;
this.barcodeLeftTextBox.Location = new System.Drawing.Point(141, 327);
this.barcodeLeftTextBox.Location = new System.Drawing.Point(141, 330);
this.barcodeLeftTextBox.Name = "barcodeLeftTextBox";
this.barcodeLeftTextBox.Size = new System.Drawing.Size(33, 20);
this.barcodeLeftTextBox.TabIndex = 85;
@ -863,15 +856,47 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
//
this.barcodeTypeComboBox.Enabled = false;
this.barcodeTypeComboBox.FormattingEnabled = true;
this.barcodeTypeComboBox.Location = new System.Drawing.Point(287, 327);
this.barcodeTypeComboBox.Location = new System.Drawing.Point(287, 329);
this.barcodeTypeComboBox.Name = "barcodeTypeComboBox";
this.barcodeTypeComboBox.Size = new System.Drawing.Size(166, 21);
this.barcodeTypeComboBox.TabIndex = 90;
//
// printerComboBox
//
this.printerComboBox.Enabled = false;
this.printerComboBox.FormattingEnabled = true;
this.printerComboBox.Location = new System.Drawing.Point(142, 24);
this.printerComboBox.Name = "printerComboBox";
this.printerComboBox.Size = new System.Drawing.Size(249, 21);
this.printerComboBox.TabIndex = 93;
//
// selectPrinterButton
//
this.selectPrinterButton.Enabled = false;
this.selectPrinterButton.Location = new System.Drawing.Point(392, 23);
this.selectPrinterButton.Name = "selectPrinterButton";
this.selectPrinterButton.Size = new System.Drawing.Size(61, 22);
this.selectPrinterButton.TabIndex = 92;
this.selectPrinterButton.Text = "Select";
this.selectPrinterButton.UseVisualStyleBackColor = true;
this.selectPrinterButton.Click += new System.EventHandler(this.selectPrinterButton_Click);
//
// printerLabel
//
this.printerLabel.AutoSize = true;
this.printerLabel.Location = new System.Drawing.Point(16, 27);
this.printerLabel.Name = "printerLabel";
this.printerLabel.Size = new System.Drawing.Size(37, 13);
this.printerLabel.TabIndex = 91;
this.printerLabel.Text = "Printer";
//
// PrinterCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.printerComboBox);
this.Controls.Add(this.selectPrinterButton);
this.Controls.Add(this.printerLabel);
this.Controls.Add(this.barcodeTypeComboBox);
this.Controls.Add(this.barcodeLabel);
this.Controls.Add(this.barcodeHeightTextBox);
@ -954,7 +979,6 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
this.Controls.Add(this.supressPrintingCheckBox);
this.Controls.Add(this.nameTextBox);
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.classNameLabel);
this.Name = "PrinterCfgCtrl";
this.Size = new System.Drawing.Size(455, 350);
this.Load += new System.EventHandler(this.PrinterCfgCtrl_Load);
@ -966,8 +990,7 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
#endregion
private System.Windows.Forms.TextBox nameTextBox;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label classNameLabel;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.CheckBox supressPrintingCheckBox;
private System.Windows.Forms.Label orientationLabel;
private System.Windows.Forms.ComboBox orientationComboBox;
@ -1048,5 +1071,8 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
private System.Windows.Forms.TextBox barcodeTopTextBox;
private System.Windows.Forms.TextBox barcodeLeftTextBox;
private System.Windows.Forms.ComboBox barcodeTypeComboBox;
private System.Windows.Forms.ComboBox printerComboBox;
private System.Windows.Forms.Button selectPrinterButton;
private System.Windows.Forms.Label printerLabel;
}
}

View File

@ -1,17 +1,15 @@
///
/// Copyright (c) 2017-2020 Sensus Slovensko a.s.
/// Copyright (c) 2017-2023 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Linq;
using System.Drawing.Printing;
using System.Windows.Forms;
using log4net;
using Common;
using Config.Entities;
using Results.Output.Printers;
using TBF.Rig.Generic;
using TBF.Resources;
using TBF.Rig.Configs;
using TBF.Rig.Generic;
namespace TBF.Rig.Output.Printers.OnePerMeter
{
@ -74,6 +72,9 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
{
for (Culture s = 0; s < Culture.Count; s++) cultureComboBox.Items.Add(s.ToString());
printerComboBox.Items.Add(Strings.default_printer);
foreach (var p in PrinterSettings.InstalledPrinters) printerComboBox.Items.Add(p);
header = config.Header;
commonItems1 = config.CommonItems1;
commonItems2 = config.CommonItems2;
@ -104,8 +105,8 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
void Redraw()
{
if (config == null) return; /// Control was not loaded, settings were not changed
classNameLabel.Text = config.Factory.ClassName;
nameTextBox.Text = config.Name;
printerComboBox.Text = string.IsNullOrEmpty(config.PrinterName) ? Strings.default_printer : config.PrinterName;
templateTextBox.Text = config.Template;
orientationComboBox.Text = config.PageOrientation.ToString();
topMarginTextBox.Text = config.TopMargin.ToString();
@ -169,6 +170,8 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
public void Unlock()
{
nameTextBox.Enabled = true;
printerComboBox.Enabled = true;
selectPrinterButton.Enabled = true;
templateTextBox.Enabled = true;
orientationComboBox.Enabled = true;
topMarginTextBox.Enabled = true;
@ -422,6 +425,13 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
flags |= CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange;
}
string newPrinter = (printerComboBox.Text == Strings.default_printer) ? string.Empty : printerComboBox.Text;
if (config.PrinterName != newPrinter)
{
config.PrinterName = newPrinter;
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
}
flags |= UpdateDifferent(ref config.Template, templateTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
if (config.PageOrientation != GetOrientation(orientationComboBox.Text))
@ -683,5 +693,14 @@ namespace TBF.Rig.Output.Printers.OnePerMeter
public void StopResponseHandler() { }
#endregion Configuration Change Handling
private void selectPrinterButton_Click(object sender, EventArgs e)
{
PrintDialog dlg = new PrintDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
printerComboBox.Text = dlg.PrinterSettings.PrinterName;
}
}
}
}

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2017 Sensus Slovensko a.s.
/// Copyright (c) 2017-2023 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -215,8 +215,10 @@ namespace TBF.Rig.Output.Printers.Zapiska
Footer = printerCfg.Footer,
};
new Results.Output.Printers.Zapiska.ZapiskaPrintDocument(batch, cfg, documentName).Print();
}
var pd = new Results.Output.Printers.Zapiska.ZapiskaPrintDocument(batch, cfg, documentName);
if (!string.IsNullOrEmpty(printerCfg.PrinterName)) pd.PrinterSettings.PrinterName = printerCfg.PrinterName;
pd.Print();
}
}
}
}

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2017 Sensus Slovensko a.s.
/// Copyright (c) 2017-2023 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using System.Xml.Serialization;
@ -18,7 +18,8 @@ namespace TBF.Rig.Output.Printers.Zapiska
///
/// Serialized parameters
///
public PageOrientation PageOrientation;
public string PrinterName;
public PageOrientation PageOrientation;
public string Template;
public int TopMargin;
public int BottomMargin;

View File

@ -33,7 +33,6 @@ namespace TBF.Rig.Output.Printers.Zapiska
{
this.nameTextBox = new System.Windows.Forms.TextBox();
this.nameLabel = new System.Windows.Forms.Label();
this.classNameLabel = new System.Windows.Forms.Label();
this.supressPrintingCheckBox = new System.Windows.Forms.CheckBox();
this.orientationLabel = new System.Windows.Forms.Label();
this.orientationComboBox = new System.Windows.Forms.ComboBox();
@ -93,12 +92,15 @@ namespace TBF.Rig.Output.Printers.Zapiska
this.footerFontLabel = new System.Windows.Forms.Label();
this.templateTextBox = new System.Windows.Forms.TextBox();
this.templateLabel = new System.Windows.Forms.Label();
this.printerComboBox = new System.Windows.Forms.ComboBox();
this.selectPrinterButton = new System.Windows.Forms.Button();
this.printerLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(142, 23);
this.nameTextBox.Location = new System.Drawing.Point(142, 1);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(218, 20);
this.nameTextBox.TabIndex = 2;
@ -106,21 +108,12 @@ namespace TBF.Rig.Output.Printers.Zapiska
// nameLabel
//
this.nameLabel.AutoSize = true;
this.nameLabel.Location = new System.Drawing.Point(16, 26);
this.nameLabel.Location = new System.Drawing.Point(16, 4);
this.nameLabel.Name = "nameLabel";
this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.TabIndex = 1;
this.nameLabel.Text = "Name";
//
// classNameLabel
//
this.classNameLabel.AutoSize = true;
this.classNameLabel.Location = new System.Drawing.Point(139, 6);
this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
this.classNameLabel.TabIndex = 0;
this.classNameLabel.Text = "ComonentName";
//
// supressPrintingCheckBox
//
this.supressPrintingCheckBox.AutoSize = true;
@ -669,10 +662,42 @@ namespace TBF.Rig.Output.Printers.Zapiska
this.templateLabel.TabIndex = 59;
this.templateLabel.Text = "Template";
//
// printerComboBox
//
this.printerComboBox.Enabled = false;
this.printerComboBox.FormattingEnabled = true;
this.printerComboBox.Location = new System.Drawing.Point(142, 22);
this.printerComboBox.Name = "printerComboBox";
this.printerComboBox.Size = new System.Drawing.Size(218, 21);
this.printerComboBox.TabIndex = 63;
//
// selectPrinterButton
//
this.selectPrinterButton.Enabled = false;
this.selectPrinterButton.Location = new System.Drawing.Point(366, 21);
this.selectPrinterButton.Name = "selectPrinterButton";
this.selectPrinterButton.Size = new System.Drawing.Size(50, 22);
this.selectPrinterButton.TabIndex = 62;
this.selectPrinterButton.Text = "Select";
this.selectPrinterButton.UseVisualStyleBackColor = true;
this.selectPrinterButton.Click += new System.EventHandler(this.selectPrinterButton_Click);
//
// printerLabel
//
this.printerLabel.AutoSize = true;
this.printerLabel.Location = new System.Drawing.Point(16, 25);
this.printerLabel.Name = "printerLabel";
this.printerLabel.Size = new System.Drawing.Size(37, 13);
this.printerLabel.TabIndex = 61;
this.printerLabel.Text = "Printer";
//
// PrinterCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.printerComboBox);
this.Controls.Add(this.selectPrinterButton);
this.Controls.Add(this.printerLabel);
this.Controls.Add(this.templateTextBox);
this.Controls.Add(this.templateLabel);
this.Controls.Add(this.footerItalicCheckBox);
@ -734,7 +759,6 @@ namespace TBF.Rig.Output.Printers.Zapiska
this.Controls.Add(this.supressPrintingCheckBox);
this.Controls.Add(this.nameTextBox);
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.classNameLabel);
this.Name = "PrinterCfgCtrl";
this.Size = new System.Drawing.Size(492, 350);
this.Load += new System.EventHandler(this.PrinterCfgCtrl_Load);
@ -746,8 +770,7 @@ namespace TBF.Rig.Output.Printers.Zapiska
#endregion
private System.Windows.Forms.TextBox nameTextBox;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label classNameLabel;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.CheckBox supressPrintingCheckBox;
private System.Windows.Forms.Label orientationLabel;
private System.Windows.Forms.ComboBox orientationComboBox;
@ -807,5 +830,8 @@ namespace TBF.Rig.Output.Printers.Zapiska
private System.Windows.Forms.Label footerFontLabel;
private System.Windows.Forms.TextBox templateTextBox;
private System.Windows.Forms.Label templateLabel;
private System.Windows.Forms.ComboBox printerComboBox;
private System.Windows.Forms.Button selectPrinterButton;
private System.Windows.Forms.Label printerLabel;
}
}

View File

@ -1,15 +1,14 @@
///
/// Copyright (c) 2017 Sensus Slovensko a.s.
/// Copyright (c) 2017-2023 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Drawing.Printing;
using System.Windows.Forms;
using log4net;
using Common;
using Config.Entities;
using TBF.Rig.Generic;
using TBF.Resources;
using TBF.Rig.Configs;
using TBF.Rig.Generic;
namespace TBF.Rig.Output.Printers.Zapiska
{
@ -61,6 +60,9 @@ namespace TBF.Rig.Output.Printers.Zapiska
{
for (Culture s = 0; s < Culture.Count; s++) cultureComboBox.Items.Add(s.ToString());
printerComboBox.Items.Add(Strings.default_printer);
foreach (var p in PrinterSettings.InstalledPrinters) printerComboBox.Items.Add(p);
header = config.Header;
commonItems1 = config.CommonItems1;
commonItems2 = config.CommonItems2;
@ -93,8 +95,8 @@ namespace TBF.Rig.Output.Printers.Zapiska
void Redraw()
{
if (config == null) return; /// Control was not loaded, settings were not changed
classNameLabel.Text = config.Factory.ClassName;
nameTextBox.Text = config.Name;
printerComboBox.Text = string.IsNullOrEmpty(config.PrinterName) ? Strings.default_printer : config.PrinterName;
templateTextBox.Text = config.Template;
orientationComboBox.Text = config.PageOrientation.ToString();
topMarginTextBox.Text = config.TopMargin.ToString();
@ -139,6 +141,8 @@ namespace TBF.Rig.Output.Printers.Zapiska
public void Unlock()
{
nameTextBox.Enabled = true;
printerComboBox.Enabled = true;
selectPrinterButton.Enabled = true;
templateTextBox.Enabled = true;
orientationComboBox.Enabled = true;
topMarginTextBox.Enabled = true;
@ -303,6 +307,13 @@ namespace TBF.Rig.Output.Printers.Zapiska
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
}
string newPrinter = (printerComboBox.Text == Strings.default_printer) ? string.Empty : printerComboBox.Text;
if (config.PrinterName != newPrinter)
{
config.PrinterName = newPrinter;
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
}
flags |= UpdateDifferent(ref config.Template, templateTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
if (config.PageOrientation != GetOrientation(orientationComboBox.Text))
@ -516,5 +527,14 @@ namespace TBF.Rig.Output.Printers.Zapiska
public void StopResponseHandler() { }
#endregion Configuration Change Handling
private void selectPrinterButton_Click(object sender, EventArgs e)
{
PrintDialog dlg = new PrintDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
printerComboBox.Text = dlg.PrinterSettings.PrinterName;
}
}
}
}