add:仿希沃计时器
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user