1:   using System;
2:   using System.Drawing;
3:   using System.Collections;
4:   using System.ComponentModel;
5:   using System.Windows.Forms;
6:   using System.Data;
7:   using BarcodeNETWorkShop.Core;
8:   using System.Drawing.Printing;
9:  
10:   namespace WinFeaturesDemoCS
11:   {
12:       /// <summary>
13:       /// Summary description for Form1.
14:       /// </summary>
15:       public class Form1 : System.Windows.Forms.Form
16:       {
17:           private System.Windows.Forms.Label label2;
18:           private System.Windows.Forms.Label label3;
19:  
20:           private System.Windows.Forms.GroupBox groupBox1;
21:           private System.Windows.Forms.GroupBox groupBox2;
22:           private System.Windows.Forms.Label label4;
23:           private System.Windows.Forms.Label label5;
24:           private System.Windows.Forms.Label label6;
25:           private System.Windows.Forms.Label label7;
26:           private System.Windows.Forms.FontDialog fontDialog1;
27:           private System.Windows.Forms.ColorDialog colorDialog1;
28:           private System.Windows.Forms.Label label8;
29:           private System.Windows.Forms.Label label9;
30:           private System.Windows.Forms.Label label10;
31:           private System.Windows.Forms.Label label11;
32:           private System.Windows.Forms.PictureBox pictureBox1;
33:           private System.Windows.Forms.Label label12;
34:           private System.Windows.Forms.Label label13;
35:           private System.Windows.Forms.GroupBox groupBox3;
36:           private System.Windows.Forms.Label label14;
37:           private System.Windows.Forms.Label label15;
38:           private System.Windows.Forms.Label label16;
39:           private System.Windows.Forms.CheckBox chkShowBorder;
40:           private System.Windows.Forms.CheckBox chkShowText;
41:           private System.Windows.Forms.TextBox txtBarcodeText;
42:           private System.Windows.Forms.TextBox txtCustomText;
43:           private System.Windows.Forms.TextBox txtSupplementalText;
44:           private System.Windows.Forms.ComboBox cboSupplementalTextStyle;
45:           private System.Windows.Forms.ComboBox cboExceptionType;
46:           private System.Windows.Forms.ComboBox cboBarcodeColor;
47:           private System.Windows.Forms.ComboBox cboTextColor;
48:           private System.Windows.Forms.ComboBox cboRotateAngle;
49:           private System.Windows.Forms.CheckBox chkIncludeCheckSumDigit;
50:           private System.Windows.Forms.CheckBox chkSilentMode;
51:           private System.Windows.Forms.CheckBox chkAntiAlias;
52:           private System.Windows.Forms.ComboBox cboFileFormat;
53:           private System.Windows.Forms.ComboBox cboBgColor;
54:           private System.Windows.Forms.TextBox txtTopText;
55:           private System.Windows.Forms.ComboBox cboBarcodeType;
56:           private System.Windows.Forms.ComboBox cboTextFont;
57:           private System.Windows.Forms.NumericUpDown numMarginLeft;
58:           private System.Windows.Forms.Label label17;
59:           private System.Windows.Forms.Label label18;
60:           private System.Windows.Forms.Label label19;
61:           private System.Windows.Forms.Label label20;
62:           private System.Windows.Forms.Label label21;
63:           private System.Windows.Forms.NumericUpDown numMarginRight;
64:           private System.Windows.Forms.NumericUpDown numMarginBottom;
65:           private System.Windows.Forms.NumericUpDown numMarginTop;
66:           private System.Windows.Forms.NumericUpDown numTextGapBottom;
67:           private System.Windows.Forms.Label label22;
68:           private System.Windows.Forms.NumericUpDown numTextGapLeft;
69:           private System.Windows.Forms.Label label23;
70:           private System.Windows.Forms.NumericUpDown numTextGapTop;
71:           private System.Windows.Forms.Label label24;
72:           private System.Windows.Forms.Label label25;
73:           private System.Windows.Forms.Label label26;
74:           private System.Windows.Forms.NumericUpDown numTextGapRight;
75:           private System.Windows.Forms.NumericUpDown numBarWidth;
76:           private System.Windows.Forms.NumericUpDown numBarHieght;
77:           private System.Windows.Forms.Label lblBarcodeType;
78:           private System.Windows.Forms.Button btnPrint;
79:           private System.Windows.Forms.Button btnSave;
80:           private BarcodeNETWorkShop.BarcodeNETWindows barcodeNETWindows1;
81:           private System.Windows.Forms.CheckBox chkIsRounded;
82:       
83:           /// <summary>
84:           /// Required designer variable.
85:           /// </summary>
86:           private System.ComponentModel.Container components null;
87:  
88:           public Form1()
89:           {
90:               //
91:               // Required for Windows Form Designer support
92:               //
93:               InitializeComponent();
94:  
95:               //
96:               // TODO: Add any constructor code after InitializeComponent call
97:               //
98:           }
99:  
100:           /// <summary>
101:           /// Clean up any resources being used.
102:           /// </summary>
103:           protected override void Disposebool disposing )
104:           {
105:               ifdisposing )
106:               {
107:                   if (components != null
108:                   {
109:                       components.Dispose();
110:                   }
111:               }
112:               base.Disposedisposing );
113:           }
114:  
115:           #region Windows Form Designer generated code
116:           /// <summary>
117:           /// Required method for Designer support - do not modify
118:           /// the contents of this method with the code editor.
119:           /// </summary>
120:           private void InitializeComponent()
121:           {
122:               System.Resources.ResourceManager resources new System.Resources.ResourceManager(typeof(Form1));
123:               this.lblBarcodeType new System.Windows.Forms.Label();
124:               this.chkShowBorder new System.Windows.Forms.CheckBox();
125:               this.chkShowText new System.Windows.Forms.CheckBox();
126:               this.txtBarcodeText new System.Windows.Forms.TextBox();
127:               this.label2 new System.Windows.Forms.Label();
128:               this.label3 new System.Windows.Forms.Label();
129:               this.txtCustomText new System.Windows.Forms.TextBox();
130:               this.btnPrint new System.Windows.Forms.Button();
131:               this.groupBox1 new System.Windows.Forms.GroupBox();
132:               this.cboExceptionType new System.Windows.Forms.ComboBox();
133:               this.label10 new System.Windows.Forms.Label();
134:               this.label8 new System.Windows.Forms.Label();
135:               this.cboBarcodeType new System.Windows.Forms.ComboBox();
136:               this.label5 new System.Windows.Forms.Label();
137:               this.cboBarcodeColor new System.Windows.Forms.ComboBox();
138:               this.label6 new System.Windows.Forms.Label();
139:               this.cboTextColor new System.Windows.Forms.ComboBox();
140:               this.cboRotateAngle new System.Windows.Forms.ComboBox();
141:               this.cboSupplementalTextStyle new System.Windows.Forms.ComboBox();
142:               this.label7 new System.Windows.Forms.Label();
143:               this.label12 new System.Windows.Forms.Label();
144:               this.cboTextFont new System.Windows.Forms.ComboBox();
145:               this.label9 new System.Windows.Forms.Label();
146:               this.label14 new System.Windows.Forms.Label();
147:               this.cboFileFormat new System.Windows.Forms.ComboBox();
148:               this.label15 new System.Windows.Forms.Label();
149:               this.cboBgColor new System.Windows.Forms.ComboBox();
150:               this.chkIncludeCheckSumDigit new System.Windows.Forms.CheckBox();
151:               this.chkAntiAlias new System.Windows.Forms.CheckBox();
152:               this.chkSilentMode new System.Windows.Forms.CheckBox();
153:               this.chkIsRounded new System.Windows.Forms.CheckBox();
154:               this.label13 new System.Windows.Forms.Label();
155:               this.txtSupplementalText new System.Windows.Forms.TextBox();
156:               this.label11 new System.Windows.Forms.Label();
157:               this.btnSave new System.Windows.Forms.Button();
158:               this.label4 new System.Windows.Forms.Label();
159:               this.groupBox2 new System.Windows.Forms.GroupBox();
160:               this.barcodeNETWindows1 new BarcodeNETWorkShop.BarcodeNETWindows();
161:               this.fontDialog1 new System.Windows.Forms.FontDialog();
162:               this.colorDialog1 new System.Windows.Forms.ColorDialog();
163:               this.pictureBox1 new System.Windows.Forms.PictureBox();
164:               this.groupBox3 new System.Windows.Forms.GroupBox();
165:               this.numMarginBottom new System.Windows.Forms.NumericUpDown();
166:               this.numMarginTop new System.Windows.Forms.NumericUpDown();
167:               this.label20 new System.Windows.Forms.Label();
168:               this.label21 new System.Windows.Forms.Label();
169:               this.numMarginRight new System.Windows.Forms.NumericUpDown();
170:               this.label16 new System.Windows.Forms.Label();
171:               this.txtTopText new System.Windows.Forms.TextBox();
172:               this.numMarginLeft new System.Windows.Forms.NumericUpDown();
173:               this.label17 new System.Windows.Forms.Label();
174:               this.label18 new System.Windows.Forms.Label();
175:               this.label19 new System.Windows.Forms.Label();
176:               this.numTextGapBottom new System.Windows.Forms.NumericUpDown();
177:               this.label22 new System.Windows.Forms.Label();
178:               this.numTextGapLeft new System.Windows.Forms.NumericUpDown();
179:               this.label23 new System.Windows.Forms.Label();
180:               this.numTextGapTop new System.Windows.Forms.NumericUpDown();
181:               this.label24 new System.Windows.Forms.Label();
182:               this.label25 new System.Windows.Forms.Label();
183:               this.label26 new System.Windows.Forms.Label();
184:               this.numTextGapRight new System.Windows.Forms.NumericUpDown();
185:               this.numBarWidth new System.Windows.Forms.NumericUpDown();
186:               this.numBarHieght new System.Windows.Forms.NumericUpDown();
187:               this.groupBox1.SuspendLayout();
188:               this.groupBox2.SuspendLayout();
189:               this.groupBox3.SuspendLayout();
190:               ((System.ComponentModel.ISupportInitialize)(this.numMarginBottom)).BeginInit();
191:               ((System.ComponentModel.ISupportInitialize)(this.numMarginTop)).BeginInit();
192:               ((System.ComponentModel.ISupportInitialize)(this.numMarginRight)).BeginInit();
193:               ((System.ComponentModel.ISupportInitialize)(this.numMarginLeft)).BeginInit();
194:               ((System.ComponentModel.ISupportInitialize)(this.numTextGapBottom)).BeginInit();
195:               ((System.ComponentModel.ISupportInitialize)(this.numTextGapLeft)).BeginInit();
196:               ((System.ComponentModel.ISupportInitialize)(this.numTextGapTop)).BeginInit();
197:               ((System.ComponentModel.ISupportInitialize)(this.numTextGapRight)).BeginInit();
198:               ((System.ComponentModel.ISupportInitialize)(this.numBarWidth)).BeginInit();
199:               ((System.ComponentModel.ISupportInitialize)(this.numBarHieght)).BeginInit();
200:               this.SuspendLayout();
201:               // 
202:               // lblBarcodeType
203:               // 
204:               this.lblBarcodeType.Font new System.Drawing.Font("Arial"15.75FSystem.Drawing.FontStyle.BoldSystem.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
205:               this.lblBarcodeType.ForeColor System.Drawing.Color.DarkRed;
206:               this.lblBarcodeType.Location new System.Drawing.Point(72384);
207:               this.lblBarcodeType.Name "lblBarcodeType";
208:               this.lblBarcodeType.Size new System.Drawing.Size(13623);
209:               this.lblBarcodeType.TabIndex 3;
210:               this.lblBarcodeType.Text "Code128B";
211:               this.lblBarcodeType.TextAlign System.Drawing.ContentAlignment.TopCenter;
212:               // 
213:               // chkShowBorder
214:               // 
215:               this.chkShowBorder.ForeColor System.Drawing.SystemColors.Desktop;
216:               this.chkShowBorder.Location new System.Drawing.Point(16304);
217:               this.chkShowBorder.Name "chkShowBorder";
218:               this.chkShowBorder.TabIndex 4;
219:               this.chkShowBorder.Text "Show Border";
220:               this.chkShowBorder.CheckedChanged += new System.EventHandler(this.OnShowBorderChanged);
221:               // 
222:               // chkShowText
223:               // 
224:               this.chkShowText.Checked true;
225:               this.chkShowText.CheckState System.Windows.Forms.CheckState.Checked;
226:               this.chkShowText.ForeColor System.Drawing.SystemColors.Desktop;
227:               this.chkShowText.Location new System.Drawing.Point(16336);
228:               this.chkShowText.Name "chkShowText";
229:               this.chkShowText.TabIndex 5;
230:               this.chkShowText.Text "Show Text";
231:               this.chkShowText.CheckedChanged += new System.EventHandler(this.OnShowTextChanged);
232:               // 
233:               // txtBarcodeText
234:               // 
235:               this.txtBarcodeText.ForeColor System.Drawing.SystemColors.Desktop;
236:               this.txtBarcodeText.Location new System.Drawing.Point(12024);
237:               this.txtBarcodeText.MaxLength 30;
238:               this.txtBarcodeText.Name "txtBarcodeText";
239:               this.txtBarcodeText.Size new System.Drawing.Size(12022);
240:               this.txtBarcodeText.TabIndex 6;
241:               this.txtBarcodeText.Text "";
242:               this.txtBarcodeText.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtBarcodeText_KeyUp);
243:               // 
244:               // label2
245:               // 
246:               this.label2.ForeColor System.Drawing.SystemColors.Desktop;
247:               this.label2.Location new System.Drawing.Point(1624);
248:               this.label2.Name "label2";
249:               this.label2.Size new System.Drawing.Size(5623);
250:               this.label2.TabIndex 7;
251:               this.label2.Text "Barcode";
252:               // 
253:               // label3
254:               // 
255:               this.label3.ForeColor System.Drawing.SystemColors.Desktop;
256:               this.label3.Location new System.Drawing.Point(1656);
257:               this.label3.Name "label3";
258:               this.label3.Size new System.Drawing.Size(7223);
259:               this.label3.TabIndex 8;
260:               this.label3.Text "Custom Text";
261:               // 
262:               // txtCustomText
263:               // 
264:               this.txtCustomText.ForeColor System.Drawing.SystemColors.Desktop;
265:               this.txtCustomText.Location new System.Drawing.Point(120