quanzhou
2026-03-07 f6326d8e85b55a290ca88c9f14a0f2a9ecbf6971
src/Bro.M141.Process/M141Process.cs
@@ -962,15 +962,11 @@
                                LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"产品{p.PID}_{p.SEQUENCE}工位{measureBind.WorkPosition}的第{measureBind.CheckIndex}检测完成,{msg}");
                            }
                        });
                    }
                    catch (Exception ex)
                    {
                        LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"{measureBind.WorkPosition},产品{string.Join(",", products.Select(u => u.PID))}的NG图片保存异常,{ex.GetExceptionMessage()}");
                    }
                }
            });
        }
@@ -1626,7 +1622,6 @@
            });
        }
        public void ReplyPlcData(WorkPositionSet p, List<bool> result)
        {
            if (p.plcresult != 0)
@@ -1700,9 +1695,6 @@
            });
        }
        #endregion
@@ -1892,20 +1884,21 @@
        {
            try
            {
                LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"打印机打印{str}");
                int ttwith = 240;
                int ttheigh = 80;
                Printmessage = str;
                this.printDocument1.DefaultPageSettings.PrinterSettings.PrinterName = "Honeywell PX240S (300 dpi)";
                this.printDocument1.DefaultPageSettings.PrinterSettings.PrinterName = PrinterName;
                this.printDocument1.DefaultPageSettings.PaperSize = new PaperSize("Custum", ttwith, ttheigh);
                this.printDocument1.PrintController = new System.Drawing.Printing.StandardPrintController();
                this.printDocument1.Print();
            }
            catch
            catch(Exception ex)
            {
                LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"打印机打印出错:{ex.ToString()}");
            }
        }