From 773369500892dcb5347e4a0059f8089960073030 Mon Sep 17 00:00:00 2001
From: xcd <834800634@qq.com>
Date: 星期三, 15 七月 2020 22:08:34 +0800
Subject: [PATCH] 板卡回原点配置迁移到初始配置轴配置中 板卡回原点配置区分运动方向和捕捉方向,限制捕捉原点方向

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

diff --git a/src/Bro.M071.Process/M071Models.cs b/src/Bro.M071.Process/M071Models.cs
index f2c588f..a56f47c 100644
--- a/src/Bro.M071.Process/M071Models.cs
+++ b/src/Bro.M071.Process/M071Models.cs
@@ -17,6 +17,28 @@
 
 namespace Bro.M071.Process
 {
+    public class KeyLocation : IComplexDisplay
+    {
+        [Category("閿悕閰嶇疆")]
+        [Description("鍗曢敭閿悕")]
+        [TypeConverter(typeof(KeyNameDictConverter))]
+        public string Key { get; set; }
+
+        [Category("浣嶇疆閰嶇疆")]
+        [Description("鍗曢敭鍦ㄩ敭鐩樺钩闈㈠浘涓婄殑浣嶇疆鏄剧ず")]
+        public Rectangle KeyRect { get; set; } = new Rectangle();
+
+        [Category("浣嶇疆閰嶇疆")]
+        [Description("鍗曢敭涔嬪悗闂撮殭浣嶇疆")]
+        public Rectangle IntervalRect { get; set; } = new Rectangle();
+
+        public string GetDisplayText()
+        {
+            return $"{Key}:{KeyRect.X},{KeyRect.Y},{KeyRect.Width},{KeyRect.Height}";
+        }
+    }
+
+
     public class KeyAlgorithem : IComplexDisplay
     {
         [Browsable(false)]
@@ -178,7 +200,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()
@@ -267,7 +304,7 @@
 
         #region 鏄剧ず
         [Browsable(false)]
-        public Rectangle DisplayLocation { get; set; } = new Rectangle();
+        public Rectangle DisplayLocation { get; set; } = new Rectangle(10, 10, 100, 100);
         #endregion
 
         #region 妫�娴嬬粨鏋�
@@ -377,6 +414,8 @@
                 if (valuePairs == null || valuePairs.Count == 0)
                 {
                     IsDone = false;
+                    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("IsDone"));
+                    return;
                 }
 
                 foreach (KeyValuePair<string, double> pair in valuePairs)

--
Gitblit v1.8.0