From 7d6dd6f8050035fcfecd9f946dfa030e1bb8f6f3 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Sat, 4 Oct 2025 17:00:15 +0800 Subject: [PATCH] =?UTF-8?q?add:=E4=BB=BF=E5=B8=8C=E6=B2=83=E8=AE=A1?= =?UTF-8?q?=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MainWindow_cs/MW_FloatingBarIcons.cs | 13 +++++++- .../Windows/SeewoStyleTimerWindow.xaml.cs | 30 ++++++++++++++++++ ...vasForClass.csproj.AssemblyReference.cache | Bin 38044 -> 38181 bytes 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs index 334dae06..b24e1e92 100644 --- a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs +++ b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs @@ -1041,7 +1041,18 @@ namespace Ink_Canvas AnimationsHelper.HideWithSlideAndFade(BoardBorderTools); AnimationsHelper.HideWithSlideAndFade(BoardImageOptionsPanel); - CountdownTimerWindow.CreateTimerWindow().Show(); + // 参考老计时器的窗口置顶功能:在白板模式下停止窗口置顶 + if (currentMode == 1) // 白板模式 + { + Topmost = false; + } + + var timerWindow = CountdownTimerWindow.CreateTimerWindow(); + timerWindow.Show(); + if (currentMode == 1) // 白板模式 + { + timerWindow.Topmost = true; + } } private void OperatingGuideWindowIcon_MouseUp(object sender, MouseButtonEventArgs e) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index a5e90a55..f8bac5cf 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -309,6 +309,36 @@ namespace Ink_Canvas private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { isTimerRunning = false; + + if (MainWindow.Settings != null) + { + var mainWindow = Application.Current.MainWindow as MainWindow; + if (mainWindow != null) + { + try + { + var currentModeField = mainWindow.GetType().GetField("currentMode", + System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); + if (currentModeField != null) + { + int currentMode = (int)currentModeField.GetValue(mainWindow); + if (currentMode == 1) // 白板模式 + { + mainWindow.Topmost = false; // 保持白板模式下的非置顶状态 + } + else + { + mainWindow.Topmost = true; // 其他模式恢复置顶 + } + } + } + catch + { + // 如果反射失败,使用默认行为 + mainWindow.Topmost = true; + } + } + } } private void BtnClose_MouseUp(object sender, MouseButtonEventArgs e) diff --git a/Ink Canvas/obj/Debug/net472/InkCanvasForClass.csproj.AssemblyReference.cache b/Ink Canvas/obj/Debug/net472/InkCanvasForClass.csproj.AssemblyReference.cache index c8c2dfbd497b829755ee6211820ad2e2d43c9d13..57d842b8b7d92d5308ee26301638a87ff9085d80 100644 GIT binary patch delta 70 zcmbQUl4B~nPN5rP?War*kO`k`FUd8TkDE=&SuZ6ghmjGefZ>7T XjqeIqIY4T;%1rbO^o$LR4J{b}mk1Gb delta 23 fcmZ3wifPVDCJr`6Lk0#0#>B~nPN5rP?WX_$OSlGi