quanzhou
2025-09-11 31de09d1ba504cb036ae29a98a9efbb0c2d61914
src/Bro.M141.Process/UI/UIPrinter.cs
@@ -45,8 +45,6 @@
        {
            base.OnProcessUpdated();
            printDocument1.PrintPage += new PrintPageEventHandler(printDocument_Print);
            Process141.StartPrinter += StartPrint;
            textBox1.Text = "C229M2508250500002";
        }
@@ -86,8 +84,15 @@
            string status = GetPrinterStatusMessage(statuscode);
            //Config141
            Process141.PlcwritePrinter(1520, 0);
            Process141.PlcwritePrinter(1510, 1);
            try
            {
                Process141.PlcwritePrinter(1520, 0);
                Process141.PlcwritePrinter(1510, 1);
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
@@ -123,8 +128,8 @@
                {
                    DisableECI = true,//设置内容编码
                    CharacterSet = "UTF-8",  //设置二维码的宽度和高度
                    Width = 123,
                    Height = 123,
                    Width = 60,
                    Height = 60,
                    Margin = 1//设置二维码的边距,单位不是固定像素
                };
@@ -151,16 +156,16 @@
                //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//设置二维码的边距,单位不是固定像素
                };
                //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);
@@ -520,16 +525,6 @@
            return bmp;
        }
        #region