From 4efd6abb5697974ba11769a2fd5112991382c75e Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Fri, 25 Jul 2025 17:57:04 +0800 Subject: [PATCH] =?UTF-8?q?improve:=E4=BB=BB=E5=8A=A1=E6=A0=8F=E9=AB=98?= =?UTF-8?q?=E5=BA=A6=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Helpers/ForegroundWindowInfo.cs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/Ink Canvas/Helpers/ForegroundWindowInfo.cs b/Ink Canvas/Helpers/ForegroundWindowInfo.cs index cd6d3c17..7968fc49 100644 --- a/Ink Canvas/Helpers/ForegroundWindowInfo.cs +++ b/Ink Canvas/Helpers/ForegroundWindowInfo.cs @@ -2,8 +2,6 @@ using System.Diagnostics; using System.Runtime.InteropServices; using System.Text; -using System.Windows.Forms; -using System.Drawing; namespace Ink_Canvas.Helpers { @@ -95,23 +93,5 @@ namespace Ink_Canvas.Helpers return "Unknown"; } } - - public static int GetTaskbarHeight(Screen screen, double dpiScaleY) - { - // 优先用工作区和屏幕区的差值法,兼容多屏 - int height = 0; - if (screen.Bounds.Height > screen.WorkingArea.Height) - { - // 任务栏在上下 - height = screen.Bounds.Height - screen.WorkingArea.Height; - } - else if (screen.Bounds.Width > screen.WorkingArea.Width) - { - // 任务栏在左右 - height = screen.Bounds.Width - screen.WorkingArea.Width; - } - // 考虑DPI缩放 - return (int)(height / dpiScaleY); - } } } \ No newline at end of file