From c0b8009ef36746c7a14606267662570e8c59c2c6 Mon Sep 17 00:00:00 2001
From: xcd <834800634@qq.com>
Date: 星期四, 09 七月 2020 19:12:37 +0800
Subject: [PATCH] 部分模型修改

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

diff --git a/src/Bro.M071.Process/M071Models.cs b/src/Bro.M071.Process/M071Models.cs
index 43d9a18..434029f 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()
@@ -205,7 +220,7 @@
     {
         public string Barcode;
 
-        public List<MeasurementUint> Measurements = new List<MeasurementUint>();
+        public List<MeasurementUnit> Measurements = new List<MeasurementUnit>();
 
         public List<IShapeElement> ElementList = new List<IShapeElement>();
 
@@ -239,7 +254,7 @@
         }
     }
 
-    public class MeasurementUint : IComplexDisplay, INotifyPropertyChanged, IDisposable
+    public class MeasurementUnit : IComplexDisplay, INotifyPropertyChanged, IDisposable
     {
         public string Id = Guid.NewGuid().ToString();
 

--
Gitblit v1.8.0