File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Samples/Notifications/App
CppUnpackagedAppNotifications/CppUnpackagedAppNotifications
CsUnpackagedAppNotifications/CsUnpackagedAppNotifications Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ namespace winrt::CppUnpackagedAppNotifications::implementation
30
30
31
31
App::App ()
32
32
{
33
+ g_notificationManager.Init ();
34
+
33
35
InitializeComponent ();
34
36
app = this ;
35
37
@@ -74,8 +76,6 @@ namespace winrt::CppUnpackagedAppNotifications::implementation
74
76
{
75
77
window = make<MainWindow>();
76
78
77
- g_notificationManager.Init ();
78
-
79
79
// NOTE: AppInstance is ambiguous between
80
80
// Microsoft.Windows.AppLifecycle.AppInstance and
81
81
// Windows.ApplicationModel.AppInstance
Original file line number Diff line number Diff line change @@ -19,10 +19,11 @@ public partial class App : Application
19
19
20
20
public App ( )
21
21
{
22
+ notificationManager = new NotificationManager ( ) ;
23
+ notificationManager . Init ( ) ;
24
+
22
25
this . InitializeComponent ( ) ;
23
26
AppDomain . CurrentDomain . ProcessExit += new EventHandler ( OnProcessExit ) ;
24
-
25
- notificationManager = new NotificationManager ( ) ;
26
27
}
27
28
28
29
public static void ToForeground ( )
@@ -50,8 +51,6 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
50
51
{
51
52
mainWindow = new MainWindow ( ) ;
52
53
53
- notificationManager . Init ( ) ;
54
-
55
54
// NOTE: AppInstance is ambiguous between
56
55
// Microsoft.Windows.AppLifecycle.AppInstance and
57
56
// Windows.ApplicationModel.AppInstance
You can’t perform that action at this time.
0 commit comments