improve:启动动画

This commit is contained in:
2025-10-02 19:20:03 +08:00
parent c80af8c984
commit 6f069b73da
+9 -1
View File
@@ -911,14 +911,22 @@ namespace Ink_Canvas
mainWindow.Loaded += (s, args) => mainWindow.Loaded += (s, args) =>
{ {
if (_isSplashScreenShown) if (_isSplashScreenShown)
{
SetSplashMessage("正在完成初始化...");
SetSplashProgress(90);
Task.Delay(300).ContinueWith(_ =>
{
Dispatcher.Invoke(() =>
{ {
SetSplashMessage("启动完成!"); SetSplashMessage("启动完成!");
SetSplashProgress(100); SetSplashProgress(100);
// 延迟关闭启动画面,让用户看到完成消息 // 延迟关闭启动画面,让用户看到完成消息
Task.Delay(500).ContinueWith(_ => Task.Delay(500).ContinueWith(__ =>
{ {
Dispatcher.Invoke(() => CloseSplashScreen()); Dispatcher.Invoke(() => CloseSplashScreen());
}); });
});
});
} }
}; };