From 1894ccc4014d813ea60cf276ac066e5870a82566 Mon Sep 17 00:00:00 2001
From: kingno <30263@KINGNO>
Date: 星期四, 18 九月 2025 13:51:20 +0800
Subject: [PATCH] 简化代码
---
src/Bro.M141.Process/M141Config.cs | 172 +++------------------------------------------------------
1 files changed, 9 insertions(+), 163 deletions(-)
diff --git a/src/Bro.M141.Process/M141Config.cs b/src/Bro.M141.Process/M141Config.cs
index 41f455a..43c607b 100644
--- a/src/Bro.M141.Process/M141Config.cs
+++ b/src/Bro.M141.Process/M141Config.cs
@@ -31,29 +31,13 @@
+ [Category("閫氶亾鏁伴厤缃�")]
+ [Description("閫氶亾鏁�")]
+ [DisplayName("閫氶亾鏁�")]
+ public int channelva { get; set; } = 3;
-
- [Category("鐐规閰嶇疆")]
- [Description("鐐规寮�鍏�")]
- [DisplayName("鐐规寮�鍏�")]
-
- public bool PointState { get; set; } = false;
-
-
- [Category("璇荤爜鏁版嵁")]
- [Description("璇荤爜鏁版嵁")]
- [DisplayName("璇荤爜鏁版嵁")]
-
- public string TmpPath { get; set; }
-
- [Category("璇荤爜鏁版嵁")]
- [Description("璇荤爜鏁版嵁")]
- [DisplayName("璇荤爜鏁版嵁")]
- [TypeConverter(typeof(SimpleCollectionConvert<string>))]
- [Editor(typeof(SimpleCollectionEditor<string>), typeof(UITypeEditor))]
- [EditorBrowsable]
- public List<string> BarcodeDataList { get; set; } = new List<string>();
+
[Category("宸ヤ綅淇℃伅")]
[Description("宸ヤ綅淇℃伅閰嶇疆闆嗗悎")]
@@ -81,15 +65,7 @@
[DisplayName("妫�娴嬭秴鏃舵椂闂�")]
public int DetectTimeout { get; set; } = 1000;
- [Category("鏁版嵁搴撹缃�")]
- [Description("鏁版嵁搴撴暟鎹繚瀛樺ぉ鏁帮紝瓒呰繃璇ュぉ鏁扮殑鏁版嵁浼氳鑷姩鍒犻櫎銆傝缃负0鏃朵笉鎵ц鍒犻櫎鎿嶄綔")]
- [DisplayName("鏁版嵁淇濆瓨澶╂暟")]
- public int DBDataTimeLimit { get; set; } = 3;
-
- [Category("鏁版嵁搴撹缃�")]
- [Description("鍒濆鍖栨暟鎹簱鏃剁殑缂撳瓨闃熷垪鏁伴噺")]
- [DisplayName("鍒濆缂撳瓨鏁伴噺")]
- public int DBBufferListCount { get; set; } = 10;
+
[Category("妫�娴嬪紓甯告寚绀�")]
[Description("閫夋嫨鏌愪釜Spec锛屽叾琛ㄧず妫�娴嬭繃绋嬩腑寮傚父")]
@@ -98,13 +74,7 @@
public string CheckErrorSpecCode { get; set; } = "";
-
-
-
- //[Category("璋冭瘯浣跨敤璁剧疆")]
- //[Description("鏄惁鍏佽涓存椂浜у搧鍚敤锛屼娇鐢ㄤ簬涓嶅畬鏁存祦绋嬩腑涓存椂鎺ユ敹妫�娴嬫暟鎹�")]
- //[DisplayName("涓存椂浜у搧寮�鍏�")]
- //public bool IsAllowTempProduct { get; set; } = false;
+
[Category("浣嶇疆搴�/杞粨搴﹁缃�")]
[Description("浜у搧娴嬮噺鐐逛綅闆嗗悎")]
@@ -113,94 +83,7 @@
[Editor(typeof(ComplexCollectionEditor<ContourPoint>), typeof(UITypeEditor))]
public List<ContourPoint> MeasurePointCollection { get; set; } = new List<ContourPoint>();
- [Category("浣嶇疆搴�/杞粨搴﹁缃�")]
- [Description("妫�娴嬮」閰嶇疆闆嗗悎锛岃缃寘鍚粍鍚堢偣浣嶇殑妫�娴嬮」")]
- [DisplayName("妫�娴嬮」閰嶇疆闆嗗悎")]
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<MeasureItemBind>), typeof(UITypeEditor))]
- public List<MeasureItemBind> MeasureItemBinds { get; set; } = new List<MeasureItemBind>();
-
- [Category("浣嶇疆搴�/杞粨搴﹁缃�")]
- [DisplayName("杞粨鐐硅绠楀亸绉�")]
- [Description("璁$畻杞粨鐐逛綅缃椂鐨勭偣浣嶅亸绉诲ぇ灏忥紝鍗曚綅mm")]
- public float CountLineShift { get; set; } = 0.5f;
-
- [Category("浣嶇疆搴�/杞粨搴﹁缃�")]
- [DisplayName("娴嬮噺鐐硅ˉ鍋垮�艰缃�")]
- [Description("閽堝鍚勫伐浣嶅搴斾骇鍝佺殑鍚勬娴嬮」鐐癸紝鍋氬崟鐐硅ˉ鍋垮鐞�")]
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<Product_CheckPointsOffsetList>), typeof(UITypeEditor))]
- public List<Product_CheckPointsOffsetList> Product_PointsOffsetList { get; set; } = new List<Product_CheckPointsOffsetList>();
-
- [Category("MES閰嶇疆")]
- [Description("MES涓婁紶URL鍦板潃")]
- [DisplayName("MES涓婁紶URL鍦板潃")]
- public string MESUploadURL { get; set; }
-
- [Category("MES閰嶇疆")]
- [Description("true锛氬惎鐢∕ES涓婁紶 false锛氭湭鍚敤MES涓婁紶")]
- [DisplayName("MES涓婁紶寮�鍏�")]
- public bool IsEnabelMESUpload { get; set; } = false;
-
- [Category("MES閰嶇疆")]
- [Description("MES涓婁紶椤圭洰浠g爜锛屼唬琛≒roject")]
- [DisplayName("MES绔欑偣浠g爜")]
- public string MESProjectCode { get; set; } = "";
-
- [Category("MES閰嶇疆")]
- [Description("MES涓婁紶鏈哄櫒鍙凤紝浠h〃MachineNumber")]
- [DisplayName("MES鏈哄櫒鍙�")]
- public string MESMachineNum { get; set; } = "";
-
- [Category("MES閰嶇疆")]
- [Description("MES涓婁紶浠g爜鍜屾娴嬮」浠g爜鐨勬槧灏勫叧绯�")]
- [DisplayName("MES涓婁紶浠g爜鏄犲皠鍏崇郴")]
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<MESCodeMapping>), typeof(UITypeEditor))]
- public List<MESCodeMapping> MESCodeMappingCollection { get; set; } = new List<MESCodeMapping>();
-
- [Category("MES閰嶇疆-OEE涓婁紶")]
- [Description("OEE鏁版嵁涓婁紶URL鍦板潃")]
- [DisplayName("OEE URL")]
- public string OEEDataUploadURL { get; set; } = "";
-
- [Category("MES閰嶇疆-OEE涓婁紶")]
- [Description("true: 鍚敤OEE鏁版嵁涓婁紶 false锛氱鐢∣EE鏁版嵁涓婁紶")]
- [DisplayName("OEE鏁版嵁涓婁紶鍚敤鏍囪")]
- public bool IsEnableOEEDataUpload { get; set; } = false;
-
- [Category("MES閰嶇疆-OEE涓婁紶")]
- [Description("OEE閰嶇疆WorkPlace淇℃伅")]
- [DisplayName("OEE_WorkPlace")]
- public string OEEConfig_WorkPlace { get; set; } = "";
-
- [Category("鍥剧墖鏄剧ず璁剧疆")]
- [Description("鑳屾櫙鍥剧墖鏂囦欢璺緞")]
- [DisplayName("鑳屾櫙鍥剧墖")]
- [Editor(typeof(FileDialogEditor), typeof(UITypeEditor))]
- public string BackgroundImageFilePath { get; set; }
-
- [Category("鍥剧墖鏄剧ず璁剧疆")]
- [DisplayName("妫�娴嬬己闄锋樉绀哄竷灞�")]
- [Description("妫�娴嬬晫闈㈢己闄锋樉绀哄竷灞�")]
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(DefectRectangleIndicatorEditor), typeof(UITypeEditor))]
- public List<DefectRectangleIndicator> DefectIndicatorCollection { get; set; } = new List<DefectRectangleIndicator>();
-
- [Category("琛ㄦ牸鏄剧ず璁剧疆")]
- [Description("琛ㄦ牸鏄剧ず浜у搧鏁版嵁鐨勬柟寮忥紝鎸夎鎴栧垪鏄剧ず涓�涓骇鍝佺殑鎵�鏈夋暟鎹�")]
- [DisplayName("琛ㄦ牸鏄剧ず")]
- public RefreshMode RefreshModeSelect { get; set; } = RefreshMode.琛�;
-
- [Category("琛ㄦ牸鏄剧ず璁剧疆")]
- [Description("琛ㄦ牸鏄剧ず浜у搧鏁版嵁鏁伴噺")]
- [DisplayName("琛ㄦ牸鏄剧ず浜у搧鏁版嵁鏁伴噺")]
- public int DataViewCount { get; set; } = 100;
-
- [Category("琛ㄦ牸鏄剧ず璁剧疆")]
- [Description("琛ㄦ牸浜у搧鏁版嵁鍒锋柊鐨勯鐜囷紝鍗曚綅us")]
- [DisplayName("琛ㄦ牸浜у搧鏁版嵁鍒锋柊棰戠巼")]
- public int DataViewRefreshTime { get; set; } = 1000;
+
[Category("NG鍜孫K鍥剧墖淇濆瓨閰嶇疆")]
[Description("鍥剧墖淇濆瓨鐩綍")]
@@ -270,8 +153,6 @@
-
-
[ResCategory("鍘嬬缉鍥剧墖淇濆瓨閰嶇疆")]
[ResDescription("鍥剧墖鍘嬬缉鐜�")]
[ResDisplayName("鍥剧墖鍘嬬缉鐜�")]
@@ -279,29 +160,7 @@
public zipZip SavezipZip { get; set; } = zipZip.zip;
- [Category("瀹炴椂鏁版嵁鍥炰紶璁剧疆")]
- [Description("閫夋嫨鍥炰紶瀹炴椂鏁版嵁鐨勬湰鍦皊ocket鏈嶅姟绔�")]
- [DisplayName("鍥炰紶鏈嶅姟绔�")]
- [TypeConverter(typeof(DeviceIdSelectorConverter<TcpListenerWrap>))]
- public string RealTimeDataServer { get; set; }
-
- [Category("瀹炴椂鏁版嵁鍥炰紶璁剧疆")]
- [Description("鍥炰紶鏁版嵁鐨勬牸寮忓拰鍐呭璁剧疆")]
- [DisplayName("鍥炰紶鏁版嵁璁剧疆闆嗗悎")]
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<RealTimeAdjustDataModel>), typeof(UITypeEditor))]
- public List<RealTimeAdjustDataModel> RealTimeDataModels { get; set; } = new List<RealTimeAdjustDataModel>();
-
- [Category("浜у搧璁剧疆")]
- [DisplayName("浜у搧灞曠ず鏁伴噺涓婇檺")]
- [Description("浜у搧灞曠ず鏁伴噺涓婇檺锛岃秴杩囪鏁伴噺鐨勬娴嬭褰曡嚜鍔ㄧЩ闄�")]
- public int MaxProductListAmount { get; set; } = 20;
-
- [Category("蹇冭烦閰嶇疆")]
- [DisplayName("蹇冭烦杩斿洖鍊�")]
- [Description("蹇冭烦杩斿洖鍊�")]
- public string Heartstr { get; set; } = "";
-
+
[Category("绠楁硶棰勭儹璁剧疆")]
@@ -317,19 +176,6 @@
public List<WarmUpOne> WarmUpList { get; set; } = new List<WarmUpOne>();
-
-
- //[Category("妫�娴嬬浉鍏�")]
- //[Description("娴佺▼鍙婅澶囨娴嬫爣鍑嗛泦鍚�")]
- //[DisplayName("妫�娴嬫爣鍑嗛泦鍚�2")]
- //[TypeConverter(typeof(GlobalSpecCollectionCountConverter))]
- //[Editor(typeof(GlobalSpecCollectionEditor), typeof(UITypeEditor))]
- //public List<ISpec> sss { get; set; } = new List<ISpec>();
-
- [Category("缁熻姹囨�婚厤缃�")]
- [Description("姹囨�荤晫闈骇鍝佸垪琛ㄦ渶澶ф暟閲�")]
- [DisplayName("浜у搧鍒楄〃鏈�澶ф暟閲�")]
- public int MaxProductNumForStatistic { get; set; } = 200;
}
--
Gitblit v1.8.0