More events, remove most of the statics, better shutdown

This commit is contained in:
Paul Rouget 2019-07-24 15:14:24 +02:00
parent 7adf022dfa
commit d0436f16b6
8 changed files with 342 additions and 217 deletions

View file

@ -63,7 +63,12 @@ void App::OnLaunched(LaunchActivatedEventArgs const &e) {
}
void App::OnSuspending([[maybe_unused]] IInspectable const &sender,
[[maybe_unused]] SuspendingEventArgs const &e) {}
[[maybe_unused]] SuspendingEventArgs const &e) {
auto content = Window::Current().Content();
Frame rootFrame = content.try_as<Frame>();
auto page = rootFrame.Content().try_as<BrowserPage>();
page->Shutdown();
}
void App::OnNavigationFailed(IInspectable const &,
NavigationFailedEventArgs const &e) {