private static void WindowDestroyed(WindowData wnd) { if (_activeWindows.Any(x => x.HWnd == wnd.HWnd)) { ApplicationStatus(_activeWindows.First(x => x.HWnd == wnd.HWnd), ApplicationEvents.Closed); _activeWindows.RemoveAll(x => x.HWnd == wnd.HWnd); } _lastEventWasLaunched = false; }