我已经关注了代码:
private void ShowOfflineIMs(bool hasOffline)
{
if (hasOffline)
{
_offlineDisplayerThread = new Thread(OpenOfflineWindow);
_offlineDisplayerThread.SetApartmentState(ApartmentState.STA);
_offlineDisplayerThread.Start();
}
}
private void OpenOfflineWindow()
{
var offlineWindow = new OfflineWindow();
offlineWindow.Closed += (sender, args) => Dispatcher.ExitAllFrames();
offlineWindow.Show();
Dispatcher.Run();
}
关闭表单对象后,将其状态保存在Window
内。如何在Window
关闭后处理它。
先谢谢。