fix: 收敛旧控件资源与后台线程生命周期
This commit is contained in:
@@ -73,10 +73,23 @@ namespace Lskj.Control.Model
|
||||
/// </summary>
|
||||
public static void HideForm()
|
||||
{
|
||||
bool isSplashFormVisible = LoadForm.IsSplashFormVisible;
|
||||
if (isSplashFormVisible)
|
||||
SplashScreenManager manager = _loadForm;
|
||||
if (manager == null)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
_loadForm.CloseWaitForm();
|
||||
if (manager.IsSplashFormVisible)
|
||||
{
|
||||
manager.CloseWaitForm();
|
||||
manager.WaitForSplashFormClose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
manager.Dispose();
|
||||
if (ReferenceEquals(_loadForm, manager))
|
||||
_loadForm = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user