Exemplo n.º 1
0
        private void App_EnteredBackground(object sender, EnteredBackgroundEventArgs e)
        {
            var deferral = e.GetDeferral();

            CoreWindowLogic.Stringify();
            deferral.Complete();
        }
Exemplo n.º 2
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)
        {
            var deferral = e.SuspendingOperation.GetDeferral();

            CoreWindowLogic.Stringify();
            CoreWindowLogic.DisposeObjects();
            deferral.Complete();
        }
Exemplo n.º 3
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)
        {
            var deferral = e.SuspendingOperation.GetDeferral();

            CoreWindowLogic.Stringify();
            await Task.Delay(500);

            deferral.Complete();
        }
Exemplo n.º 4
0
        private async void App_EnteredBackground(object sender, EnteredBackgroundEventArgs e)
        {
            var deferral = e.GetDeferral();

            CoreWindowLogic.Stringify();
            CoreWindowLogic.UpdateSmtc();
            CoreWindowLogic.EnableDisableSmtc();
            await Task.Delay(200);

            CoreWindowLogic.isBackground = true;
            deferral.Complete();
        }