fix:负数导致的计时器崩溃

This commit is contained in:
CJK_mkp
2025-11-08 19:15:16 +08:00
parent ed58873a82
commit 58b0a0a3be
3 changed files with 6 additions and 8 deletions
@@ -125,9 +125,8 @@ namespace Ink_Canvas
seconds = timeSpan.Seconds;
}
// 更新小时显示
SetDigitDisplay("FullHour1Display", hours / 10, shouldShowRed);
SetDigitDisplay("FullHour2Display", hours % 10, shouldShowRed);
SetDigitDisplay("FullHour1Display", Math.Abs(hours / 10) % 10, shouldShowRed);
SetDigitDisplay("FullHour2Display", (hours % 10 + 10) % 10, shouldShowRed);
// 更新分钟显示
SetDigitDisplay("FullMinute1Display", minutes / 10, shouldShowRed);