1

我有以下代码:

    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关闭后如何处理。

提前致谢。

4

0 回答 0