From 3322022068ab818912d6f5d9e5eb31f51cc639c2 Mon Sep 17 00:00:00 2001
From: patrick.xu <patrick.xu@broconcentric.com>
Date: 星期四, 24 二月 2022 09:12:30 +0800
Subject: [PATCH] 添加配置文件的DataShift2

---
 src/Bro.M071.Process/M071Models.cs |   49 +++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/src/Bro.M071.Process/M071Models.cs b/src/Bro.M071.Process/M071Models.cs
index ed4c138..6459031 100644
--- a/src/Bro.M071.Process/M071Models.cs
+++ b/src/Bro.M071.Process/M071Models.cs
@@ -52,7 +52,6 @@
         }
     }
 
-
     public class KeyAlgorithem : IComplexDisplay
     {
         [Browsable(false)]
@@ -84,6 +83,10 @@
         [Description("妫�娴嬬畻娉曡矾寰�")]
         [Editor(typeof(FileDialogEditor), typeof(UITypeEditor))]
         public string AlgorithemPath { get; set; }
+
+        [Category("涓婁紶NG浠g爜")]
+        [Description("涓婁紶NG浠g爜")]
+        public string NGCode { get; set; }
 
         [Category("鏄剧ず閰嶇疆")]
         [Description("鏄剧ず鍖哄煙澶у皬")]
@@ -210,6 +213,13 @@
         public string KeyResultId { get; set; }
         #endregion
 
+        [Category("琛ュ伩閰嶇疆")]
+        [DisplayName("鍗曢敭琛ュ伩")]
+        [Description("鍗曢敭琛ュ伩")]
+        [TypeConverter(typeof(CollectionCountConvert))]
+        [Editor(typeof(ComplexCollectionEditor<KeyCompensation>), typeof(UITypeEditor))]
+        public List<KeyCompensation> KeyCompensationCollection { get; set; } = new List<KeyCompensation>();
+
         #region 妫�娴嬬浉鍏冲瓧娈�
         public Dictionary<string, double> KeyValues = null;
         //public SnapshotPoint SnapshotPoint = null;
@@ -257,6 +267,24 @@
         }
     }
 
+    public class KeyCompensation : IComplexDisplay
+    {
+        [Category("鍗曢敭琛ュ伩")]
+        [DisplayName("鍗曢敭缁撴灉")]
+        [Description("閽堝鍗曢敭鐨勬煇涓�椤圭粨鏋滃仛琛ュ伩锛屼竴鑸负Z1,Z2,Z3,Z4,B1,B2")]
+        public string KeyResult { get; set; }
+
+        [Category("鍗曢敭琛ュ伩")]
+        [DisplayName("琛ュ伩鍊�")]
+        [Description("鍗曢敭缁撴灉琛ュ伩鍊�")]
+        public float Compensation { get; set; }
+
+        public string GetDisplayText()
+        {
+            return $"{KeyResult} {Compensation}";
+        }
+    }
+
     public class ProductionMeasurement : INotifyPropertyChanged, IDisposable
     {
         public string Barcode;
@@ -277,7 +305,7 @@
             Measurements?.ForEach(m => m?.Dispose());
             Measurements = null;
             ElementList = null;
-            Barcode = null;
+            //Barcode = null;
             GC.Collect();
         }
 
@@ -509,6 +537,23 @@
         }
     }
 
+    public class KeyCodeMap : IComplexDisplay
+    {
+        [Category("閿悕鏄犲皠閰嶇疆")]
+        [Description("閿悕")]
+        [TypeConverter(typeof(KeyNameDictConverter))]
+        public string Key { get; set; }
+
+        [Category("閿悕鏄犲皠閰嶇疆")]
+        [Description("涓婁紶瀵瑰簲閿唬鐮丆ode")]
+        public string KeyCode { get; set; }
+
+        public string GetDisplayText()
+        {
+            return $"{Key}--{KeyCode}";
+        }
+    }
+
     //public class NoticedDictionary<T1, T2> : Dictionary<T1, T2>, INotifyPropertyChanged
     //{
     //    public event PropertyChangedEventHandler PropertyChanged;

--
Gitblit v1.8.0