From aa6b32cb313c914e5f8eed0a347551f8fc65ffbd Mon Sep 17 00:00:00 2001
From: kingno <30263@KINGNO>
Date: 星期三, 27 八月 2025 16:51:18 +0800
Subject: [PATCH] 合并

---
 src/Bro.M141.Process/M141Config.cs |  192 ++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 184 insertions(+), 8 deletions(-)

diff --git a/src/Bro.M141.Process/M141Config.cs b/src/Bro.M141.Process/M141Config.cs
index 993c17c..b583595 100644
--- a/src/Bro.M141.Process/M141Config.cs
+++ b/src/Bro.M141.Process/M141Config.cs
@@ -6,6 +6,7 @@
 using Bro.Common.Model;
 using Bro.M135.Common;
 using Bro.Process;
+using MathNet.Numerics.Distributions;
 using Newtonsoft.Json;
 using System.ComponentModel;
 using System.Drawing.Design;
@@ -13,12 +14,15 @@
 using System.Drawing.Printing;
 using System.Reflection;
 using System.Windows.Forms.Design;
+using Windows.Services.Maps;
 using static Bro.Common.Helper.EnumHelper;
 
 namespace Bro.M141.Process
 {
     public class M141Config : ProcessConfigBase
     {
+
+
         [Category("鎵撳嵃鏈洪厤缃�")]
         [Description("鎵撳嵃鏈洪厤缃泦鍚�")]
         [DisplayName("鎵撳嵃鏈洪厤缃泦鍚�")]
@@ -27,9 +31,10 @@
         public List<Printer> Printers { get; set; } = new List<Printer>();
 
 
-      
-     
-
+        [Category("鎵撳嵃鏈洪厤缃�")]
+        [Description("鏄惁鎵撳嵃灏佽鐮�")]
+        [DisplayName("鏄惁鎵撳嵃灏佽鐮�")]
+        public bool Isprint { get; set; } = false;
 
 
 
@@ -75,6 +80,63 @@
         [TypeConverter(typeof(SpecCodeSelectorConverter))]
         public string CheckErrorSpecCode { get; set; } = "";
 
+
+        [Category("鐗瑰畾缂洪櫡閰嶇疆")]
+        [Description("S3鍜孲5鍏卞悓鍒ゆ柇缂洪櫡")]
+        [DisplayName("缂洪櫡鍚嶇О")]
+        [TypeConverter(typeof(GlobalDefectNameConverter))]
+        public string defectname { get; set; } = "";
+
+        private class GlobalDefectNameConverter : StringConverter
+        {
+            public override bool GetStandardValuesExclusive(ITypeDescriptorContext? context)
+            {
+                return false;
+            }
+
+            public override bool GetStandardValuesSupported(ITypeDescriptorContext? context)
+            {
+                return true;
+            }
+
+            public override StandardValuesCollection? GetStandardValues(ITypeDescriptorContext? context)
+            {
+                using (var scope = GlobalVar.Container.BeginLifetimeScope())
+                {
+                    var config = scope.Resolve<IProcessConfig>();
+
+                    return new StandardValuesCollection((config as IDefectSwitcher).DefectSwitchCollection.Select(u => u.DefectName).ToList());
+                }
+            }
+        }
+
+        [Category("杩炵画NG鎶ヨ璁剧疆")]
+        [Description("杩炵画NG鎶ヨ鎬诲紑鍏炽�倀rue锛氬紑鍚繛缁璑G鎶ヨ銆�false锛氬叧闂繛缁璑G鎶ヨ鏈哄埗")]
+        [DisplayName("杩炵画NG鎶ヨ鎬诲紑鍏�")]
+        public bool IsEnableContinuousNGAlarm { get; set; } = true;
+
+        [Category("杩炵画NG鎶ヨ璁剧疆")]
+        [Description("杩炵画NG鎶ヨ鍦板潃銆傚嚭鐜拌繛缁璑G鏃讹紝涓婁綅鏈哄悜璇ュ湴鍧�鍐欏叆1锛屽彇娑堟椂锛屽悜璇ュ湴鍧�鍐欏叆0銆�")]
+        [DisplayName("杩炵画NG鎶ヨ鍦板潃")]
+        public int ContinuousNGAlarmAddress { get; set; } = 0;
+
+        //[Category("杩炵画NG鎶ヨ璁剧疆")]
+        //[Description("杩炵画NG鎶ヨ涓婁紶MES鐨勬柟娉曞湴鍧�銆�")]
+        //[DisplayName("杩炵画NG鎶ヨ涓婁紶MES鐨勬柟娉曞湴鍧�")]
+        //public string ContinuousNGAlarmMESFunc { get; set; } = "";
+
+        [Category("杩炵画NG鎶ヨ璁剧疆")]
+        [Description("杩炵画NG鎶ヨ鏄惁闇�瑕佷汉宸ュ浣�")]
+        [DisplayName("杩炵画NG鎶ヨ鏄惁闇�瑕佷汉宸ュ浣�")]
+        public bool IsOperatorReset { get; set; } = false;
+
+
+        [Category("杩炵画NG鎶ヨ璁剧疆")]
+        [Description("杩炵画NG鎶ヨ璁剧疆闆嗗悎銆傝缃繛缁璑G鎶ヨ鐨勫紑鍏筹紝绫诲瀷锛屾暟閲忓拰鏃堕棿闃堝�笺�傛坊鍔犳垨鍒犻櫎鐩戞帶闇�瑕佽蒋浠堕噸鍚敓鏁堛��")]
+        [DisplayName("杩炵画NG鎶ヨ璁剧疆闆嗗悎")]
+        [TypeConverter(typeof(CollectionCountConvert))]
+        [Editor(typeof(ComplexCollectionEditor<ContinuousNGAlarm>), typeof(UITypeEditor))]
+        public List<ContinuousNGAlarm> ContinuousNGAlarmColletion { get; set; } = new List<ContinuousNGAlarm>();
 
         [Category("浣嶇疆搴﹁缃�")]
         [Description("浜у搧娴嬮噺鐐逛綅闆嗗悎")]
@@ -137,6 +199,15 @@
         [DisplayName("褰撳墠鏍忓叿鐮�")]
         public string basketcode { get; set; } = "NoRead";
 
+
+
+
+        [Category("鏍忓叿鏉$爜閰嶇疆")]
+        [Description("褰撳墠宸ュ崟鍙�")]
+        [DisplayName("褰撳墠宸ュ崟鍙�")]
+        public string zwoid { get; set; } = "";
+
+
         [Category("鏍忓叿鏉$爜閰嶇疆")]
         [Description("鏈珯鏄惁璇诲彇鏍忓叿鐮�")]
         [DisplayName("鏈珯鏄惁璇诲彇鏍忓叿鐮�")]
@@ -155,6 +226,96 @@
         [Description("蹇冭烦鍦板潃")]
         [DisplayName("蹇冭烦鍦板潃")]
         public int heartadd { get; set; } = 1505;
+
+
+
+        [Category("MES閰嶇疆")]
+        [Description("鏄惁涓婁紶MES")]
+        [DisplayName("鏄惁涓婁紶MES")]
+        public bool ISupMES { get; set; } = false;
+
+        [Category("MES閰嶇疆")]
+        [Description("鏄惁寮哄埗MES涓婁紶鎴愬姛")]
+        [DisplayName("鏄惁寮哄埗MES涓婁紶鎴愬姛")]
+        public bool ISokMes { get; set; } = false;
+
+        [Category("MES閰嶇疆")]
+        [Description("鏄惁涓婁紶NG鏁版嵁")]
+        [DisplayName("鏄惁涓婁紶NG鏁版嵁")]
+        public bool ISupNG { get; set; } = true;
+
+        [Category("MES閰嶇疆")]
+        [Description("鎺ュ彛閫夋嫨,0绡叿鎺ュ彛,1鏁版嵁涓婁紶鎺ュ彛,-1鎵�鏈夋帴鍙�")]
+        [DisplayName("鎺ュ彛閫夋嫨")]
+        public int MESchannel { get; set; } = 0;
+
+
+
+        [Category("MES閰嶇疆")]
+        [Description("璐﹀彿")]
+        [DisplayName("璐﹀彿")]
+        public string zuser { get; set; } = "aoiUser";
+
+        [Category("MES閰嶇疆")]
+        [Description("瀵嗙爜")]
+        [DisplayName("瀵嗙爜")]
+        public string zpassword { get; set; } = "Chia@aoi";
+
+        [Category("MES閰嶇疆")]
+        [Description("IP")]
+        [DisplayName("Ip")]
+        public string zIP { get; set; } = "10.2.20.114";
+
+        [Category("MES閰嶇疆")]
+        [Description("绔彛鍙�")]
+        [DisplayName("绔彛鍙�")]
+        public int zport { get; set; } = 15672;
+
+
+
+        //[Category("MES閰嶇疆")]
+        //[Description("澶囩敤鏍忓叿鐮�")]
+        //[DisplayName("澶囩敤鏍忓叿鐮�")]
+        //public string basketcode2 { get; set; } = "NoRead";
+
+        [Category("MES閰嶇疆")]
+        [Description("numpro")]
+        [DisplayName("numpro")]
+        [JsonIgnore]
+        public int numpro { get; set; } = 0;
+
+        [Category("MES閰嶇疆")]
+        [Description("mesnum1")]
+        [DisplayName("mesnum1")]
+        [JsonIgnore]
+        public int mesnum1 { get; set; } = 0;
+
+        [Category("MES閰嶇疆")]
+        [Description("mesnum2")]
+        [DisplayName("mesnum2")]
+        [JsonIgnore]
+        public int mesnum2 { get; set; } = 0;
+
+        [Category("MES閰嶇疆")]
+        [Description("mesnum3")]
+        [DisplayName("mesnum3")]
+        [JsonIgnore]
+        public int mesnum3 { get; set; } = 0;
+
+        [Category("MES閰嶇疆")]
+        [Description("mesnum4")]
+        [DisplayName("mesnum4")]
+        [JsonIgnore]
+        public int mesnum4 { get; set; } = 0;
+
+
+
+        [Category("MES閰嶇疆")]
+        [Description("plc搴忓彿鍜岀鍏风爜闆嗗悎")]
+        [DisplayName("plc搴忓彿鍜岀鍏风爜闆嗗悎")]
+        [TypeConverter(typeof(CollectionCountConvert))]
+        [Editor(typeof(ComplexCollectionEditor<PlcAndBasketcode>), typeof(UITypeEditor))]
+        public List<PlcAndBasketcode> PlcAndBasketcodes { get; set; } = new List<PlcAndBasketcode>();
 
 
     }
@@ -231,6 +392,7 @@
         public string plcname { get; set; } = "";
 
 
+
         [Category("PLC閰嶇疆")]
         [DisplayName("鏄惁鍚敤")]
         [Description("鏄惁鍚敤")]
@@ -267,6 +429,12 @@
         [Description("鎶ヨ鍚嶇О")]
         public string alarmname { get; set; } = "";
 
+        [Category("閰嶇疆")]
+        [DisplayName("鎶ヨ绉嶇被")]
+        [Description("鎶ヨ绉嶇被")]
+        public string alarmtype { get; set; } = "";
+
+
         [Browsable(false)]
         [JsonIgnore]
         public int value { get; set; } = -1;
@@ -286,7 +454,7 @@
             {
                 var temchar = data.Split(',');
                 ret.alarmname = temchar[0];
-                ret.address =Convert.ToInt32(temchar[1]);
+                ret.address = Convert.ToInt32(temchar[1]);
                 ret.address2 = Convert.ToInt32(temchar[2]);
             }
             catch (Exception ex)
@@ -346,7 +514,19 @@
     }
 
 
+    public class PlcAndBasketcode
+    {
+        [Category("閰嶇疆")]
+        [Description("搴忓彿")]
+        [DisplayName("搴忓彿")]
+        public int id { get; set; } = 0;
 
+        [Category("閰嶇疆")]
+        [Description("鏉$爜")]
+        [DisplayName("鏉$爜")]
+        public string code { get; set; }
+
+    }
 
 
 
@@ -931,10 +1111,6 @@
         [Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))]
         public string ImageFolder { get; set; }
 
-        [Category("鍚姩閰嶇疆")]
-        [Description("true锛氬惎鍔ㄧ绾挎祴璇� false锛氬仠姝㈢绾挎祴璇�")]
-        [DisplayName("娴嬭瘯寮�鍏�")]
-        public bool IsStart { get; set; } = true;
 
 
         [Category("妫�娴嬪姛鑳�")]

--
Gitblit v1.8.0