From 81480d62561dcb75a1fc968814ace1368fe5181b Mon Sep 17 00:00:00 2001
From: wells.liu <wells.liu@broconcentric.com>
Date: 星期四, 16 七月 2020 11:57:08 +0800
Subject: [PATCH] Merge branch 'master' of http://gitblit.broconcentric.com:8088/r/M071

---
 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