From 578014f827b6871833cbfa6e781e05d1f9397995 Mon Sep 17 00:00:00 2001
From: wells.liu <wells.liu@broconcentric.com>
Date: 星期四, 02 七月 2020 14:57:07 +0800
Subject: [PATCH] 保存新配置
---
src/Bro.UI.Model.Winform/UI/Canvas.cs | 30 +++++++++++++++++-------------
1 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/src/Bro.UI.Model.Winform/UI/Canvas.cs b/src/Bro.UI.Model.Winform/UI/Canvas.cs
index feb020d..40f2b3c 100644
--- a/src/Bro.UI.Model.Winform/UI/Canvas.cs
+++ b/src/Bro.UI.Model.Winform/UI/Canvas.cs
@@ -77,22 +77,26 @@
set => stsStatus.Visible = value;
}
- private void OnMouseLocationUpdated(Point screenPoint, Point imagePoint)
+ private async void OnMouseLocationUpdated(Point screenPoint, Point imagePoint, string colorDesc)
{
- MouseLocationUpdated(screenPoint, imagePoint);
+ //await Task.Run(() => tsslLocation.Text = $"灞忓箷鍧愭爣X锛歿screenPoint.X}锛孻锛歿screenPoint.Y} 鍥剧墖鍧愭爣X锛歿imagePoint.X}锛孻锛歿imagePoint.Y} 棰滆壊锛歿colorDesc}");
+ this.Invoke(new Action(() =>
+ {
+ tsslLocation.Text = $"灞忓箷鍧愭爣X锛歿screenPoint.X}锛孻锛歿screenPoint.Y} 鍥剧墖鍧愭爣X锛歿imagePoint.X}锛孻锛歿imagePoint.Y} 棰滆壊锛歿colorDesc}";
+ }));
}
- private void MouseLocationUpdated(Point screenPoint, Point imagePoint)
- {
- if (InvokeRequired)
- {
- Invoke(new Action<Point, Point>(MouseLocationUpdated), screenPoint, imagePoint);
- }
- else
- {
- tsslLocation.Text = $"灞忓箷鍧愭爣X锛歿screenPoint.X}锛孻锛歿screenPoint.Y} 鍥剧墖鍧愭爣X锛歿imagePoint.X}锛孻锛歿imagePoint.Y}";
- }
- }
+ //private void MouseLocationUpdated(Point screenPoint, Point imagePoint, string colorDesc)
+ //{
+ // if (InvokeRequired)
+ // {
+ // Invoke(new Action<Point, Point, string>(MouseLocationUpdated), screenPoint, imagePoint);
+ // }
+ // else
+ // {
+ // tsslLocation.Text = $"灞忓箷鍧愭爣X锛歿screenPoint.X}锛孻锛歿screenPoint.Y} 鍥剧墖鍧愭爣X锛歿imagePoint.X}锛孻锛歿imagePoint.Y} 棰滆壊锛歿colorDesc}";
+ // }
+ //}
#endregion
#region 灞炴��
--
Gitblit v1.8.0