From b2a5e60d5df66bc8a6be7e12eded1f7e923e9196 Mon Sep 17 00:00:00 2001
From: wells.liu <wells.liu@broconcentric.com>
Date: 星期一, 13 七月 2020 18:50:16 +0800
Subject: [PATCH] 一天一个excel 添加产品条码列

---
 src/Bro.M071.Process/M071Models.cs |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/Bro.M071.Process/M071Models.cs b/src/Bro.M071.Process/M071Models.cs
index 0d94bd0..beb5008 100644
--- a/src/Bro.M071.Process/M071Models.cs
+++ b/src/Bro.M071.Process/M071Models.cs
@@ -137,13 +137,13 @@
             get => key;
             set
             {
-                AlignName = key = value;
+                AliasName = key = value;
             }
         }
 
         [Category("閿悕閰嶇疆")]
         [Description("鍒悕")]
-        public string AlignName { get; set; }
+        public string AliasName { get; set; }
 
         [Category("鍚敤璁剧疆")]
         [Description("true锛氬惎鐢� false锛氱鐢�")]
@@ -178,7 +178,22 @@
 
         public string GetDisplayText()
         {
-            return $"{AlignName}";
+            string snapShot = "鏈寚瀹�";
+
+            using (var scope = GlobalVar.Container.BeginLifetimeScope())
+            {
+                var config = scope.Resolve<IProcessConfig>();
+                if (config != null)
+                {
+                    var snapshotPoint = (config as M071Config).SnapshotPointCollection.FirstOrDefault(u => u.Id == SnapshotPointId);
+                    if (snapshotPoint != null)
+                    {
+                        snapShot = snapshotPoint.Name;
+                    }
+                }
+            }
+
+            return $"{AliasName}-{snapShot}-{ImageSeq}";
         }
 
         public List<string> GetHalconToolPathList()
@@ -204,6 +219,7 @@
     public class ProductionMeasurement : INotifyPropertyChanged, IDisposable
     {
         public string Barcode;
+        public string PResult;
 
         public List<MeasurementUnit> Measurements = new List<MeasurementUnit>();
 
@@ -375,7 +391,9 @@
             {
                 if (valuePairs == null || valuePairs.Count == 0)
                 {
-                    IsDone = false;
+                    IsDone = false; 
+                    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("IsDone"));
+                    return;
                 }
 
                 foreach (KeyValuePair<string, double> pair in valuePairs)

--
Gitblit v1.8.0