* 等待提示框:更新等待时间短时无法关闭等待窗体的问题
This commit is contained in:
parent
befc6867b3
commit
921311153f
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -10,8 +10,8 @@ namespace Sunny.UI
|
|||||||
public static void ShowWaitForm(string desc = "系统正在处理中,请稍候...")
|
public static void ShowWaitForm(string desc = "系统正在处理中,请稍候...")
|
||||||
{
|
{
|
||||||
if (IsRun) return;
|
if (IsRun) return;
|
||||||
Instance.CreateForm(desc);
|
|
||||||
IsRun = true;
|
IsRun = true;
|
||||||
|
Instance.CreateForm(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void HideWaitForm()
|
public static void HideWaitForm()
|
||||||
@ -55,10 +55,13 @@ namespace Sunny.UI
|
|||||||
thread = new Thread(delegate ()
|
thread = new Thread(delegate ()
|
||||||
{
|
{
|
||||||
form = new UIWaitForm(desc);
|
form = new UIWaitForm(desc);
|
||||||
Application.Run(form);
|
if (IsRun) Application.Run(form);
|
||||||
});
|
});
|
||||||
|
|
||||||
thread.Start();
|
if (IsRun)
|
||||||
|
thread.Start();
|
||||||
|
else
|
||||||
|
CloseForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CloseForm()
|
private void CloseForm()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user