Exemplo n.º 1
0
        /// <summary>
        /// Invoked when application execution is being suspended.  Application state is saved
        /// without knowing whether the application will be terminated or resumed with the contents
        /// of memory still intact.
        /// </summary>
        /// <param name="sender">The source of the suspend request.</param>
        /// <param name="e">Details about the suspend request.</param>
        private async void OnSuspending(object sender, SuspendingEventArgs e)
        {
            MetroEventSource.Log.Info("App Suspending");
            var deferral = e.SuspendingOperation.GetDeferral();

            //TODO: Save application state and stop any background activity
            TileNotifications tnu = new TileNotifications();
            await tnu.UpdateTileNotifications();

            deferral.Complete();
        }
Exemplo n.º 2
0
        private void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            if (pageLoaded == false)
            {
                pageLoaded = true;
                LoadMainPage();
            }

            TileNotifications tnu = new TileNotifications();

            tnu.UpdateTileNotifications();
        }