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 | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/src/Bro.M071.Process/UI/M071_MainForm.cs b/src/Bro.M071.Process/UI/M071_MainForm.cs index 8623ac8..582a85a 100644 --- a/src/Bro.M071.Process/UI/M071_MainForm.cs +++ b/src/Bro.M071.Process/UI/M071_MainForm.cs @@ -70,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; @@ -150,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 涓婃柟鐘舵�佸尯 @@ -169,6 +183,11 @@ txtBarcode.Text = _barcode; _barcode = ""; } + + if (e.KeyValue == 27) + { + cvImage.Elements.ToList().ForEach(ele => ele.State = ElementState.Normal); + } } private void txtBarcode_TextChanged(object sender, EventArgs e) -- Gitblit v1.8.0