* 等待提示框:更新等待时间短时无法关闭等待窗体的问题

This commit is contained in:
Sunny 2021-04-24 21:30:13 +08:00
parent befc6867b3
commit 921311153f
4 changed files with 6 additions and 3 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -10,8 +10,8 @@ namespace Sunny.UI
public static void ShowWaitForm(string desc = "系统正在处理中,请稍候...")
{
if (IsRun) return;
Instance.CreateForm(desc);
IsRun = true;
Instance.CreateForm(desc);
}
public static void HideWaitForm()
@ -55,10 +55,13 @@ namespace Sunny.UI
thread = new Thread(delegate ()
{
form = new UIWaitForm(desc);
Application.Run(form);
if (IsRun) Application.Run(form);
});
if (IsRun)
thread.Start();
else
CloseForm();
}
private void CloseForm()