From 4cb676856f0c791ffcbef569c0ca8195bf8b0938 Mon Sep 17 00:00:00 2001
From: wells.liu <wells.liu@broconcentric.com>
Date: 星期六, 04 七月 2020 18:05:47 +0800
Subject: [PATCH] 数据库操作

---
 src/Bro.UI.Model.Winform/UI/CanvasImage.cs |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/Bro.UI.Model.Winform/UI/CanvasImage.cs b/src/Bro.UI.Model.Winform/UI/CanvasImage.cs
index e31ebeb..55af243 100644
--- a/src/Bro.UI.Model.Winform/UI/CanvasImage.cs
+++ b/src/Bro.UI.Model.Winform/UI/CanvasImage.cs
@@ -35,7 +35,7 @@
         #region Event
         public Action<MouseState> OnMouseStateChanged;
         public Action<IShapeElement> DrawTemplateChanged = null;
-        public Action<Point, Point> OnMouseLocationUpdated;
+        public Action<Point, Point, string> OnMouseLocationUpdated;
         #endregion
 
         private MouseState mouseState = MouseState.Normal;
@@ -540,7 +540,13 @@
             //}
 
             //DisplayMouseLocation(e.Location);
-            OnMouseLocationUpdated?.BeginInvoke(e.Location, ToMapPoint(e.Location), null, null);
+            Point mapPoint = ToMapPoint(e.Location);
+            Color color = Color.Transparent;
+            if (MAP != null && mapPoint.X > 0 && mapPoint.X < MAP.Width && mapPoint.Y > 0 && mapPoint.Y < MAP.Height)
+            {
+                color = MAP.GetPixel(mapPoint.X, mapPoint.Y);
+            }
+            OnMouseLocationUpdated?.BeginInvoke(e.Location, mapPoint, color.Name, null, null);
 
             if (MouseState != MouseState.SelectionZoneDoing)
             {

--
Gitblit v1.8.0