From 56d73b9710766e7acab2e084a6af322175c78f1b Mon Sep 17 00:00:00 2001
From: xcd <834800634@qq.com>
Date: 星期六, 11 七月 2020 11:20:38 +0800
Subject: [PATCH] 添加急停按钮相关处理

---
 src/Bro.M071.Process/UI/KeyIndicator.cs |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/Bro.M071.Process/UI/KeyIndicator.cs b/src/Bro.M071.Process/UI/KeyIndicator.cs
index 75271a0..8d43b6b 100644
--- a/src/Bro.M071.Process/UI/KeyIndicator.cs
+++ b/src/Bro.M071.Process/UI/KeyIndicator.cs
@@ -58,7 +58,7 @@
 
         protected override void SetSelectedPen()
         {
-            Pen = new Pen(Color.Red, 6);
+            Pen = new Pen(Color.Red, 3);
         }
 
         public override void Draw(Graphics g)
@@ -139,17 +139,18 @@
 
         public override bool IsMouseCanStretchBottom(Point p)
         {
-            return Math.Abs(p.X - (DisplayRect.X + DisplayRect.Width / 2)) < 10 && Math.Abs(p.Y - DisplayRect.Y - DisplayRect.Height) < 10;
+
+            return Math.Abs(p.X - (DisplayRect.X + DisplayRect.Width / 2)) < (DisplayRect.Width / 3) && Math.Abs(p.Y - DisplayRect.Y - DisplayRect.Height) < (DisplayRect.Height / 3);
         }
 
         public override bool IsMouseCanStretchRight(Point p)
         {
-            return Math.Abs(p.X - (DisplayRect.X + DisplayRect.Width)) < 10 && Math.Abs(p.Y - (DisplayRect.Y + DisplayRect.Height / 2)) < 10;
+            return Math.Abs(p.X - (DisplayRect.X + DisplayRect.Width)) < (DisplayRect.Width / 3) && Math.Abs(p.Y - (DisplayRect.Y + DisplayRect.Height / 2)) < (DisplayRect.Height / 3);
         }
 
         public override bool IsMouseCanStretchRightLowerCorner(Point p)
         {
-            return Math.Abs(p.X - (DisplayRect.X + DisplayRect.Width)) < 10 && Math.Abs(p.Y - (DisplayRect.Y + DisplayRect.Height)) < 10;
+            return Math.Abs(p.X - (DisplayRect.X + DisplayRect.Width)) < (DisplayRect.Width / 3) && Math.Abs(p.Y - (DisplayRect.Y + DisplayRect.Height)) < (DisplayRect.Height / 3);
         }
 
         int x, y = 0;

--
Gitblit v1.8.0