diff --git a/Results/Output/Printers/Label/LabelPrintDocument.cs b/Results/Output/Printers/Label/LabelPrintDocument.cs
index e18355d19..6faeaeb16 100644
--- a/Results/Output/Printers/Label/LabelPrintDocument.cs
+++ b/Results/Output/Printers/Label/LabelPrintDocument.cs
@@ -4,8 +4,10 @@
using System;
using System.Collections.Generic;
using System.Drawing;
+using System.Drawing.Drawing2D;
using System.Drawing.Printing;
using System.IO;
+using Gma.QrCodeNet.Encoding;
using Config.Entities;
using Results.Resources;
@@ -13,7 +15,9 @@ namespace Results.Output.Printers.Label
{
public class LabelPrintDocument : PrintersCommon
{
- /// Size of the printed area without margins, after taking into account 'pageOrientation'
+ static QrEncoder encoder = new QrEncoder();
+
+ /// Size of the printed area without margins, after taking into account 'pageOrientation'
readonly int printHeight;
readonly int printWidth;
@@ -93,6 +97,44 @@ namespace Results.Output.Printers.Label
e.Graphics.DrawString(item.Print(wm), this.font, Brushes.Black, printArea);
}
}
+
+ if (cfg.DrawSNasBarcode)
+ {
+ if (cfg.IsQR)
+ {
+ QrCode qrCode = encoder.Encode(wm.SerialNr);
+ DrawQR(e.Graphics, qrCode, cfg.BarcodeLeft, cfg.BarcodeTop, cfg.BarcodeWidth, cfg.BarcodeHeight);
+ }
+ else
+ {
+ /// TODO
+ }
+ }
}
+
+
+ public static void DrawQR(Graphics g, QrCode qrCode, float left, float top, float width, float height)
+ {
+ /// Assuming 100 dpi (printer)
+ g.SmoothingMode = SmoothingMode.AntiAlias;
+ g.InterpolationMode = InterpolationMode.HighQualityBicubic;
+ g.PixelOffsetMode = PixelOffsetMode.HighQuality;
+
+ float qrPixWidth = width / qrCode.Matrix.Width;
+ float qrPixHeight = height / qrCode.Matrix.Height;
+ for (int i = 0; i < qrCode.Matrix.Height; i++)
+ {
+ for (int j = 0; j < qrCode.Matrix.Width; j++)
+ {
+ if (qrCode.Matrix[j, i])
+ {
+ g.FillRectangle(Brushes.Black, new RectangleF(left + j * qrPixWidth,
+ top + i * qrPixHeight,
+ qrPixWidth,
+ qrPixHeight));
+ }
+ }
+ }
+ }
}
}
diff --git a/Results/Output/Printers/Label/LabelPrinterCfg.cs b/Results/Output/Printers/Label/LabelPrinterCfg.cs
index 90490cd4b..46c12520d 100644
--- a/Results/Output/Printers/Label/LabelPrinterCfg.cs
+++ b/Results/Output/Printers/Label/LabelPrinterCfg.cs
@@ -1,5 +1,5 @@
///
-/// Copyright (c) 2018 Sensus Slovensko a.s.
+/// Copyright (c) 2018-2020 Sensus Slovensko a.s.
///
namespace Results.Output.Printers.Label
@@ -17,5 +17,11 @@ namespace Results.Output.Printers.Label
public System.Globalization.CultureInfo CultureInfo;
public bool GoodOnly;
public bool SupressPrinting; /// true = Bypass printing
- }
+ public bool DrawSNasBarcode;
+ public bool IsQR;
+ public int BarcodeLeft;
+ public int BarcodeTop;
+ public int BarcodeWidth;
+ public int BarcodeHeight;
+ }
}
diff --git a/Results/Results.csproj b/Results/Results.csproj
index c0ed96111..7cde6d471 100644
--- a/Results/Results.csproj
+++ b/Results/Results.csproj
@@ -38,6 +38,9 @@
..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll
+
+ ..\packages\QrCode.Net.0.4.0.0\net40\Gma.QrCodeNet.Encoding.dll
+
..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll
diff --git a/TBF/BenchControl/Output/Printers/Label/PrintLabelDocument.cs b/TBF/BenchControl/Output/Printers/Label/PrintLabelDocument.cs
deleted file mode 100644
index 94d064133..000000000
--- a/TBF/BenchControl/Output/Printers/Label/PrintLabelDocument.cs
+++ /dev/null
@@ -1,193 +0,0 @@
-///
-/// Copyright (c) 2015 Sensus Metering Systems
-///
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Drawing.Printing;
-using System.IO;
-using Config.Entities;
-using TBF.Resources;
-
-namespace TBF.BenchControl.Output.Printers.Label
-{
- public class PrintLabelDocument : PrintDocument
- {
- const int FontSize = 9;
- const string FontFamilyName = "Arial"; //"Times New Roman";
-
- readonly int paperWidth;
- readonly int paperHeight;
- readonly string templateFile;
-
- /// Property variable for the Font the user wishes to use
- Font font;
-
- ///
- /// Data to print
- ///
- Results.Entities.Batch batch;
-
- ///
- /// Layout and status
- ///
- int nextWMNr; /// nr. of watermeter to be printed as the first one on the next page
- int nrPages;
-
-
- ///
- /// Constructor
- ///
- /// Text to be printed
- public PrintLabelDocument(Results.Entities.Batch batch,
- PageOrientation pageOrientation,
- int paperWidth,
- int paperHeight,
- string templateFile)
- {
- this.batch = batch;
- this.paperWidth = paperWidth;
- this.paperHeight = paperHeight;
- this.templateFile = templateFile;
-
- DefaultPageSettings.Landscape = (pageOrientation == PageOrientation.Landscape);
-
- /// Set print area size and margins (in dots using 80 dpi)
- int printHeight = base.DefaultPageSettings.PaperSize.Height - base.DefaultPageSettings.Margins.Top - base.DefaultPageSettings.Margins.Bottom;
- int printWidth = base.DefaultPageSettings.PaperSize.Width - base.DefaultPageSettings.Margins.Left - base.DefaultPageSettings.Margins.Right;
- int leftMargin = base.DefaultPageSettings.Margins.Left; /// X
- int topMargin = base.DefaultPageSettings.Margins.Top; /// Y
-
- /// Check if the user selected to print in Landscape mode
- /// if they did then we need to swap height/width parameters
- if (DefaultPageSettings.Landscape)
- {
- int tmp = printHeight;
- printHeight = printWidth;
- printWidth = tmp;
- }
-
- /// One watermeter per label/page
- nrPages = batch.WaterMeters.Count;
-
- nextWMNr = 0;
- }
-
-
- ///
- /// Override the default onbeginPrint method of the PrintDocument Object
- ///
- ///
- ///
- protected override void OnBeginPrint(System.Drawing.Printing.PrintEventArgs e)
- {
- base.OnBeginPrint(e);
-
- if (font == null) { font = new Font(FontFamilyName, FontSize, FontStyle.Regular); }
- }
-
-
- ///
- /// Override the default OnPrintPage method of the PrintDocument.
- ///
- ///
- /// This provides the print logic for our document
- protected override void OnPrintPage(System.Drawing.Printing.PrintPageEventArgs e)
- {
- /// Run base code
- base.OnPrintPage(e);
-
- if (File.Exists(templateFile))
- {
- Image img = Image.FromFile(templateFile);
- e.Graphics.DrawImage(new Bitmap(img), new Rectangle(0, 0, paperWidth, paperHeight));
- }
-
- /// Set print area size and margins (in dots using 80 dpi)
- int printHeight = base.DefaultPageSettings.PaperSize.Height - base.DefaultPageSettings.Margins.Top - base.DefaultPageSettings.Margins.Bottom;
- int printWidth = base.DefaultPageSettings.PaperSize.Width - base.DefaultPageSettings.Margins.Left - base.DefaultPageSettings.Margins.Right;
- int leftMargin = base.DefaultPageSettings.Margins.Left; /// X
- int topMargin = base.DefaultPageSettings.Margins.Top; /// Y
-
- /// Check if the user selected to print in Landscape mode
- /// if they did then we need to swap height/width parameters
- if (base.DefaultPageSettings.Landscape)
- {
- int tmp = printHeight;
- printHeight = printWidth;
- printWidth = tmp;
- }
-
- int x = leftMargin;
- int y = topMargin;
-
- /// Use the StringFormat class for the text layout of our document
- StringFormat format = new StringFormat(StringFormatFlags.LineLimit);
-
-
- ///--------
- /// Body
- ///--------
-
- PrintWM(e, nextWMNr);
- nextWMNr++;
- e.HasMorePages = (nextWMNr < batch.WaterMeters.Count);
- }
-
-
- ///
- /// Print one water meter results
- ///
- /// Water meter number (0-based)
- void PrintWM(System.Drawing.Printing.PrintPageEventArgs e, int wmNr)
- {
- if (wmNr >= batch.WaterMeters.Count) return;
-
- Results.Entities.WaterMeter wm = batch.WaterMeters[wmNr];
-
- if (wm == null) return;
-
-
- /// Serial number
- if (!string.IsNullOrEmpty(wm.SerialNr)) PrintAt(e, 20, 62, string.Format("S/N: {0}", wm.SerialNr));
-
- /// Watermeter type
- PrintAt(e, 20, 74, batch.ProtocolTitle);
-
- /// Date
- PrintAt(e, 135, 74, string.Format("{0:dd/MM/yy", batch.EndTime));
-
- Results.WMeterRsltItemSpec item1 = Results.WMeterRsltItemSpec.GetItem(Results.ItemID.Test_name);
-
- Results.WMeterRsltItemSpec item2 = Results.WMeterRsltItemSpec.GetItem(Results.ItemID.Error);
- item2.Units = Config.Unit.Pct;
- item2.Precision = "F2";
- item2.Format = "{0}%";
-
- int printPosition = 1;
- foreach (var mtr in wm.MeterTestRslts)
- {
- item1.TestID = mtr.Name();
- item2.TestID = mtr.Name();
-
- PrintAt(e, 20, 6 + 14 * printPosition, item1.Print(wm));
- PrintAt(e, 78, 6 + 14 * printPosition, item2.Print(wm));
-
- printPosition++;
- }
- }
-
-
- void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, Point p, string text)
- {
- PrintAt(e, p.X, p.Y, text);
- }
-
-
- void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, int x, int y, string text)
- {
- RectangleF printArea = new RectangleF(x, y, 667, 18);
- e.Graphics.DrawString(text, this.font, Brushes.Black, printArea);
- }
- }
-}
diff --git a/TBF/BenchControl/Output/Printers/Label/Printer.cs b/TBF/BenchControl/Output/Printers/Label/Printer.cs
index b56fed008..6536b8390 100644
--- a/TBF/BenchControl/Output/Printers/Label/Printer.cs
+++ b/TBF/BenchControl/Output/Printers/Label/Printer.cs
@@ -76,6 +76,12 @@ namespace TBF.BenchControl.Output.Printers.Label
printerCfg.NrOfCopies = newCfg.NrOfCopies;
printerCfg.GoodOnly = newCfg.GoodOnly;
printerCfg.SupressPrinting = newCfg.SupressPrinting;
+ printerCfg.DrawSNasBarcode = newCfg.DrawSNasBarcode;
+ printerCfg.IsQR = newCfg.IsQR;
+ printerCfg.BarcodeLeft = newCfg.BarcodeLeft;
+ printerCfg.BarcodeTop = newCfg.BarcodeTop;
+ printerCfg.BarcodeWidth = newCfg.BarcodeWidth;
+ printerCfg.BarcodeHeight = newCfg.BarcodeHeight;
ApplyConfig();
}
@@ -131,7 +137,6 @@ namespace TBF.BenchControl.Output.Printers.Label
}
-
void PrintResults(Results.Entities.Batch batch, Results.Entities.WaterMeter wm, string documentName)
{
LabelPrinterCfg cfg = new LabelPrinterCfg
@@ -147,6 +152,12 @@ namespace TBF.BenchControl.Output.Printers.Label
CultureInfo = (printerCfg.Culture == Culture.system) ? Thread.CurrentThread.CurrentCulture : new CultureInfo(printerCfg.Culture.ToString()),
GoodOnly = printerCfg.GoodOnly,
SupressPrinting = printerCfg.SupressPrinting,
+ DrawSNasBarcode = printerCfg.DrawSNasBarcode,
+ IsQR = printerCfg.IsQR,
+ BarcodeLeft = printerCfg.BarcodeLeft,
+ BarcodeTop = printerCfg.BarcodeTop,
+ BarcodeWidth = printerCfg.BarcodeWidth,
+ BarcodeHeight = printerCfg.BarcodeHeight,
};
for (int i = 1; i <= printerCfg.NrOfCopies; i++)
diff --git a/TBF/BenchControl/Output/Printers/Label/PrinterCfg.cs b/TBF/BenchControl/Output/Printers/Label/PrinterCfg.cs
index ec64399ad..0f91176b9 100644
--- a/TBF/BenchControl/Output/Printers/Label/PrinterCfg.cs
+++ b/TBF/BenchControl/Output/Printers/Label/PrinterCfg.cs
@@ -1,5 +1,5 @@
///
-/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
+/// Copyright (c) 2015-2020 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@@ -33,6 +33,14 @@ namespace TBF.BenchControl.Output.Printers.Label
public bool GoodOnly;
public bool SupressPrinting; /// true = Bypass printing
+ public bool DrawSNasBarcode;
+ public bool IsQR;
+ public int BarcodeLeft;
+ public int BarcodeTop;
+ public int BarcodeWidth;
+ public int BarcodeHeight;
+
+
/// Private parameterless constructor invoked by all other (public) constructors
PrinterCfg()
{
@@ -55,18 +63,20 @@ namespace TBF.BenchControl.Output.Printers.Label
NrOfCopies = 1;
GoodOnly = false;
SupressPrinting = false;
+ DrawSNasBarcode = false;
}
public string ToString(int i)
{
- return string.Format("Name={0}, Orientation={1}, PaperWidth={2}, PaperHeight={3}, TemplateFile={4}, GoodOnly={5}, SupressPrinting={6}",
+ return string.Format("Name={0}, Orientation={1}, PaperWidth={2}, PaperHeight={3}, TemplateFile={4}, GoodOnly={5}, SupressPrinting={6}, Barcode={7}",
Name,
PageOrientation,
PaperWidth,
PaperHeight,
Template,
GoodOnly ? "yes" : "no",
- SupressPrinting ? "yes" : "no"
+ SupressPrinting ? "yes" : "no",
+ DrawSNasBarcode ? "yes" : "no"
);
}
}
diff --git a/TBF/BenchControl/Output/Printers/Label/PrinterCfgCtrl.Designer.cs b/TBF/BenchControl/Output/Printers/Label/PrinterCfgCtrl.Designer.cs
index 0be840a9b..fd04c5c4f 100644
--- a/TBF/BenchControl/Output/Printers/Label/PrinterCfgCtrl.Designer.cs
+++ b/TBF/BenchControl/Output/Printers/Label/PrinterCfgCtrl.Designer.cs
@@ -31,296 +31,407 @@ namespace TBF.BenchControl.Output.Printers.Label
///
private void InitializeComponent()
{
- 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();
- this.templateTextBox = new System.Windows.Forms.TextBox();
- this.templateLabel = new System.Windows.Forms.Label();
- this.paperWidthTextBox = new System.Windows.Forms.TextBox();
- this.paperWidthLabel = new System.Windows.Forms.Label();
- this.paperHeightTextBox = new System.Windows.Forms.TextBox();
- this.paperHeightLabel = new System.Windows.Forms.Label();
- this.italicCheckBox = new System.Windows.Forms.CheckBox();
- this.boldCheckBox = new System.Windows.Forms.CheckBox();
- this.fontSizeTextBox = new System.Windows.Forms.TextBox();
- this.fontFamilyComboBox = new System.Windows.Forms.ComboBox();
- this.bodyFontLabel = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.itemsToPrintButton = new System.Windows.Forms.Button();
- this.nrOfCopiesLabel = new System.Windows.Forms.Label();
- this.nrOfCopiesTextBox = new System.Windows.Forms.TextBox();
- this.cultureComboBox = new System.Windows.Forms.ComboBox();
- this.cultureLabel = new System.Windows.Forms.Label();
- this.goodOnlyCheckBox = new System.Windows.Forms.CheckBox();
- this.SuspendLayout();
- //
- // nameTextBox
- //
- this.nameTextBox.Enabled = false;
- this.nameTextBox.Location = new System.Drawing.Point(122, 35);
- this.nameTextBox.Name = "nameTextBox";
- this.nameTextBox.Size = new System.Drawing.Size(130, 20);
- this.nameTextBox.TabIndex = 2;
- //
- // nameLabel
- //
- this.nameLabel.AutoSize = true;
- this.nameLabel.Location = new System.Drawing.Point(8, 38);
- 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(119, 11);
- this.classNameLabel.Name = "classNameLabel";
- this.classNameLabel.Size = new System.Drawing.Size(61, 13);
- this.classNameLabel.TabIndex = 0;
- this.classNameLabel.Text = "Class name";
- //
- // supressPrintingCheckBox
- //
- this.supressPrintingCheckBox.AutoSize = true;
- this.supressPrintingCheckBox.Enabled = false;
- this.supressPrintingCheckBox.Location = new System.Drawing.Point(122, 283);
- this.supressPrintingCheckBox.Name = "supressPrintingCheckBox";
- this.supressPrintingCheckBox.Size = new System.Drawing.Size(101, 17);
- this.supressPrintingCheckBox.TabIndex = 11;
- this.supressPrintingCheckBox.Text = "Supress printing";
- this.supressPrintingCheckBox.UseVisualStyleBackColor = true;
- //
- // orientationLabel
- //
- this.orientationLabel.AutoSize = true;
- this.orientationLabel.Location = new System.Drawing.Point(8, 84);
- this.orientationLabel.Name = "orientationLabel";
- this.orientationLabel.Size = new System.Drawing.Size(84, 13);
- this.orientationLabel.TabIndex = 3;
- this.orientationLabel.Text = "Page orientation";
- //
- // orientationComboBox
- //
- this.orientationComboBox.Enabled = false;
- this.orientationComboBox.FormattingEnabled = true;
- this.orientationComboBox.Location = new System.Drawing.Point(122, 81);
- this.orientationComboBox.Name = "orientationComboBox";
- this.orientationComboBox.Size = new System.Drawing.Size(130, 21);
- this.orientationComboBox.TabIndex = 4;
- //
- // templateTextBox
- //
- this.templateTextBox.Enabled = false;
- this.templateTextBox.Location = new System.Drawing.Point(122, 58);
- this.templateTextBox.Name = "templateTextBox";
- this.templateTextBox.Size = new System.Drawing.Size(228, 20);
- this.templateTextBox.TabIndex = 10;
- //
- // templateLabel
- //
- this.templateLabel.AutoSize = true;
- this.templateLabel.Location = new System.Drawing.Point(8, 61);
- this.templateLabel.Name = "templateLabel";
- this.templateLabel.Size = new System.Drawing.Size(67, 13);
- this.templateLabel.TabIndex = 9;
- this.templateLabel.Text = "Template file";
- //
- // paperWidthTextBox
- //
- this.paperWidthTextBox.Enabled = false;
- this.paperWidthTextBox.Location = new System.Drawing.Point(122, 105);
- this.paperWidthTextBox.Name = "paperWidthTextBox";
- this.paperWidthTextBox.Size = new System.Drawing.Size(51, 20);
- this.paperWidthTextBox.TabIndex = 6;
- //
- // paperWidthLabel
- //
- this.paperWidthLabel.AutoSize = true;
- this.paperWidthLabel.Location = new System.Drawing.Point(8, 108);
- this.paperWidthLabel.Name = "paperWidthLabel";
- this.paperWidthLabel.Size = new System.Drawing.Size(63, 13);
- this.paperWidthLabel.TabIndex = 5;
- this.paperWidthLabel.Text = "Paper width";
- //
- // paperHeightTextBox
- //
- this.paperHeightTextBox.Enabled = false;
- this.paperHeightTextBox.Location = new System.Drawing.Point(122, 128);
- this.paperHeightTextBox.Name = "paperHeightTextBox";
- this.paperHeightTextBox.Size = new System.Drawing.Size(51, 20);
- this.paperHeightTextBox.TabIndex = 8;
- //
- // paperHeightLabel
- //
- this.paperHeightLabel.AutoSize = true;
- this.paperHeightLabel.Location = new System.Drawing.Point(8, 131);
- this.paperHeightLabel.Name = "paperHeightLabel";
- this.paperHeightLabel.Size = new System.Drawing.Size(67, 13);
- this.paperHeightLabel.TabIndex = 7;
- this.paperHeightLabel.Text = "Paper height";
- //
- // bodyItalicCheckBox
- //
- this.italicCheckBox.AutoSize = true;
- this.italicCheckBox.Enabled = false;
- this.italicCheckBox.Location = new System.Drawing.Point(335, 190);
- this.italicCheckBox.Name = "bodyItalicCheckBox";
- this.italicCheckBox.Size = new System.Drawing.Size(15, 14);
- this.italicCheckBox.TabIndex = 47;
- this.italicCheckBox.UseVisualStyleBackColor = true;
- //
- // bodyBoldCheckBox
- //
- this.boldCheckBox.AutoSize = true;
- this.boldCheckBox.Enabled = false;
- this.boldCheckBox.Location = new System.Drawing.Point(307, 190);
- this.boldCheckBox.Name = "bodyBoldCheckBox";
- this.boldCheckBox.Size = new System.Drawing.Size(15, 14);
- this.boldCheckBox.TabIndex = 46;
- this.boldCheckBox.UseVisualStyleBackColor = true;
- //
- // bodyFontSizeTextBox
- //
- this.fontSizeTextBox.Enabled = false;
- this.fontSizeTextBox.Location = new System.Drawing.Point(259, 184);
- this.fontSizeTextBox.Name = "bodyFontSizeTextBox";
- this.fontSizeTextBox.Size = new System.Drawing.Size(29, 20);
- this.fontSizeTextBox.TabIndex = 45;
- //
- // bodyFontFamilyComboBox
- //
- this.fontFamilyComboBox.Enabled = false;
- this.fontFamilyComboBox.FormattingEnabled = true;
- this.fontFamilyComboBox.Location = new System.Drawing.Point(122, 184);
- this.fontFamilyComboBox.Name = "bodyFontFamilyComboBox";
- this.fontFamilyComboBox.Size = new System.Drawing.Size(130, 21);
- this.fontFamilyComboBox.TabIndex = 44;
- //
- // bodyFontLabel
- //
- this.bodyFontLabel.AutoSize = true;
- this.bodyFontLabel.Location = new System.Drawing.Point(8, 187);
- this.bodyFontLabel.Name = "bodyFontLabel";
- this.bodyFontLabel.Size = new System.Drawing.Size(106, 13);
- this.bodyFontLabel.TabIndex = 43;
- this.bodyFontLabel.Text = "Font family/size/style";
- //
- // label2
- //
- 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, 175);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(24, 13);
- this.label2.TabIndex = 49;
- this.label2.Text = "Ital.";
- //
- // label1
- //
- 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, 175);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(32, 13);
- this.label1.TabIndex = 48;
- this.label1.Text = "Bold";
- //
- // itemsToPrintButton
- //
- this.itemsToPrintButton.Enabled = false;
- this.itemsToPrintButton.Location = new System.Drawing.Point(121, 154);
- this.itemsToPrintButton.Name = "itemsToPrintButton";
- this.itemsToPrintButton.Size = new System.Drawing.Size(132, 23);
- this.itemsToPrintButton.TabIndex = 50;
- this.itemsToPrintButton.Text = "Items to print";
- this.itemsToPrintButton.UseVisualStyleBackColor = true;
- this.itemsToPrintButton.Click += new System.EventHandler(this.itemsToPrintButton_Click);
- //
- // nrOfCopiesLabel
- //
- this.nrOfCopiesLabel.AutoSize = true;
- this.nrOfCopiesLabel.Location = new System.Drawing.Point(8, 235);
- this.nrOfCopiesLabel.Name = "nrOfCopiesLabel";
- this.nrOfCopiesLabel.Size = new System.Drawing.Size(90, 13);
- this.nrOfCopiesLabel.TabIndex = 52;
- this.nrOfCopiesLabel.Text = "Number of copies";
- //
- // nrOfCopiesTextBox
- //
- this.nrOfCopiesTextBox.Enabled = false;
- this.nrOfCopiesTextBox.Location = new System.Drawing.Point(122, 232);
- this.nrOfCopiesTextBox.Name = "nrOfCopiesTextBox";
- this.nrOfCopiesTextBox.Size = new System.Drawing.Size(51, 20);
- this.nrOfCopiesTextBox.TabIndex = 51;
- //
- // cultureComboBox
- //
- this.cultureComboBox.Enabled = false;
- this.cultureComboBox.FormattingEnabled = true;
- this.cultureComboBox.Location = new System.Drawing.Point(122, 208);
- this.cultureComboBox.Name = "cultureComboBox";
- this.cultureComboBox.Size = new System.Drawing.Size(218, 21);
- this.cultureComboBox.TabIndex = 54;
- //
- // cultureLabel
- //
- this.cultureLabel.AutoSize = true;
- this.cultureLabel.Location = new System.Drawing.Point(8, 211);
- this.cultureLabel.Name = "cultureLabel";
- this.cultureLabel.Size = new System.Drawing.Size(42, 13);
- this.cultureLabel.TabIndex = 53;
- this.cultureLabel.Text = "Cullture";
- //
- // goodOnlyCheckBox
- //
- this.goodOnlyCheckBox.AutoSize = true;
- this.goodOnlyCheckBox.Enabled = false;
- this.goodOnlyCheckBox.Location = new System.Drawing.Point(122, 262);
- this.goodOnlyCheckBox.Name = "goodOnlyCheckBox";
- this.goodOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
- this.goodOnlyCheckBox.TabIndex = 55;
- this.goodOnlyCheckBox.Text = "Good only";
- this.goodOnlyCheckBox.UseVisualStyleBackColor = true;
- //
- // PrinterCfgCtrl
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.Controls.Add(this.goodOnlyCheckBox);
- this.Controls.Add(this.cultureComboBox);
- this.Controls.Add(this.cultureLabel);
- this.Controls.Add(this.nrOfCopiesLabel);
- this.Controls.Add(this.nrOfCopiesTextBox);
- this.Controls.Add(this.itemsToPrintButton);
- this.Controls.Add(this.italicCheckBox);
- this.Controls.Add(this.boldCheckBox);
- this.Controls.Add(this.fontSizeTextBox);
- this.Controls.Add(this.fontFamilyComboBox);
- this.Controls.Add(this.bodyFontLabel);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.paperHeightTextBox);
- this.Controls.Add(this.paperHeightLabel);
- this.Controls.Add(this.paperWidthTextBox);
- this.Controls.Add(this.paperWidthLabel);
- this.Controls.Add(this.templateTextBox);
- this.Controls.Add(this.templateLabel);
- this.Controls.Add(this.orientationComboBox);
- this.Controls.Add(this.orientationLabel);
- 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(372, 327);
- this.Load += new System.EventHandler(this.PrinterCfgCtrl_Load);
- this.ResumeLayout(false);
- this.PerformLayout();
+ 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();
+ this.templateTextBox = new System.Windows.Forms.TextBox();
+ this.templateLabel = new System.Windows.Forms.Label();
+ this.paperWidthTextBox = new System.Windows.Forms.TextBox();
+ this.paperWidthLabel = new System.Windows.Forms.Label();
+ this.paperHeightTextBox = new System.Windows.Forms.TextBox();
+ this.italicCheckBox = new System.Windows.Forms.CheckBox();
+ this.boldCheckBox = new System.Windows.Forms.CheckBox();
+ this.fontSizeTextBox = new System.Windows.Forms.TextBox();
+ this.fontFamilyComboBox = new System.Windows.Forms.ComboBox();
+ this.bodyFontLabel = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label1 = new System.Windows.Forms.Label();
+ this.itemsToPrintButton = new System.Windows.Forms.Button();
+ this.nrOfCopiesLabel = new System.Windows.Forms.Label();
+ this.nrOfCopiesTextBox = new System.Windows.Forms.TextBox();
+ this.cultureComboBox = new System.Windows.Forms.ComboBox();
+ this.cultureLabel = new System.Windows.Forms.Label();
+ this.goodOnlyCheckBox = new System.Windows.Forms.CheckBox();
+ this.snBarcodeGroupBox = new System.Windows.Forms.GroupBox();
+ this.barcodeHeightLabel = new System.Windows.Forms.Label();
+ this.barcodeHeightTextBox = new System.Windows.Forms.TextBox();
+ this.isQrCheckBox = new System.Windows.Forms.CheckBox();
+ this.barcodeWidthLabel = new System.Windows.Forms.Label();
+ this.barcodeWidthTextBox = new System.Windows.Forms.TextBox();
+ this.barcodeTopLabel = new System.Windows.Forms.Label();
+ this.barcodeTopTextBox = new System.Windows.Forms.TextBox();
+ this.barcodeLeftTextBox = new System.Windows.Forms.TextBox();
+ this.barcodeLeftLabel = new System.Windows.Forms.Label();
+ this.snBarcodeCheckBox = new System.Windows.Forms.CheckBox();
+ this.snBarcodeGroupBox.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // nameTextBox
+ //
+ this.nameTextBox.Enabled = false;
+ this.nameTextBox.Location = new System.Drawing.Point(122, 35);
+ this.nameTextBox.Name = "nameTextBox";
+ this.nameTextBox.Size = new System.Drawing.Size(130, 20);
+ this.nameTextBox.TabIndex = 2;
+ //
+ // nameLabel
+ //
+ this.nameLabel.AutoSize = true;
+ this.nameLabel.Location = new System.Drawing.Point(8, 38);
+ 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(119, 11);
+ this.classNameLabel.Name = "classNameLabel";
+ this.classNameLabel.Size = new System.Drawing.Size(61, 13);
+ this.classNameLabel.TabIndex = 0;
+ this.classNameLabel.Text = "Class name";
+ //
+ // supressPrintingCheckBox
+ //
+ this.supressPrintingCheckBox.AutoSize = true;
+ this.supressPrintingCheckBox.Enabled = false;
+ this.supressPrintingCheckBox.Location = new System.Drawing.Point(245, 200);
+ this.supressPrintingCheckBox.Name = "supressPrintingCheckBox";
+ this.supressPrintingCheckBox.Size = new System.Drawing.Size(101, 17);
+ this.supressPrintingCheckBox.TabIndex = 11;
+ this.supressPrintingCheckBox.Text = "Supress printing";
+ this.supressPrintingCheckBox.UseVisualStyleBackColor = true;
+ //
+ // orientationLabel
+ //
+ this.orientationLabel.AutoSize = true;
+ this.orientationLabel.Location = new System.Drawing.Point(8, 84);
+ this.orientationLabel.Name = "orientationLabel";
+ this.orientationLabel.Size = new System.Drawing.Size(84, 13);
+ this.orientationLabel.TabIndex = 3;
+ this.orientationLabel.Text = "Page orientation";
+ //
+ // orientationComboBox
+ //
+ this.orientationComboBox.Enabled = false;
+ this.orientationComboBox.FormattingEnabled = true;
+ this.orientationComboBox.Location = new System.Drawing.Point(122, 81);
+ this.orientationComboBox.Name = "orientationComboBox";
+ this.orientationComboBox.Size = new System.Drawing.Size(130, 21);
+ this.orientationComboBox.TabIndex = 4;
+ //
+ // templateTextBox
+ //
+ this.templateTextBox.Enabled = false;
+ this.templateTextBox.Location = new System.Drawing.Point(122, 58);
+ this.templateTextBox.Name = "templateTextBox";
+ this.templateTextBox.Size = new System.Drawing.Size(228, 20);
+ this.templateTextBox.TabIndex = 10;
+ //
+ // templateLabel
+ //
+ this.templateLabel.AutoSize = true;
+ this.templateLabel.Location = new System.Drawing.Point(8, 61);
+ this.templateLabel.Name = "templateLabel";
+ this.templateLabel.Size = new System.Drawing.Size(67, 13);
+ this.templateLabel.TabIndex = 9;
+ this.templateLabel.Text = "Template file";
+ //
+ // paperWidthTextBox
+ //
+ this.paperWidthTextBox.Enabled = false;
+ this.paperWidthTextBox.Location = new System.Drawing.Point(122, 105);
+ this.paperWidthTextBox.Name = "paperWidthTextBox";
+ this.paperWidthTextBox.Size = new System.Drawing.Size(51, 20);
+ this.paperWidthTextBox.TabIndex = 6;
+ //
+ // paperWidthLabel
+ //
+ this.paperWidthLabel.AutoSize = true;
+ this.paperWidthLabel.Location = new System.Drawing.Point(8, 108);
+ this.paperWidthLabel.Name = "paperWidthLabel";
+ this.paperWidthLabel.Size = new System.Drawing.Size(103, 13);
+ this.paperWidthLabel.TabIndex = 5;
+ this.paperWidthLabel.Text = "Paper width / height";
+ //
+ // paperHeightTextBox
+ //
+ this.paperHeightTextBox.Enabled = false;
+ this.paperHeightTextBox.Location = new System.Drawing.Point(176, 105);
+ this.paperHeightTextBox.Name = "paperHeightTextBox";
+ this.paperHeightTextBox.Size = new System.Drawing.Size(51, 20);
+ this.paperHeightTextBox.TabIndex = 8;
+ //
+ // italicCheckBox
+ //
+ this.italicCheckBox.AutoSize = true;
+ this.italicCheckBox.Enabled = false;
+ this.italicCheckBox.Location = new System.Drawing.Point(335, 134);
+ this.italicCheckBox.Name = "italicCheckBox";
+ this.italicCheckBox.Size = new System.Drawing.Size(15, 14);
+ this.italicCheckBox.TabIndex = 47;
+ this.italicCheckBox.UseVisualStyleBackColor = true;
+ //
+ // boldCheckBox
+ //
+ this.boldCheckBox.AutoSize = true;
+ this.boldCheckBox.Enabled = false;
+ this.boldCheckBox.Location = new System.Drawing.Point(307, 134);
+ this.boldCheckBox.Name = "boldCheckBox";
+ this.boldCheckBox.Size = new System.Drawing.Size(15, 14);
+ this.boldCheckBox.TabIndex = 46;
+ this.boldCheckBox.UseVisualStyleBackColor = true;
+ //
+ // fontSizeTextBox
+ //
+ this.fontSizeTextBox.Enabled = false;
+ this.fontSizeTextBox.Location = new System.Drawing.Point(259, 128);
+ this.fontSizeTextBox.Name = "fontSizeTextBox";
+ this.fontSizeTextBox.Size = new System.Drawing.Size(29, 20);
+ this.fontSizeTextBox.TabIndex = 45;
+ //
+ // fontFamilyComboBox
+ //
+ this.fontFamilyComboBox.Enabled = false;
+ this.fontFamilyComboBox.FormattingEnabled = true;
+ this.fontFamilyComboBox.Location = new System.Drawing.Point(122, 128);
+ this.fontFamilyComboBox.Name = "fontFamilyComboBox";
+ this.fontFamilyComboBox.Size = new System.Drawing.Size(130, 21);
+ this.fontFamilyComboBox.TabIndex = 44;
+ //
+ // bodyFontLabel
+ //
+ this.bodyFontLabel.AutoSize = true;
+ this.bodyFontLabel.Location = new System.Drawing.Point(8, 131);
+ this.bodyFontLabel.Name = "bodyFontLabel";
+ this.bodyFontLabel.Size = new System.Drawing.Size(106, 13);
+ this.bodyFontLabel.TabIndex = 43;
+ this.bodyFontLabel.Text = "Font family/size/style";
+ //
+ // label2
+ //
+ 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.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(24, 13);
+ this.label2.TabIndex = 49;
+ this.label2.Text = "Ital.";
+ //
+ // label1
+ //
+ 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.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(32, 13);
+ this.label1.TabIndex = 48;
+ this.label1.Text = "Bold";
+ //
+ // itemsToPrintButton
+ //
+ this.itemsToPrintButton.Enabled = false;
+ this.itemsToPrintButton.Location = new System.Drawing.Point(259, 85);
+ this.itemsToPrintButton.Name = "itemsToPrintButton";
+ this.itemsToPrintButton.Size = new System.Drawing.Size(91, 30);
+ this.itemsToPrintButton.TabIndex = 50;
+ this.itemsToPrintButton.Text = "Items to print";
+ this.itemsToPrintButton.UseVisualStyleBackColor = true;
+ this.itemsToPrintButton.Click += new System.EventHandler(this.itemsToPrintButton_Click);
+ //
+ // nrOfCopiesLabel
+ //
+ this.nrOfCopiesLabel.AutoSize = true;
+ this.nrOfCopiesLabel.Location = new System.Drawing.Point(8, 179);
+ this.nrOfCopiesLabel.Name = "nrOfCopiesLabel";
+ this.nrOfCopiesLabel.Size = new System.Drawing.Size(90, 13);
+ this.nrOfCopiesLabel.TabIndex = 52;
+ this.nrOfCopiesLabel.Text = "Number of copies";
+ //
+ // nrOfCopiesTextBox
+ //
+ this.nrOfCopiesTextBox.Enabled = false;
+ this.nrOfCopiesTextBox.Location = new System.Drawing.Point(122, 176);
+ this.nrOfCopiesTextBox.Name = "nrOfCopiesTextBox";
+ this.nrOfCopiesTextBox.Size = new System.Drawing.Size(51, 20);
+ this.nrOfCopiesTextBox.TabIndex = 51;
+ //
+ // cultureComboBox
+ //
+ this.cultureComboBox.Enabled = false;
+ this.cultureComboBox.FormattingEnabled = true;
+ this.cultureComboBox.Location = new System.Drawing.Point(122, 152);
+ this.cultureComboBox.Name = "cultureComboBox";
+ this.cultureComboBox.Size = new System.Drawing.Size(228, 21);
+ this.cultureComboBox.TabIndex = 54;
+ //
+ // cultureLabel
+ //
+ this.cultureLabel.AutoSize = true;
+ this.cultureLabel.Location = new System.Drawing.Point(8, 155);
+ this.cultureLabel.Name = "cultureLabel";
+ this.cultureLabel.Size = new System.Drawing.Size(42, 13);
+ this.cultureLabel.TabIndex = 53;
+ this.cultureLabel.Text = "Cullture";
+ //
+ // goodOnlyCheckBox
+ //
+ this.goodOnlyCheckBox.AutoSize = true;
+ this.goodOnlyCheckBox.Enabled = false;
+ this.goodOnlyCheckBox.Location = new System.Drawing.Point(245, 179);
+ this.goodOnlyCheckBox.Name = "goodOnlyCheckBox";
+ this.goodOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
+ this.goodOnlyCheckBox.TabIndex = 55;
+ this.goodOnlyCheckBox.Text = "Good only";
+ this.goodOnlyCheckBox.UseVisualStyleBackColor = true;
+ //
+ // snBarcodeGroupBox
+ //
+ this.snBarcodeGroupBox.Controls.Add(this.barcodeHeightLabel);
+ this.snBarcodeGroupBox.Controls.Add(this.barcodeHeightTextBox);
+ this.snBarcodeGroupBox.Controls.Add(this.isQrCheckBox);
+ this.snBarcodeGroupBox.Controls.Add(this.barcodeWidthLabel);
+ this.snBarcodeGroupBox.Controls.Add(this.barcodeWidthTextBox);
+ this.snBarcodeGroupBox.Controls.Add(this.barcodeTopLabel);
+ this.snBarcodeGroupBox.Controls.Add(this.barcodeTopTextBox);
+ this.snBarcodeGroupBox.Controls.Add(this.barcodeLeftTextBox);
+ this.snBarcodeGroupBox.Controls.Add(this.barcodeLeftLabel);
+ this.snBarcodeGroupBox.Controls.Add(this.snBarcodeCheckBox);
+ this.snBarcodeGroupBox.Location = new System.Drawing.Point(11, 227);
+ this.snBarcodeGroupBox.Name = "snBarcodeGroupBox";
+ this.snBarcodeGroupBox.Size = new System.Drawing.Size(339, 59);
+ this.snBarcodeGroupBox.TabIndex = 56;
+ this.snBarcodeGroupBox.TabStop = false;
+ //
+ // barcodeHeightLabel
+ //
+ this.barcodeHeightLabel.AutoSize = true;
+ this.barcodeHeightLabel.Location = new System.Drawing.Point(207, 29);
+ this.barcodeHeightLabel.Name = "barcodeHeightLabel";
+ this.barcodeHeightLabel.Size = new System.Drawing.Size(38, 13);
+ this.barcodeHeightLabel.TabIndex = 18;
+ this.barcodeHeightLabel.Text = "Height";
+ //
+ // barcodeHeightTextBox
+ //
+ this.barcodeHeightTextBox.Enabled = false;
+ this.barcodeHeightTextBox.Location = new System.Drawing.Point(247, 25);
+ this.barcodeHeightTextBox.Name = "barcodeHeightTextBox";
+ this.barcodeHeightTextBox.Size = new System.Drawing.Size(32, 20);
+ this.barcodeHeightTextBox.TabIndex = 17;
+ //
+ // isQrCheckBox
+ //
+ this.isQrCheckBox.AutoSize = true;
+ this.isQrCheckBox.Location = new System.Drawing.Point(293, 27);
+ this.isQrCheckBox.Name = "isQrCheckBox";
+ this.isQrCheckBox.Size = new System.Drawing.Size(42, 17);
+ this.isQrCheckBox.TabIndex = 16;
+ this.isQrCheckBox.Text = "QR";
+ this.isQrCheckBox.UseVisualStyleBackColor = true;
+ //
+ // barcodeWidthLabel
+ //
+ this.barcodeWidthLabel.AutoSize = true;
+ this.barcodeWidthLabel.Location = new System.Drawing.Point(135, 29);
+ this.barcodeWidthLabel.Name = "barcodeWidthLabel";
+ this.barcodeWidthLabel.Size = new System.Drawing.Size(35, 13);
+ this.barcodeWidthLabel.TabIndex = 15;
+ this.barcodeWidthLabel.Text = "Width";
+ //
+ // barcodeWidthTextBox
+ //
+ this.barcodeWidthTextBox.Enabled = false;
+ this.barcodeWidthTextBox.Location = new System.Drawing.Point(171, 25);
+ this.barcodeWidthTextBox.Name = "barcodeWidthTextBox";
+ this.barcodeWidthTextBox.Size = new System.Drawing.Size(32, 20);
+ this.barcodeWidthTextBox.TabIndex = 14;
+ //
+ // barcodeTopLabel
+ //
+ this.barcodeTopLabel.AutoSize = true;
+ this.barcodeTopLabel.Location = new System.Drawing.Point(71, 29);
+ this.barcodeTopLabel.Name = "barcodeTopLabel";
+ this.barcodeTopLabel.Size = new System.Drawing.Size(26, 13);
+ this.barcodeTopLabel.TabIndex = 13;
+ this.barcodeTopLabel.Text = "Top";
+ //
+ // barcodeTopTextBox
+ //
+ this.barcodeTopTextBox.Enabled = false;
+ this.barcodeTopTextBox.Location = new System.Drawing.Point(99, 25);
+ this.barcodeTopTextBox.Name = "barcodeTopTextBox";
+ this.barcodeTopTextBox.Size = new System.Drawing.Size(32, 20);
+ this.barcodeTopTextBox.TabIndex = 11;
+ //
+ // barcodeLeftTextBox
+ //
+ this.barcodeLeftTextBox.Enabled = false;
+ this.barcodeLeftTextBox.Location = new System.Drawing.Point(35, 25);
+ this.barcodeLeftTextBox.Name = "barcodeLeftTextBox";
+ this.barcodeLeftTextBox.Size = new System.Drawing.Size(32, 20);
+ this.barcodeLeftTextBox.TabIndex = 10;
+ //
+ // barcodeLeftLabel
+ //
+ this.barcodeLeftLabel.AutoSize = true;
+ this.barcodeLeftLabel.Location = new System.Drawing.Point(8, 29);
+ this.barcodeLeftLabel.Name = "barcodeLeftLabel";
+ this.barcodeLeftLabel.Size = new System.Drawing.Size(25, 13);
+ this.barcodeLeftLabel.TabIndex = 9;
+ this.barcodeLeftLabel.Text = "Left";
+ //
+ // snBarcodeCheckBox
+ //
+ this.snBarcodeCheckBox.AutoSize = true;
+ this.snBarcodeCheckBox.Location = new System.Drawing.Point(10, 0);
+ this.snBarcodeCheckBox.Name = "snBarcodeCheckBox";
+ this.snBarcodeCheckBox.Size = new System.Drawing.Size(176, 17);
+ this.snBarcodeCheckBox.TabIndex = 0;
+ this.snBarcodeCheckBox.Text = "Print barcode with serial number";
+ this.snBarcodeCheckBox.UseVisualStyleBackColor = true;
+ this.snBarcodeCheckBox.CheckedChanged += new System.EventHandler(this.snBarcodeCheckBox_CheckedChanged);
+ //
+ // PrinterCfgCtrl
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.snBarcodeGroupBox);
+ this.Controls.Add(this.goodOnlyCheckBox);
+ this.Controls.Add(this.cultureComboBox);
+ this.Controls.Add(this.cultureLabel);
+ this.Controls.Add(this.nrOfCopiesLabel);
+ this.Controls.Add(this.nrOfCopiesTextBox);
+ this.Controls.Add(this.itemsToPrintButton);
+ this.Controls.Add(this.italicCheckBox);
+ this.Controls.Add(this.boldCheckBox);
+ this.Controls.Add(this.fontSizeTextBox);
+ this.Controls.Add(this.fontFamilyComboBox);
+ this.Controls.Add(this.bodyFontLabel);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.paperHeightTextBox);
+ this.Controls.Add(this.paperWidthTextBox);
+ this.Controls.Add(this.paperWidthLabel);
+ this.Controls.Add(this.templateTextBox);
+ this.Controls.Add(this.templateLabel);
+ this.Controls.Add(this.orientationComboBox);
+ this.Controls.Add(this.orientationLabel);
+ 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(372, 327);
+ this.Load += new System.EventHandler(this.PrinterCfgCtrl_Load);
+ this.snBarcodeGroupBox.ResumeLayout(false);
+ this.snBarcodeGroupBox.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
}
@@ -336,8 +447,7 @@ namespace TBF.BenchControl.Output.Printers.Label
private System.Windows.Forms.Label templateLabel;
private System.Windows.Forms.TextBox paperWidthTextBox;
private System.Windows.Forms.Label paperWidthLabel;
- private System.Windows.Forms.TextBox paperHeightTextBox;
- private System.Windows.Forms.Label paperHeightLabel;
+ private System.Windows.Forms.TextBox paperHeightTextBox;
private System.Windows.Forms.CheckBox italicCheckBox;
private System.Windows.Forms.CheckBox boldCheckBox;
private System.Windows.Forms.TextBox fontSizeTextBox;
@@ -351,5 +461,16 @@ namespace TBF.BenchControl.Output.Printers.Label
private System.Windows.Forms.ComboBox cultureComboBox;
private System.Windows.Forms.Label cultureLabel;
private System.Windows.Forms.CheckBox goodOnlyCheckBox;
+ private System.Windows.Forms.GroupBox snBarcodeGroupBox;
+ private System.Windows.Forms.TextBox barcodeTopTextBox;
+ private System.Windows.Forms.TextBox barcodeLeftTextBox;
+ private System.Windows.Forms.Label barcodeLeftLabel;
+ private System.Windows.Forms.CheckBox snBarcodeCheckBox;
+ private System.Windows.Forms.Label barcodeWidthLabel;
+ private System.Windows.Forms.TextBox barcodeWidthTextBox;
+ private System.Windows.Forms.Label barcodeTopLabel;
+ private System.Windows.Forms.CheckBox isQrCheckBox;
+ private System.Windows.Forms.Label barcodeHeightLabel;
+ private System.Windows.Forms.TextBox barcodeHeightTextBox;
}
}
diff --git a/TBF/BenchControl/Output/Printers/Label/PrinterCfgCtrl.cs b/TBF/BenchControl/Output/Printers/Label/PrinterCfgCtrl.cs
index b1e9f5a5b..173ff909b 100644
--- a/TBF/BenchControl/Output/Printers/Label/PrinterCfgCtrl.cs
+++ b/TBF/BenchControl/Output/Printers/Label/PrinterCfgCtrl.cs
@@ -1,7 +1,8 @@
///
-/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
+/// Copyright (c) 2015-2020 Sensus Slovensko a.s.
///
using System;
+using System.Drawing;
using System.IO;
using System.Windows.Forms;
using log4net;
@@ -42,7 +43,9 @@ namespace TBF.BenchControl.Output.Printers.Label
{
fontFamilyComboBox.Items.Add(ff.Name);
}
- }
+
+ ManageCheckGroupBox(snBarcodeCheckBox, snBarcodeGroupBox);
+ }
private void PrinterCfgCtrl_Load(object sender, EventArgs e)
{
@@ -80,7 +83,14 @@ namespace TBF.BenchControl.Output.Printers.Label
nrOfCopiesTextBox.Text = config.NrOfCopies.ToString();
goodOnlyCheckBox.Checked = config.GoodOnly;
supressPrintingCheckBox.Checked = config.SupressPrinting;
- }
+
+ snBarcodeCheckBox.Checked = config.DrawSNasBarcode;
+ isQrCheckBox.Checked = config.IsQR;
+ barcodeLeftTextBox.Text = config.BarcodeLeft.ToString();
+ barcodeTopTextBox.Text = config.BarcodeTop.ToString();
+ barcodeWidthTextBox.Text = config.BarcodeWidth.ToString();
+ barcodeHeightTextBox.Text = config.BarcodeHeight.ToString();
+ }
public void Unlock()
{
@@ -98,7 +108,20 @@ namespace TBF.BenchControl.Output.Printers.Label
nrOfCopiesTextBox.Enabled = true;
goodOnlyCheckBox.Enabled = true;
supressPrintingCheckBox.Enabled = true;
- }
+
+ snBarcodeCheckBox.Enabled = true;
+ ManageCheckGroupBox(snBarcodeCheckBox, snBarcodeGroupBox);
+ isQrCheckBox.Enabled = true;
+ barcodeLeftTextBox.Enabled = true;
+ barcodeTopTextBox.Enabled = true;
+ barcodeWidthTextBox.Enabled = true;
+ barcodeHeightTextBox.Enabled = true;
+ }
+
+ private void snBarcodeCheckBox_CheckedChanged(object sender, EventArgs e)
+ {
+ ManageCheckGroupBox(snBarcodeCheckBox, snBarcodeGroupBox);
+ }
public CfgUpdateFlags VerifyCfg(ref string message)
{
@@ -142,6 +165,26 @@ namespace TBF.BenchControl.Output.Printers.Label
message += Environment.NewLine + "'Number of copies' should be between 0 and 9";
flags |= CfgUpdateFlags.Error;
}
+ if (!int.TryParse(barcodeLeftTextBox.Text, out dummy) || dummy < 0 || dummy > 2000)
+ {
+ message += Environment.NewLine + "Barcode 'Left' should be between 0 and 2000";
+ flags |= CfgUpdateFlags.Error;
+ }
+ if (!int.TryParse(barcodeTopTextBox.Text, out dummy) || dummy < 0 || dummy > 2000)
+ {
+ message += Environment.NewLine + "Barcode 'Top' should be between 0 and 2000";
+ flags |= CfgUpdateFlags.Error;
+ }
+ if (!int.TryParse(barcodeWidthTextBox.Text, out dummy) || dummy < 0 || dummy > 200)
+ {
+ message += Environment.NewLine + "Barcode 'Width' should be between 0 and 200";
+ flags |= CfgUpdateFlags.Error;
+ }
+ if (!int.TryParse(barcodeHeightTextBox.Text, out dummy) || dummy < 0 || dummy > 200)
+ {
+ message += Environment.NewLine + "Barcode 'Height' should be between 0 and 200";
+ flags |= CfgUpdateFlags.Error;
+ }
return flags;
}
@@ -193,6 +236,13 @@ namespace TBF.BenchControl.Output.Printers.Label
flags |= UpdateDifferent(ref config.GoodOnly, goodOnlyCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.SupressPrinting, supressPrintingCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
+ flags |= UpdateDifferent(ref config.DrawSNasBarcode, snBarcodeCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
+ flags |= UpdateDifferent(ref config.IsQR, isQrCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
+ flags |= UpdateDifferent(ref config.BarcodeLeft, barcodeLeftTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
+ flags |= UpdateDifferent(ref config.BarcodeTop, barcodeTopTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
+ flags |= UpdateDifferent(ref config.BarcodeWidth, barcodeWidthTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
+ flags |= UpdateDifferent(ref config.BarcodeHeight, barcodeHeightTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
+
if ((flags & CfgUpdateFlags.InvokeCfgChange) != 0)
{
Printer.OnCfgChange(this, new CfgChangeArgs(CfgChangeCmd.CfgChange, config));
@@ -214,6 +264,20 @@ namespace TBF.BenchControl.Output.Printers.Label
}
}
+ private void ManageCheckGroupBox(CheckBox chk, GroupBox grp)
+ {
+ /// Make sure the CheckBox isn't in the GroupBox. This will only happen the first time.
+ if (chk.Parent == grp)
+ {
+ grp.Parent.Controls.Add(chk); /// Reparent the CheckBox so it's not in the GroupBox.
+ chk.Location = new Point(chk.Left + grp.Left, chk.Top + grp.Top); /// Adjust the CheckBox's location.
+ chk.BringToFront(); /// Move the CheckBox to the top of the stacking order.
+ }
+
+ /// Enable or disable the GroupBox.
+ grp.Enabled = chk.Checked;
+ }
+
#region Configuration Change Handling
public static void OnCmdResponse(object sender, CmdResponseArgs args)
diff --git a/TBF/TBF.csproj b/TBF/TBF.csproj
index e199b4f0e..c60f61219 100644
--- a/TBF/TBF.csproj
+++ b/TBF/TBF.csproj
@@ -990,9 +990,6 @@
PrinterCfgCtrl.cs
-
- Component
-
diff --git a/packages/QrCode.Net.0.4.0.0/net40/Gma.QrCodeNet.Encoding.XML b/packages/QrCode.Net.0.4.0.0/net40/Gma.QrCodeNet.Encoding.XML
new file mode 100644
index 000000000..7788ae4af
--- /dev/null
+++ b/packages/QrCode.Net.0.4.0.0/net40/Gma.QrCodeNet.Encoding.XML
@@ -0,0 +1,1117 @@
+
+
+
+ Gma.QrCodeNet.Encoding
+
+
+
+
+ Table at chapter 8.4.3. P.21
+
+
+
+
+ Convert char to int value
+
+ Alpha Numeric Char
+ Table from chapter 8.4.3 P21
+
+
+ ISO/IEC 18004:2000 Table 3 Page 18
+
+
+
+ Used to define length of the Character Count Indicator
+
+ Returns the 0 based index of the row from Chapter 8.4 Data encodation, Table 3 — Number of bits in Character Count Indicator.
+
+
+ ISO/IEC 18004:2000 Chapter 8.1 Page 14
+ DataEncode is combination of Data analysis and Data encodation step.
+ Which uses sub functions under several different namespaces
+
+
+
+ ISO/IEC 18004:2006 Chapter 6.4.2 Mode indicator = 0111 Page 23
+
+
+
+
+ Initialize ECI Set.
+
+ AppendOption is enum under ECISet
+ Use NameToValue during Encode. ValueToName during Decode
+
+
+ ISO/IEC 18004:2006E ECI Designator Page 24
+ Range: 0 ~ 999999
+ Number of Codewords(Byte) for ECI Assignment Value
+
+
+ ISO/IEC 18004:2006E ECI Designator Page 24
+ Range: 0 ~ 999999
+ Number of bits for ECI Assignment Value
+
+
+ ISO/IEC 18004:2006E ECI Designator Page 24
+ Range: 0 ~ 999999
+ Number of bits for ECI Header
+
+
+ ECI table in Dictionary collection
+
+
+ ISO/IEC 18004:2006 Chapter 6.4.2 Page 24.
+
+
+
+ Length indicator for number of ECI codewords
+
+ ISO/IEC 18004:2006 Chapter 6.4.2 Page 24.
+ 1 codeword length = 0. Any additional codeword add 1 to front. Eg: 3 = 110
+ Bits required for each one is:
+ one = 1, two = 2, three = 3
+
+
+
+ Use to recognise which mode and encoding name to use for input string.
+
+ input string content
+ Output encoding name
+ Mode and Encoding name
+
+
+
+ Encoding.GetEncoding.GetBytes will transform char to 0x3F if that char not belong to current encoding table.
+ 0x3F is '?'
+
+
+
+
+ Check char from startPos for string content.
+
+ input string content
+ start check position
+ -2 Numeric encode, -1 AlphaNum encode, Index of failed check pos
+
+
+
+ Use given encoding to check input string from starting position. If encoding table is suitable solution.
+ it will return -1. Else it will return failed encoding position.
+
+ input string
+ encoding name. Check ECI table
+ starting position
+ -1 if from starting position to end encoding success. Else return fail position
+
+
+
+ Check input string content. Whether it can apply Kanji encode or not.
+
+ String input content
+ -1 if it can apply Kanji encode, -2 should use utf8 encode, 0 check for other encode.
+
+
+
+ Calculate int length by search for Most significant bit
+
+ Input Number
+ Most significant bit
+
+
+
+ Search for right side bit of Most significant bit
+
+ input number
+ lower boundary. At start should be 0
+ higher boundary. At start should be 32
+ Most significant bit - 1
+
+
+
+ With input number and polynomial number. Method will calculate BCH value and return
+
+ input number
+ Polynomial number
+ BCH value
+
+
+ ISO/IEC 18004:2000 Chapter 8.7.3 Page 46
+
+
+
+ 6.9 Format information
+ The Format Information is a 15 bit sequence containing 5 data bits, with 10 error correction bits calculated using the (15, 5) BCH code.
+
+ ISO/IEC 18004:2000 Chapter 8.9 Page 53
+
+
+
+ From Appendix C in JISX0510:2004 (p.65).
+
+
+
+
+ From Appendix C in JISX0510:2004 (p.65).
+
+
+
+
+ Embed format information to tristatematrix.
+ Process combination of create info bits, BCH error correction bits calculation, embed towards matrix.
+
+ ISO/IEC 18004:2000 Chapter 8.9 Page 53
+
+
+
+ Embed version information for version larger or equal to 7.
+
+ ISO/IEC 18004:2000 Chapter 8.10 Page 54
+
+
+
+ Embed version information to Matrix
+ Only for version greater or equal to 7
+
+ Matrix
+ version number
+
+
+
+ Generate error correction blocks. Then out put with codewords BitList
+ ISO/IEC 18004/2006 P45, 46. Chapter 6.6 Constructing final message codewords sequence.
+
+ Datacodewords from DataEncodation.DataEncode
+ Total number of bytes
+ Number of data bytes
+ Number of Error Correction blocks
+ codewords BitList contain datacodewords and ECCodewords
+
+
+
+ ISO/IEC 18004:2000 Chapter 8.8.2 Page 52
+
+
+
+
+ Calculate penalty value for first rule.
+
+
+
+
+ ISO/IEC 18004:2000 Chapter 8.8.2 Page 52
+
+
+
+
+ ISO/IEC 18004:2000 Chapter 8.8.2 Page 52
+
+
+
+
+ Calculate penalty value for Third rule.
+
+
+
+
+ ISO/IEC 18004:2000 Chapter 8.8.2 Page 52
+
+
+
+
+ Calculate penalty value for Fourth rule.
+ Perform O(n) search for available x modules
+
+
+
+
+ Description of PenaltyFactory.
+
+
+
+
+ EightBitByte is a bit complicate compare to other encoding.
+ It can accept several different encoding table from global ECI table.
+ For different country, default encoding is different. JP use shift_jis, International spec use iso-8859-1
+ China use ASCII which is first part of normal char table. Between 00 to 7E
+ Korean and Thai should have their own default encoding as well. But so far I can not find their specification freely online.
+ QrCode.Net will use international standard which is iso-8859-1 as default encoding.
+ And use UTF8 as suboption for any string that not belong to any char table or other encoder.
+
+ ISO/IEC 18004:2000 Chapter 8.4.4 Page 22
+
+
+
+ Returns the bit representation of input data.
+
+
+
+
+
+
+ Returns bit representation of value.
+
+
+ See Chapter 8.4 Data encodation, Table 2 — Mode indicators
+
+
+
+
+
+
+
+
+
+
+ Defines the length of the Character Count Indicator,
+ which varies according to themode and the symbol version in use
+
+ Number of bits in Character Count Indicator.
+
+ See Chapter 8.4 Data encodation, Table 3 — Number of bits in Character Count Indicator.
+
+
+
+
+ Bitcount, Chapter 8.4.4, P.24
+
+
+
+
+ EightBitByte encoder's encoding will change according to different region
+
+ Default encoding is "iso-8859-1"
+
+
+ ISO/IEC 18004:2000 Chapter 8.4.5 Page 23
+
+
+
+ Bitcount according to ISO/IEC 18004:2000 Kanji mode Page 25
+
+
+
+
+ Multiply value for Most significant byte.
+ Chapter 8.4.5 P.24
+
+
+
+
+ See Chapter 8.4.5 P.24 Kanji Mode
+
+
+
+
+ Description of GaloisField256.
+
+
+
+
+ Powers of a in GF table. Where a = 2
+
+
+
+
+ log ( power of a) in GF table. Where a = 2
+
+
+
+
+ Product of two values.
+ In other words. a multiply b
+
+
+
+
+ Quotient of two values.
+ In other words. a devided b
+
+
+
+
+ Description of GeneratorPolynomial.
+
+
+
+
+ After create GeneratorPolynomial. Keep it as long as possible.
+ Unless QRCode encode is done or no more QRCode need to generate.
+
+
+
+
+ Get generator by degree. (Largest degree for that generator)
+
+ Generator
+
+
+
+ Build Generator if we can not find specific degree of generator from cache
+
+
+
+
+ coefficient position. where (coefficient)x^degree
+
+
+
+
+ Add another Polynomial to current one
+
+ The polynomial need to add or subtract to current one
+ Result polynomial after add or subtract
+
+
+
+ Multiply current Polynomial to anotherone.
+
+ Result polynomial after multiply
+
+
+
+ Multiplay scalar to current polynomial
+
+ result of polynomial after multiply scalar
+
+
+
+ divide current polynomial by "other"
+
+ Result polynomial after divide
+
+
+
+ Encode an array of data codeword with GaloisField 256.
+
+ Array of data codewords for a single block.
+ Number of error correction codewords for data codewords
+ Cached or newly create GeneratorPolynomial
+ Return error correction codewords array
+
+
+
+ Convert data codewords to int array. And add error correction space at end of that array
+
+ data codewords array
+ data codewords length
+ Num of error correction bytes
+ Int array for data codewords array follow by error correction space
+
+
+
+ Reassembly error correction codewords. As Polynomial class will eliminate zero monomial at front.
+
+ Remainder byte array after divide.
+ Error correction codewords length
+ Error correction codewords
+
+
+
+ Contain most of common constant variables. S
+
+
+
+
+ ISO/IEC 18004:2006(E) Page 45 Chapter Generating the error correction codewords
+ Primative Polynomial = Bin 100011101 = Dec 285
+
+
+
+
+ 0xEC
+
+
+
+
+ 0x11
+
+
+
+
+ URL:http://en.wikipedia.org/wiki/Byte-order_mark
+
+
+
+
+ Return value will be internal array itself. Not deep/shallow copy.
+
+
+
+
+ This method will create BitList that contain
+ terminator, padding and pad codewords for given datacodewords.
+ Use it to full fill the data codewords capacity. Thus avoid massive empty bits.
+
+ ISO/IEC 18004:2006 P. 32 33.
+ Terminator / Bit stream to codeword conversion
+ Method will add terminator bits at end of baseList
+ Num of bits for datacodewords without terminator
+ Total number of datacodewords for specific version.
+ Receive it under Version/VersionTable
+ Bitlist that contain Terminator, padding and padcodewords
+
+
+
+ Return value will be deep copy of array.
+
+
+
+
+ Width for current version
+
+
+
+
+ number of Error correction blocks for group 1
+
+
+
+
+ Number of error correction blocks for group 2
+
+
+
+
+ Number of data bytes per block for group 1
+
+
+
+
+ Number of data bytes per block for group 2
+
+
+
+
+ Number of error correction bytes per block
+
+
+
+
+ Get Error Correction Blocks
+
+
+
+
+ Initialize for NumBlocks and ErrorCorrectionCodewordsPerBlock
+
+
+
+
+ Use this exception for null or empty input string or when input string is too large.
+
+
+
+ L
+ M
+ Q
+ H
+
+
+
+ Get Error Correction Blocks by level
+
+
+
+
+ Determine which version to use
+
+ Number of bits for encoded content
+ Encoding name for EightBitByte
+ VersionDetail and ECI
+
+
+
+ Decide which version group it belong to
+
+ number of bits for bitlist where it contain DataBits encode from input content and ECI header
+ Error correction level
+ Mode
+ Version group index for VERSION_GROUP
+
+
+
+ Use number of data bits(header + eci header + data bits from EncoderBase) to search for proper version to use
+ between min and max boundary.
+ Boundary define by DynamicSearchIndicator method.
+
+
+
+
+
+
+ We only need totalCodeWords, dataCodewords and number of blocks. Other variable can be calculate through
+ equation by given that three variables.
+ This table try to use original table layout for easier error detection.
+
+ ISO/IEC 18004/2006 Tabler 9 Page 38
+ Only include non-micro QRCode
+ Sorted list
+
+
+
+ ISO/IEC 18004:2000 Chapter 8.4.3 Alphanumeric Page 21
+
+
+
+
+ Constant from Chapter 8.4.3 Alphanumeric Mode. P.21
+
+
+
+
+ BitCount from chapter 8.4.3. P22
+
+
+
+ ISO/IEC 18004:2000 Chapter 8.4.2 Page 19
+
+
+
+ Default QrEncoder will set ErrorCorrectionLevel as M
+
+
+
+
+ QrEncoder with parameter ErrorCorrectionLevel.
+
+
+
+
+
+ Encode string content to QrCode matrix
+
+
+ This exception for string content is null, empty or too large
+
+
+
+ Try to encode content
+
+ False if input content is empty, null or too large.
+
+
+
+ Encode byte array content to QrCode matrix
+
+
+ This exception for string content is null, empty or too large
+
+
+
+ Try to encode content
+
+ False if input content is empty, null or too large.
+
+
+
+ This class contain two variables.
+ BitMatrix for QrCode
+ isContainMatrix for indicate whether QrCode contains BitMatrix or not.
+ BitMatrix will equal to null if isContainMatrix is false.
+
+
+
+
+ Lock Class, that any change to Text or ErrorCorrectLevel won't cause it to update QrCode Matrix
+
+
+
+
+ Unlock Class, then update QrCodeMatrix and repaint
+
+
+
+
+ Freeze Class, Any value change to Brush, QuietZoneModule won't cause immediately repaint.
+
+ It won't stop any repaint cause by other action.
+
+
+
+ Unfreeze and repaint immediately.
+
+
+
+
+ Get Qr SquareBitMatrix as two dimentional bool array.
+ It will be deep copy of control's internal bitmatrix.
+
+ null if matrix is null, else full matrix
+
+
+
+ Return whether if class is freezed.
+
+
+
+
+ Return whether if class is locked
+
+
+
+
+ Lock Class, that any change to Text or ErrorCorrectLevel won't cause it to update QrCode Matrix
+
+
+
+
+ Unlock Class, then update QrCodeMatrix and redraw image
+
+
+
+
+ Freeze Class, Any value change to Brush, QuietZoneModule won't cause immediately redraw image.
+
+
+
+
+ Unfreeze and redraw immediately.
+
+
+
+
+ Get Qr SquareBitMatrix as two dimentional bool array.
+ It will be deep copy of control's internal bitmatrix.
+
+ null if matrix is null, else full matrix
+
+
+
+ Return whether if class is freezed.
+
+
+
+
+ Return whether if class is locked
+
+
+
+
+
+ Calculate background and fronntcolor's contrast ratio.
+ To assist dark module and light module's choose.
+ Higher ratio means easier to decode by decoder.
+ Black and White will have highest ratio = 21.
+
+ light module color
+ dark module color
+ Contrast object.
+
+
+
+ Initialize renderer
+
+ Size calculation strategy
+
+
+
+ Initialize renderer
+
+ Size calculation strategy
+ Color for dark module
+ Color for light module
+
+
+
+ Draw QrCode at given writeable bitmap
+
+
+
+
+ Draw QrCode at given writeable bitmap at offset location
+
+
+
+
+ Draw quiet zone at offset x,y
+
+
+
+
+ Draw qrCode dark modules at given position. (It will also include quiet zone area. Set it to zero to exclude quiet zone)
+
+ Bitmatrix, wBitmap should not equal to null
+ wBitmap's pixel width or height should not equal to zero
+
+
+
+ Initialize Renderer. Default brushes will be black and white.
+
+
+
+
+
+ Initialize Renderer.
+
+
+
+
+ Draw QrCode to DrawingBrush
+
+ DrawingBrush, Stretch = uniform
+ LightBrush will not use by this method, DrawingBrush will only contain DarkBrush part.
+ Use LightBrush to fill background of main uielement for more flexible placement
+
+
+
+ Construct QrCode geometry. It will only include geometry for Dark colour module
+
+ QrCode dark colour module geometry. Size = QrMatrix width x width
+
+
+
+ Construct DrawingBrush with input Drawing
+
+ DrawingBrush where Stretch = uniform
+
+
+
+ Write image file to stream
+ Default DPI will be 96, 96
+
+
+
+
+ Write image file to stream
+
+ DPI = DPI.X, DPI.Y(Dots per inch)
+
+
+
+ Module pixel width
+
+
+
+
+ QrCode pixel width
+
+
+
+
+ Initializes a Encapsulated PostScript renderer.
+
+ DarkColor used to draw Dark modules of the QrCode
+ LightColor used to draw Light modules and QuietZone of the QrCode.
+ Setting to a transparent color (A = 0) allows transparent light modules so the QR Code blends in the existing background.
+ In that case the existing background should remain light and rather uniform, and higher error correction levels are recommended.
+
+
+
+
+ Renders the matrix in an Encapsuled PostScript format.
+
+ The matrix to be rendered
+ Size in points (1 inch contains 72 point in PostScript) of a module
+ Output stream that must be writable
+
+
+
+ Outputs the EPS header with mandatory declarations, variable declarations and function definitions.
+
+ The matrix to be rendered
+ Size in points (1 inch contains 72 point in PostScript) of a module
+ Output text stream
+
+
+
+ Outputs the background unless it is defined as transparent. The background is used for light modules and quiet zone.
+
+ The matrix to be rendered
+ Output text stream
+
+
+
+ Draw a square for each dark module
+
+ The matrix to be rendered
+ Output text stream
+
+
+
+ Use the 'image' or 'colorimage' PostScript command to render modules
+
+ The matrix to be rendered
+ Output text stream
+
+
+
+ Outputs the mandatory EPS footer.
+
+ Output text stream
+
+
+
+ ISizeCalculation for the way to calculate QrCode's pixel size.
+ Ex for ISizeCalculation:FixedCodeSize, FixedModuleSize
+
+
+
+
+ DarkColor used to draw Dark modules of the QrCode
+
+
+
+
+ LightColor used to draw Light modules and QuietZone of the QrCode.
+ Setting to a transparent color (A = 0) allows transparent light modules so the QR Code blends in the existing background.
+ In that case the existing background should remain light and rather uniform, and higher error correction levels are recommended.
+
+
+
+
+ Selection of the technique used to draw the modules. 'Squares' draws vector squares one by one; 'Image' uses the 'image' or 'colorimage' PostScript command.
+ 'Squares' supports transparency of light modules and often has smaller file size for color QR Codes.
+ 'Image' might be faster to render on some devices as it is a single command.
+
+
+
+
+ FixedCodeSize is strategy for rendering QrCode at fixed Size.
+
+ Fixed size for QrCode pixel width.
+ Pixel width have to be bigger than QrCode's matrix width(include quiet zone)
+ QrCode matrix width is between 25 ~ 182(version 1 ~ 40).
+
+
+
+ Interface function that use by Rendering class.
+
+ QrCode matrix width
+ Module pixel size and QrCode pixel width
+
+
+
+ QrCodeWidth is pixel size of QrCode you would like to print out.
+ It have to be greater than QrCode's matrix width(include quiet zone).
+ QrCode matrix width is between 25 ~ 182(version 1 ~ 40).
+
+
+
+
+ Number of quietZone modules
+
+
+
+
+ FixedModuleSize is strategy for rendering QrCode with fixed module pixel size.
+
+ Module pixel size
+ number of quiet zone modules
+
+
+
+ Interface function that use by Rendering class.
+
+ QrCode matrix width
+ Module pixel size and QrCode pixel width
+
+
+
+ Module pixel size. Have to greater than zero
+
+
+
+
+ Number of quietZone modules
+
+
+
+
+ Initialize Renderer. Default brushes will be black and white.
+
+ The way of calculate Size
+
+
+
+ Initialize Renderer
+
+ The way of calculate Size
+
+
+
+ Drawing Bitmatrix to winform graphics.
+ Default position will be 0, 0
+
+ Draw background only for null matrix
+ DarkBrush or LightBrush is null
+
+
+
+ Drawing Bitmatrix to winform graphics.
+
+ Draw background only for null matrix
+ DarkBrush or LightBrush is null
+
+
+
+ Saves QrCode Image to specified stream in the specified format
+
+ Stream or Format is null
+ The image was saved with the wrong image format
+ You should avoid saving an image to the same stream that was used to construct. Doing so might damage the stream
+ If any additional data has been written to the stream before saving the image, the image data in the stream will be corrupted
+
+
+
+ Using MetaFile Class to create metafile.
+ temp control create to use as object to get temp graphics for Hdc.
+ Drawing on the metaGraphics will record as vector metaFile.
+
+
+
+
+ DarkBrush for drawing Dark module of QrCode
+
+
+
+
+
+ ISizeCalculation for the way to calculate QrCode's pixel size.
+ Ex for ISizeCalculation:FixedCodeSize, FixedModuleSize
+
+
+
+
+ Clear all pixel with given color.
+
+ Must not be null, or pixel width, pixel height equal to zero
+ Exception should be expect with null writeablebitmap or pixel width, height equal to zero.
+
+
+
+ Draw rectangle with given color.
+
+ Must not be null, or pixel width, pixel height equal to zero
+ Exception should be expect with null writeablebitmap or pixel width, height equal to zero.
+
+
+
+ Copies characters between buffers
+
+ New buffer
+ Buffer to copy from
+ Number of character to copy
+
+
+
+
+ Occure when ErrorCorrectLevel or Text changed
+
+
+
+
+ QrCode matrix cache updated.
+
+
+
+
+ Update Geometry if is unlocked.
+
+
+
+
+ This method is use to update QuietZone after use method SetQuietZoneModule
+
+
+
+
+ If Class is locked, it won't update Geometry or quietzone.
+
+
+
+
+ Unlock class will cause class to update Geometry and quietZone.
+
+
+
+
+ Get Qr SquareBitMatrix as two dimentional bool array.
+ It will be deep copy of control's internal bitmatrix.
+
+ null if matrix is null, else full matrix
+
+
+
+ Return whether if class is locked
+
+
+
+
+ Encode and Update bitmap when ErrorCorrectlevel or Text changed.
+
+
+
+
+ If Class is locked, it won't update QrMatrix cache.
+
+
+
+
+ Unlock class will cause class to update QrMatrix Cache and redraw bitmap.
+
+
+
+
+ Freeze Class, Any value change to Brush, QuietZoneModule won't cause immediately redraw bitmap.
+
+
+
+
+ Unfreeze and redraw immediately.
+
+
+
+
+ QrCode matrix cache updated.
+
+
+
+
+ Get Qr SquareBitMatrix as two dimentional bool array.
+ It will be deep copy of control's internal bitmatrix.
+
+ null if matrix is null, else full matrix
+
+
+
+ Return whether if class is locked
+
+
+
+
+ Return whether if class is freezed.
+
+
+
+
+ GeneratedInternalTypeHelper
+
+
+
+
+ CreateInstance
+
+
+
+
+ GetPropertyValue
+
+
+
+
+ SetPropertyValue
+
+
+
+
+ CreateDelegate
+
+
+
+
+ AddEventHandler
+
+
+
+
diff --git a/packages/QrCode.Net.0.4.0.0/net40/Gma.QrCodeNet.Encoding.dll b/packages/QrCode.Net.0.4.0.0/net40/Gma.QrCodeNet.Encoding.dll
new file mode 100644
index 000000000..db1b1a104
Binary files /dev/null and b/packages/QrCode.Net.0.4.0.0/net40/Gma.QrCodeNet.Encoding.dll differ
diff --git a/packages/QrCode.Net.0.4.0.0/net40/Gma.QrCodeNet.Encoding.pdb b/packages/QrCode.Net.0.4.0.0/net40/Gma.QrCodeNet.Encoding.pdb
new file mode 100644
index 000000000..a8f74c2fb
Binary files /dev/null and b/packages/QrCode.Net.0.4.0.0/net40/Gma.QrCodeNet.Encoding.pdb differ