/// <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(); await SuspensionManager.SaveAsync(); deferral.Complete(); }
/// <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 void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Save application state and stop any background activity deferral.Complete(); }
/// <summary> /// アプリケーションの実行が中断されたときに呼び出されます。 /// アプリケーションが終了されるか、メモリの内容がそのままで再開されるかに /// かかわらず、アプリケーションの状態が保存されます。 /// </summary> /// <param name="sender">中断要求の送信元。</param> /// <param name="e">中断要求の詳細。</param> private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: アプリケーションの状態を保存してバックグラウンドの動作があれば停止します deferral.Complete(); }
private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Salvar o estado do aplicativo e parar qualquer atividade em segundo plano deferral.Complete(); }
/// <summary> /// 在将要挂起应用程序执行时调用。在不知道应用程序 /// 将被终止还是恢复的情况下保存应用程序状态, /// 并让内存内容保持不变。 /// </summary> /// <param name="sender">挂起的请求的源。</param> /// <param name="e">有关挂起的请求的详细信息。</param> private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: 保存应用程序状态并停止任何后台活动 deferral.Complete(); }
/// <summary> /// Appelé lorsque l'exécution de l'application est suspendue. L'état de l'application est enregistré /// sans savoir si l'application pourra se fermer ou reprendre sans endommager /// le contenu de la mémoire. /// </summary> /// <param name="sender">Source de la requête de suspension.</param> /// <param name="e">Détails de la requête de suspension.</param> private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: enregistrez l'état de l'application et arrêtez toute activité en arrière-plan deferral.Complete(); }
/// <summary> /// Se invoca al suspender la ejecución de la aplicación. El estado de la aplicación se guarda /// sin saber si la aplicación se terminará o se reanudará con el contenido /// de la memoria aún intacto. /// </summary> /// <param name="sender">Origen de la solicitud de suspensión.</param> /// <param name="e">Detalles sobre la solicitud de suspensión.</param> private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Guardar el estado de la aplicación y detener toda actividad en segundo plano deferral.Complete(); }
/// <summary> /// Wird aufgerufen, wenn die Ausführung der Anwendung angehalten wird. Der Anwendungszustand wird gespeichert, /// ohne zu wissen, ob die Anwendung beendet oder fortgesetzt wird und die Speicherinhalte dabei /// unbeschädigt bleiben. /// </summary> /// <param name="sender">Die Quelle der Anhalteanforderung.</param> /// <param name="e">Details zur Anhalteanforderung.</param> private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Anwendungszustand speichern und alle Hintergrundaktivitäten beenden deferral.Complete(); }
private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Сохранить состояние приложения и остановить все фоновые операции deferral.Complete(); }
public async void OnSuspending(object sender, SuspendingEventArgs e) { SuspendingDeferral deferral = e.SuspendingOperation.GetDeferral(); await CleanupAsync(); deferral.Complete(); }
private void OnSuspending(object sender, SuspendingEventArgs e) { SuspendingDeferral deferral = e.SuspendingOperation.GetDeferral(); IsForeground = false; NotificationSystem.RefreshCallNotification(CallSystem.CallManager.CurrentCalls); deferral.Complete(); }
async void OnAppSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); await CleanUpCaptureResourcesAsync(); deferral.Complete(); }
/// <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 void App_Suspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); // Optional: Save application state and stop any background activity LogMessage("Suspending"); deferral.Complete(); }
/// <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 void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Save application state and stop any background activity //Idea: Serialise and save the spear location in roaming so you can throw on a computer and walk with your tablet/phone deferral.Complete(); }
/// <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 void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Save application state and stop any background activity Backend.NUTInitialization.debugLog.Trace("[CORE] Application is entering a suspended state"); deferral.Complete(); }
/// <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 void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); SaveApplicationState(); deferral.Complete(); }
/// <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 void OnSuspending(object sender, SuspendingEventArgs e) { Resolver.Resolve <XFormsAppWin>().RaiseClosing(); var deferral = e.SuspendingOperation.GetDeferral(); // TODO: Save application state and stop any background activity deferral.Complete(); }
/// <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 void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); new SettingsManager(new WindowsCommonSettings()).SessionTimestamp = DateTime.Now.AddMinutes(-15).ToString(CultureInfo.CurrentCulture); deferral.Complete(); }
/// <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) { //SettingsPane.GetForCurrentView().CommandsRequested -= App_CommandsRequested; var deferral = e.SuspendingOperation.GetDeferral(); await SuspensionManager.SaveAsync(); deferral.Complete(); }
/// <summary> /// Вызывается при приостановке выполнения приложения. Состояние приложения сохраняется /// без учета информации о том, будет ли оно завершено или возобновлено с неизменным /// содержимым памяти. /// </summary> /// <param name="sender">Источник запроса приостановки.</param> /// <param name="e">Сведения о запросе приостановки.</param> private async void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Сохранить состояние приложения и остановить все фоновые операции await SuspensionManager.SaveAsync(); deferral.Complete(); }
/// <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(); await SettingsManager.SerializeObject(VkSettings, "settings"); deferral.Complete(); }
internal void OnSuspending() { var suspendingEventArgs = new SuspendingEventArgs(new SuspendingOperation(DateTime.Now.AddSeconds(30))); CoreApplication.RaiseSuspending(suspendingEventArgs); OnSuspendingPartial(); }
/// <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 void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Save application state and stop any background activity DxgiDeviceManager dxgiDeviceManager = new DxgiDeviceManager(); dxgiDeviceManager.Trim(); deferral.Complete(); }
/// <summary> /// 응용 프로그램 실행이 일시 중단된 경우 호출됩니다. 응용 프로그램이 종료될지 /// 또는 메모리 콘텐츠를 변경하지 않고 다시 시작할지 여부를 결정하지 않은 채 /// 응용 프로그램 상태가 저장됩니다. /// </summary> /// <param name="sender">일시 중단 요청의 소스입니다.</param> /// <param name="e">일시 중단 요청에 대한 세부 정보입니다.</param> private void OnSuspending(object sender, SuspendingEventArgs e) { StateManager.SaveState(); var deferral = e.SuspendingOperation.GetDeferral(); deferral.Complete(); }
/// <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(); //TODO: Save application state and stop any background activity await HelloWorld.Common.SuspensionManager.SaveAsync(); deferral.Complete(); }
/// <summary> /// Check for unsaved changes if the app shuts down. /// </summary> private void App_Suspending(object sender, SuspendingEventArgs e) { if (ViewModel.HasChanges) { // Save a temporary copy of the modified order so that the user has a chance to save it // the next time the app is launched. } }
private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); // TODO : save app state and stop all background tasks deferral.Complete(); }
/// <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(); await _windowStatusService.Save(); deferral.Complete(); }
/// <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 void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); Console.WriteLine($"OnSuspending (Deadline:{e.SuspendingOperation.Deadline})"); deferral.Complete(); }
/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name="e">Details about the launch request and process.</param> /// <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 void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); _connection.CloseConnection(); deferral.Complete(); }
private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); deferral.Complete(); }
private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Save application state and stop any background activity deferral.Complete(); }
protected virtual async void OnSuspending( SuspendingEventArgs args ) { Arg.NotNull( args, nameof( args ) ); ISessionStateManager sessionStateManager; if ( !IsInitialized || !Host.TryGetService( out sessionStateManager ) ) return; var deferral = args.SuspendingOperation.GetDeferral(); sessionStateManager.TrySaveNavigationState(); await sessionStateManager.SaveAsync(); deferral.Complete(); }