From 642cd31f0d1586a2a5ca6f9a3b3364725f4f1ecd Mon Sep 17 00:00:00 2001
From: wells.liu <wells.liu@broconcentric.com>
Date: 星期六, 04 七月 2020 13:44:24 +0800
Subject: [PATCH] 暂存

---
 src/Bro.M071.Process/M071Process.cs |   56 ++++++--------------------------------------------------
 1 files changed, 6 insertions(+), 50 deletions(-)

diff --git a/src/Bro.M071.Process/M071Process.cs b/src/Bro.M071.Process/M071Process.cs
index 68b79c6..65f74a9 100644
--- a/src/Bro.M071.Process/M071Process.cs
+++ b/src/Bro.M071.Process/M071Process.cs
@@ -33,7 +33,7 @@
 
         #region 浜嬩欢
         public event Action OnMeasureStart;
-        public event Action<string> OnBarcodeChanged;
+        public event Action OnClearBarcode;
         public event Action<IShapeElement> OnElementUpdated;
         #endregion
 
@@ -51,7 +51,7 @@
         /// </summary>
         private void CheckMachineState()
         {
-            throw new NotImplementedException();
+            //throw new NotImplementedException();
         }
 
         private void InitialSetting()
@@ -110,7 +110,7 @@
                     if (keyRespone.Count == 0)
                         throw new ProcessException($"{u.GetDisplayText()}瀵瑰簲鐨勫崟閿笉瀛樺湪鎴栦笉鍙敤");
 
-                    if (b.KeyResult == "All")
+                    if (b.KeyResultId == "All")
                     {
                         keyRespone.SelectMany(kr => kr.KeyResultList).ToList().ForEach(r =>
                           {
@@ -119,7 +119,7 @@
                     }
                     else
                     {
-                        b.MeasureValueDict[b.KeyResult] = null;
+                        b.MeasureValueDict[b.KeyResultId] = null;
                     }
                 });
             });
@@ -150,19 +150,7 @@
         //}
         #endregion
 
-        private string barCode = "";
-        public string BarCode
-        {
-            get => barCode;
-            set
-            {
-                if (barCode != value)
-                {
-                    barCode = value;
-                    OnBarcodeChanged?.Invoke(value);
-                }
-            }
-        }
+        public string BarCode { get; set; }
 
         List<ProductionMeasurement> productionList = new List<ProductionMeasurement>();
 
@@ -171,6 +159,7 @@
         {
             if (string.IsNullOrWhiteSpace(BarCode))
             {
+                OnClearBarcode?.Invoke();
                 throw new ProcessException("鏈緭鍏ヤ骇鍝佹潯鐮侊紝璇峰嬁寮�濮嬫祴閲�");
             }
 
@@ -236,39 +225,6 @@
             BarCode = "";
 
             return new ProcessResponse(true);
-        }
-
-        /// <summary>
-        /// 鏆傚仠鏍囧織  
-        /// WaitHandle 鏆傚仠鍙ユ焺  榛樿涓洪潪闃诲 鍙墽琛�
-        /// WaitResult 鏆傚仠鏍囧織 true 姝e父鎵ц  false 鏆傚仠涓�
-        /// </summary>
-        ManualWaitConfirm _pauseHandle = new ManualWaitConfirm()
-        {
-            WaitHandle = new ManualResetEvent(true),
-            WaitResult = true,
-        };
-
-        [ProcessMethod("", "PauseJob", "鏆傚仠娴佺▼", InvokeType.TestInvoke)]
-        public ProcessResponse PauseJob(IOperationConfig opConfig, IDevice invokeDevice, IDevice sourceDevice)
-        {
-            if (_pauseHandle.WaitResult)
-            {
-                #region 鏉垮崱鏆傚仠鍔ㄤ綔
-                #endregion
-
-                _pauseHandle.WaitHandle.Reset();
-            }
-            else
-            {
-                #region 鏉垮崱鎭㈠鍔ㄤ綔
-                #endregion
-
-                _pauseHandle.WaitHandle.Set();
-            }
-
-            _pauseHandle.WaitResult = !_pauseHandle.WaitResult;
-            return new ProcessResponse(_pauseHandle.WaitResult);
         }
 
         #region 绉佹湁鏂规硶

--
Gitblit v1.8.0