1
- // *****************************************************************************
1
+ // *****************************************************************************
2
2
//
3
3
// Copyright 2015 Microsoft Corporation
4
4
//
@@ -46,16 +46,16 @@ using namespace Windows::UI::Xaml::Navigation;
46
46
// / </summary>
47
47
App::App ()
48
48
{
49
- InitializeComponent ();
50
- Suspending += ref new SuspendingEventHandler (this , &App::OnSuspending);
49
+ InitializeComponent ();
50
+ Suspending += ref new SuspendingEventHandler (this , &App::OnSuspending);
51
51
52
- FFmpegInteropX::FFmpegInteropLogging::SetLogLevel (FFmpegInteropX::LogLevel::Info);
53
- FFmpegInteropX::FFmpegInteropLogging::SetLogProvider (this );
52
+ FFmpegInteropX::FFmpegInteropLogging::SetLogLevel (FFmpegInteropX::LogLevel::Info);
53
+ FFmpegInteropX::FFmpegInteropLogging::SetLogProvider (this );
54
54
}
55
55
56
56
void App::Log (FFmpegInteropX::LogLevel level, String^ message)
57
57
{
58
- OutputDebugString (message->Data ());
58
+ OutputDebugString (message->Data ());
59
59
}
60
60
61
61
// / <summary>
@@ -67,57 +67,57 @@ void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEvent
67
67
{
68
68
69
69
#if _DEBUG
70
- // Show graphics profiling information while debugging.
71
- if (IsDebuggerPresent ())
72
- {
73
- // Display the current frame rate counters
74
- DebugSettings->EnableFrameRateCounter = true ;
75
- }
70
+ // Show graphics profiling information while debugging.
71
+ if (IsDebuggerPresent ())
72
+ {
73
+ // Display the current frame rate counters
74
+ DebugSettings->EnableFrameRateCounter = true ;
75
+ }
76
76
#endif
77
77
78
- auto rootFrame = dynamic_cast <Frame^>(Window::Current->Content );
79
-
80
- // Do not repeat app initialization when the Window already has content,
81
- // just ensure that the window is active
82
- if (rootFrame == nullptr )
83
- {
84
- // Create a Frame to act as the navigation context and associate it with
85
- // a SuspensionManager key
86
- rootFrame = ref new Frame ();
87
-
88
- rootFrame->NavigationFailed += ref new Windows::UI::Xaml::Navigation::NavigationFailedEventHandler (this , &App::OnNavigationFailed);
89
-
90
- if (e->PreviousExecutionState == ApplicationExecutionState::Terminated)
91
- {
92
- // TODO: Restore the saved session state only when appropriate, scheduling the
93
- // final launch steps after the restore is complete
94
-
95
- }
96
-
97
- if (rootFrame->Content == nullptr )
98
- {
99
- // When the navigation stack isn't restored navigate to the first page,
100
- // configuring the new page by passing required information as a navigation
101
- // parameter
102
- rootFrame->Navigate (TypeName (MainPage::typeid ), e->Arguments );
103
- }
104
- // Place the frame in the current Window
105
- Window::Current->Content = rootFrame;
106
- // Ensure the current window is active
107
- Window::Current->Activate ();
108
- }
109
- else
110
- {
111
- if (rootFrame->Content == nullptr )
112
- {
113
- // When the navigation stack isn't restored navigate to the first page,
114
- // configuring the new page by passing required information as a navigation
115
- // parameter
116
- rootFrame->Navigate (TypeName (MainPage::typeid ), e->Arguments );
117
- }
118
- // Ensure the current window is active
119
- Window::Current->Activate ();
120
- }
78
+ auto rootFrame = dynamic_cast <Frame^>(Window::Current->Content );
79
+
80
+ // Do not repeat app initialization when the Window already has content,
81
+ // just ensure that the window is active
82
+ if (rootFrame == nullptr )
83
+ {
84
+ // Create a Frame to act as the navigation context and associate it with
85
+ // a SuspensionManager key
86
+ rootFrame = ref new Frame ();
87
+
88
+ rootFrame->NavigationFailed += ref new Windows::UI::Xaml::Navigation::NavigationFailedEventHandler (this , &App::OnNavigationFailed);
89
+
90
+ if (e->PreviousExecutionState == ApplicationExecutionState::Terminated)
91
+ {
92
+ // TODO: Restore the saved session state only when appropriate, scheduling the
93
+ // final launch steps after the restore is complete
94
+
95
+ }
96
+
97
+ if (rootFrame->Content == nullptr )
98
+ {
99
+ // When the navigation stack isn't restored navigate to the first page,
100
+ // configuring the new page by passing required information as a navigation
101
+ // parameter
102
+ rootFrame->Navigate (TypeName (MainPage::typeid ), e->Arguments );
103
+ }
104
+ // Place the frame in the current Window
105
+ Window::Current->Content = rootFrame;
106
+ // Ensure the current window is active
107
+ Window::Current->Activate ();
108
+ }
109
+ else
110
+ {
111
+ if (rootFrame->Content == nullptr )
112
+ {
113
+ // When the navigation stack isn't restored navigate to the first page,
114
+ // configuring the new page by passing required information as a navigation
115
+ // parameter
116
+ rootFrame->Navigate (TypeName (MainPage::typeid ), e->Arguments );
117
+ }
118
+ // Ensure the current window is active
119
+ Window::Current->Activate ();
120
+ }
121
121
}
122
122
123
123
// / <summary>
@@ -129,18 +129,18 @@ void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEvent
129
129
// / <param name="e">Details about the suspend request.</param>
130
130
void App::OnSuspending (Object^ sender, SuspendingEventArgs^ e)
131
131
{
132
- (void ) sender; // Unused parameter
133
- (void ) e; // Unused parameter
132
+ (void )sender; // Unused parameter
133
+ (void )e; // Unused parameter
134
134
135
- // TODO: Save application state and stop any background activity
135
+ // TODO: Save application state and stop any background activity
136
136
}
137
137
138
138
// / <summary>
139
139
// / Invoked when Navigation to a certain page fails
140
140
// / </summary>
141
141
// / <param name="sender">The Frame which failed navigation</param>
142
142
// / <param name="e">Details about the navigation failure</param>
143
- void App::OnNavigationFailed (Platform::Object ^ sender, Windows::UI::Xaml::Navigation::NavigationFailedEventArgs ^ e)
143
+ void App::OnNavigationFailed (Platform::Object^ sender, Windows::UI::Xaml::Navigation::NavigationFailedEventArgs^ e)
144
144
{
145
- throw ref new FailureException (" Failed to load Page " + e->SourcePageType .Name );
146
- }
145
+ throw ref new FailureException (" Failed to load Page " + e->SourcePageType .Name );
146
+ }
0 commit comments