MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / OnLaunched

Method OnLaunched

proj.winrt/App.cpp:74–116  ·  view source on GitHub ↗

Invoked when the application is launched normally by the end user. Other entry points will be used such as when the application is launched to open a specific file. Details about the launch request and process.

Source from the content-addressed store, hash-verified

72/// </summary>
73/// <param name="e">Details about the launch request and process.</param>
74void App::OnLaunched(LaunchActivatedEventArgs const& e)
75{
76 Frame rootFrame{ nullptr };
77 auto content = Window::Current().Content();
78 if (content)
79 {
80 rootFrame = content.try_as<Frame>();
81 }
82
83 // Do not repeat app initialization when the Window already has content,
84 // just ensure that the window is active
85 if (rootFrame == nullptr)
86 {
87 // Create a Frame to act as the navigation context and associate it with
88 // a SuspensionManager key
89 rootFrame = Frame();
90
91 rootFrame.NavigationFailed({ this, &App::OnNavigationFailed });
92
93 if (e.PreviousExecutionState() == ApplicationExecutionState::Terminated)
94 {
95 // Restore the saved session state only when appropriate, scheduling the
96 // final launch steps after the restore is complete
97 }
98 }
99
100 if (e.PrelaunchActivated() == false)
101 {
102 if (rootFrame.Content() == nullptr)
103 {
104 // When the navigation stack isn't restored navigate to the first page,
105 // configuring the new page by passing required information as a navigation
106 // parameter
107 rootFrame.Content(winrt::make<OpenGLESPage>(&mOpenGLES));
108 //rootFrame.Navigate(xaml_typename<AxmolAppWinRT::OpenGLESPage>(), box_value(e.Arguments()));
109 mPage = rootFrame.Content();
110 }
111 // Place the frame in the current Window
112 Window::Current().Content(rootFrame);
113 // Ensure the current window is active
114 Window::Current().Activate();
115 }
116}
117
118/// <summary>
119/// Invoked when application execution is being suspended. Application state is saved

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected