From e4225da44bf9052e517017c43fc60957d5484cff Mon Sep 17 00:00:00 2001
From: wells.liu <wells.liu@broconcentric.com>
Date: 星期四, 16 七月 2020 11:57:00 +0800
Subject: [PATCH] 测量结果 界面及查询功能

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

diff --git a/src/Bro.M071.Process/M071Models.cs b/src/Bro.M071.Process/M071Models.cs
index bd98beb..beb5008 100644
--- a/src/Bro.M071.Process/M071Models.cs
+++ b/src/Bro.M071.Process/M071Models.cs
@@ -178,7 +178,22 @@
 
         public string GetDisplayText()
         {
-            return $"{AliasName}";
+            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