From 30458c0bca8066d98ca901b5065832a44a7e970e Mon Sep 17 00:00:00 2001
From: wells.liu <wells.liu@broconcentric.com>
Date: 星期四, 16 七月 2020 15:47:22 +0800
Subject: [PATCH] 测量结果 查询+导出功能

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

diff --git a/src/Bro.M071.Process/UI/M071_MainForm.cs b/src/Bro.M071.Process/UI/M071_MainForm.cs
index 6aa59b8..efadaed 100644
--- a/src/Bro.M071.Process/UI/M071_MainForm.cs
+++ b/src/Bro.M071.Process/UI/M071_MainForm.cs
@@ -136,6 +136,27 @@
             tscEditLocation.Visible = tsmiShowEditor.Checked;
             tscEditLocation.BringToFront();
         }
+
+        private void tsmiRefreshLabels_Click(object sender, EventArgs e)
+        {
+            cvImage.Elements.Clear();
+            lvMeasures.Items.Clear();
+
+            Config.MeasurementUnitCollection.ForEach(u =>
+            {
+                if (!u.IsEnabled)
+                    return;
+
+                var ele = new KeyIndicator(u.Id, u.DisplayLocation);
+                cvImage.Elements.Add(ele);
+
+                ListViewItem item = new ListViewItem(u.GetDisplayText());
+                item.Tag = u.Id;
+                lvMeasures.Items.Add(item);
+            });
+
+            this.Invalidate();
+        }
         #endregion
 
         #region 鏍囩缂栬緫鍖�
@@ -292,7 +313,7 @@
         {
             if (lblMachineState.IsHandleCreated)
             {
-                lblMachineState.BeginInvoke(new Action(() =>
+                lblMachineState.Invoke(new Action(() =>
                 {
                     switch (state)
                     {
@@ -453,5 +474,6 @@
             Process_M071.ResetTimer.Change(-1, -1);
         }
         #endregion
+
     }
 }

--
Gitblit v1.8.0