| | |
| | | |
| | | using Bro.Common.Helper; |
| | | using Bro.Common.Helper; |
| | | using Bro.Common.Interface; |
| | | using Bro.M135.Common; |
| | | using Bro.UI.Model.Winform; |
| | |
| | | using System.Windows.Forms; |
| | | using ZXing; |
| | | using ZXing.Common; |
| | | using ZXing.QrCode; |
| | | using static Bro.M141.Process.BasketCodeUI; |
| | | using ZXing.QrCode.Internal; |
| | | using static System.Windows.Forms.AxHost; |
| | | using ZXing.QrCode; |
| | | |
| | | |
| | | |
| | | //using System.Printing; |
| | | |
| | |
| | | printDocument1.PrintPage += new PrintPageEventHandler(printDocument_Print); |
| | | |
| | | Process141.StartPrinter += StartPrint; |
| | | textBox1.Text = "Broconcentric"; |
| | | textBox1.Text = "C229M2508250500002"; |
| | | } |
| | | |
| | | |
| | |
| | | //Config141 |
| | | Process141.PlcwritePrinter(1520, 0); |
| | | Process141.PlcwritePrinter(1510, 1); |
| | | |
| | | } |
| | | |
| | | |
| | | //C229M2508250500002 |
| | | private void printDocument_Print(object sender, PrintPageEventArgs e) |
| | | { |
| | | Font fntTxt = new Font("黑体", 15, System.Drawing.FontStyle.Bold);//正文文字 |
| | |
| | | |
| | | writer.Options = options; |
| | | Bitmap map = writer.Write(numvalue); |
| | | e.Graphics.DrawImage(map, new System.Drawing.Point(90, 10)); |
| | | e.Graphics.DrawImage(map, new System.Drawing.Point(90,10)); |
| | | |
| | | |
| | | // 在二维码下方画内容文字 |
| | |
| | | //g.DrawString("厂商", font, brush, (startX + 20) * Scale, (startY + 5) * Scale);// |
| | | //g.DrawString("嘉彰科技", font2, brush, (startX + 140) * Scale, (startY + 4) * Scale); |
| | | |
| | | BarcodeWriter writer = new BarcodeWriter(); |
| | | writer.Format = BarcodeFormat.QR_CODE; |
| | | QrCodeEncodingOptions options = new QrCodeEncodingOptions() |
| | | { |
| | | DisableECI = true,//设置内容编码 |
| | | CharacterSet = "UTF-8", //设置二维码的宽度和高度 |
| | | Width = 123, |
| | | Height = 123, |
| | | Margin = 1//设置二维码的边距,单位不是固定像素 |
| | | }; |
| | | |
| | | ////第二行数据 |
| | | //g.DrawRectangle(p, startX * Scale, (startY + 20) * Scale, 70 * Scale, 20 * Scale); |