From ca718bf67886ef08cfd22599d22d458b610c02aa Mon Sep 17 00:00:00 2001 From: xcd <834800634@qq.com> Date: 星期五, 10 七月 2020 18:34:43 +0800 Subject: [PATCH] 板卡添加轴状态和轴报警信息输出 --- src/Bro.M071.Process/UI/KeyIndicator.cs | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Bro.M071.Process/UI/KeyIndicator.cs b/src/Bro.M071.Process/UI/KeyIndicator.cs index ec6d69b..8d43b6b 100644 --- a/src/Bro.M071.Process/UI/KeyIndicator.cs +++ b/src/Bro.M071.Process/UI/KeyIndicator.cs @@ -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