From 00ea1cd461d6d8d128d727f6a40edca75da9ccdd Mon Sep 17 00:00:00 2001
From: xcd <834800634@qq.com>
Date: 星期三, 08 七月 2020 16:38:46 +0800
Subject: [PATCH] 相机运行界面基类添加操作配置 gocator驱动修正长宽比例,输出进行复制插值处理 显示基元添加8个方向的拉伸和移动处理 标签基元实现3个方向的拉伸和移动

---
 src/Bro.M071.Process/UI/M071_MainForm.cs |   28 ++++++++++++++++++++++++----
 1 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/src/Bro.M071.Process/UI/M071_MainForm.cs b/src/Bro.M071.Process/UI/M071_MainForm.cs
index 63f429e..582a85a 100644
--- a/src/Bro.M071.Process/UI/M071_MainForm.cs
+++ b/src/Bro.M071.Process/UI/M071_MainForm.cs
@@ -1,4 +1,5 @@
-锘縰sing Bro.Common.Helper;
+锘縰sing Bro.Common.Base;
+using Bro.Common.Helper;
 using Bro.UI.Model.Winform;
 using System;
 using System.Collections.Generic;
@@ -69,7 +70,8 @@
                 lvMeasures.Items.Add(item);
             });
 
-            txtBarcode.ReadOnly = Config.IsBarcodeManulInputBlocked;
+            if (txtBarcode.IsHandleCreated)
+                txtBarcode.BeginInvoke(new Action(() => txtBarcode.ReadOnly = Config.IsBarcodeManulInputBlocked));
 
             Process_M071.OnClearBarcode -= M071_MainForm_OnClearBarcode;
             Process_M071.OnClearBarcode += M071_MainForm_OnClearBarcode;
@@ -149,6 +151,19 @@
 
             MessageBox.Show("鏍囩淇敼瀹屾垚");
         }
+
+        private void lvMeasures_DoubleClick(object sender, EventArgs e)
+        {
+            if (lvMeasures.SelectedItems.Count <= 0)
+                return;
+
+            var ele = cvImage.Elements.FirstOrDefault(u => u.ID == lvMeasures.SelectedItems[0].Tag.ToString());
+            if (ele != null)
+            {
+                ele.State = ElementState.Selected;
+                cvImage.Invalidate();
+            }
+        }
         #endregion
 
         #region 涓婃柟鐘舵�佸尯
@@ -167,6 +182,11 @@
             {
                 txtBarcode.Text = _barcode;
                 _barcode = "";
+            }
+
+            if (e.KeyValue == 27)
+            {
+                cvImage.Elements.ToList().ForEach(ele => ele.State = ElementState.Normal);
             }
         }
 
@@ -307,12 +327,12 @@
             }
             else if (btnStartMeasure.Text == "缁х画娴嬮噺")
             {
-                Process_M071.ResumeJob(null, null, null);
+                Process_M071.SwitchJobStatus(new OperationConfigBase() { InputPara = new List<int>() { 0 } }, null, null);
                 btnStartMeasure.Text = "鏆傚仠娴嬮噺";
             }
             else
             {
-                Process_M071.PauseJob(null, null, null);
+                Process_M071.SwitchJobStatus(new OperationConfigBase() { InputPara = new List<int>() { 1 } }, null, null);
                 btnStartMeasure.Text = "缁х画娴嬮噺";
             }
 

--
Gitblit v1.8.0