improve:启动动画
This commit is contained in:
@@ -911,14 +911,22 @@ namespace Ink_Canvas
|
||||
mainWindow.Loaded += (s, args) =>
|
||||
{
|
||||
if (_isSplashScreenShown)
|
||||
{
|
||||
SetSplashMessage("正在完成初始化...");
|
||||
SetSplashProgress(90);
|
||||
Task.Delay(300).ContinueWith(_ =>
|
||||
{
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
SetSplashMessage("启动完成!");
|
||||
SetSplashProgress(100);
|
||||
// 延迟关闭启动画面,让用户看到完成消息
|
||||
Task.Delay(500).ContinueWith(_ =>
|
||||
Task.Delay(500).ContinueWith(__ =>
|
||||
{
|
||||
Dispatcher.Invoke(() => CloseSplashScreen());
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user