private async void OnStartup(object sender, StartupEventArgs e)
        {
//{[{
            AddConfiguration(e.Args);
            _host = SimpleIoc.Default.GetInstance <IApplicationHostService>();
            await _host.StartAsync();

//}]}
        }
Beispiel #2
0
        private async void OnStartup(object sender, StartupEventArgs e)
        {
            // Read more about sending local toast notifications from desktop C# apps
            // https://docs.microsoft.com/windows/uwp/design/shell/tiles-and-notifications/send-local-toast-desktop
            //
            // Register AUMID, COM server, and activator
            DesktopNotificationManagerCompat.RegisterAumidAndComServer <ToastNotificationActivator>("LightApp");
            DesktopNotificationManagerCompat.RegisterActivator <ToastNotificationActivator>();

            AddConfiguration(e.Args);
            _host = SimpleIoc.Default.GetInstance <IApplicationHostService>();
            if (e.Args.Contains(DesktopNotificationManagerCompat.ToastActivatedLaunchArg))
            {
                // ToastNotificationActivator code will run after this completes and will show a window if necessary.
                return;
            }

            await _host.StartAsync();
        }
Beispiel #3
0
 public async Task StartAsync()
 => await _host.StartAsync();