improve:计时器UI

This commit is contained in:
2025-10-18 16:15:19 +08:00
parent 0259d83429
commit ba5db63e0b
7 changed files with 232 additions and 40 deletions
@@ -136,6 +136,8 @@ namespace Ink_Canvas
// 更新秒显示
SetDigitDisplay("FullSecond1Display", seconds / 10, shouldShowRed);
SetDigitDisplay("FullSecond2Display", seconds % 10, shouldShowRed);
SetColonDisplay(shouldShowRed);
}
}
@@ -171,6 +173,40 @@ namespace Ink_Canvas
}
}
/// <summary>
/// 设置全屏窗口冒号显示颜色
/// </summary>
/// <param name="isRed">是否显示为红色</param>
private void SetColonDisplay(bool isRed = false)
{
var colon1 = this.FindName("FullColon1Display") as TextBlock;
var colon2 = this.FindName("FullColon2Display") as TextBlock;
if (colon1 != null)
{
if (isRed)
{
colon1.Foreground = Brushes.Red;
}
else
{
colon1.Foreground = Brushes.White;
}
}
if (colon2 != null)
{
if (isRed)
{
colon2.Foreground = Brushes.Red;
}
else
{
colon2.Foreground = Brushes.White;
}
}
}
private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
// 点击屏幕退出全屏