public override void OnResuming(object s, object e, AppExecutionState previousExecutionState) { if (previousExecutionState == AppExecutionState.Prelaunch) { // TODO } }
public override void OnResuming(object s, object e, AppExecutionState previousExecutionState) { if (SettingsService.Instance.IsBatterySaverEnabled) { _proximityHelper.EnableDisplayAutoOff(true); } }
public override void OnResuming(object s, object e, AppExecutionState previousExecutionState) { base.OnResuming(s, e, previousExecutionState); if (CanBackground) { var servers = IrcUiHandler.Instance.connectedServers.Values; foreach (var server in servers) { if (server is IrcSocket) { // server.SocketReturn(); } } } if (SessionRevoked) { CoreApplication.MainView.CoreWindow.Dispatcher.TryRunAsync(CoreDispatcherPriority.Normal, () => { MainPage.instance.ShowTeachingTip(); }); SessionRevoked = false; } }
public override void OnResuming(object s, object e, AppExecutionState previousExecutionState) { if (previousExecutionState == AppExecutionState.Prelaunch) { // TODO (complete ui) } }
public override async void OnResuming(object s, object e, AppExecutionState previousExecutionState) { // Resumes the camera streaming. await ViewModelLocator.ResumeAsync(); base.OnResuming(s, e, previousExecutionState); }
public override async void OnResuming(object s, object e, AppExecutionState previousExecutionState) { Logs.Log.Write("OnResuming"); //#if DEBUG //await VoIPConnection.Current.ConnectAsync(); //#endif base.OnResuming(s, e, previousExecutionState); }
public override void OnResuming(object s, object e, AppExecutionState previousExecutionState) { Logs.Logger.Info(Logs.Target.Lifecycle, "OnResuming"); // #1225: Will this work? No one knows. foreach (var network in TLContainer.Current.ResolveAll <INetworkService>()) { network.Reconnect(); } base.OnResuming(s, e, previousExecutionState); }
public override async void OnResuming(object s, object e, AppExecutionState previousExecutionState) { var updatesService = UnigramContainer.Current.ResolveType <IUpdatesService>(); updatesService.LoadStateAndUpdate(() => { }); //#if DEBUG await VoIPConnection.Current.ConnectAsync(); //#endif base.OnResuming(s, e, previousExecutionState); }
public override async void OnResuming(object s, object e, AppExecutionState previousExecutionState) { base.OnResuming(s, e, previousExecutionState); // On Restore, if we have a frame, remake navigation so we can go back to previous pages. if (Frame != null) { var nav = NavigationServiceFactory(BackButton.Attach, ExistingContent.Include, Frame); var shell = (Shell)Window.Current.Content; shell.SetNav(nav); if (Shell.Instance.ViewModel.CurrentUser == null) { var userAccountDatabase = new UserAccountDatabase(new SQLitePlatformWinRT(), DatabaseWinRTHelpers.GetWinRTDatabasePath(StringConstants.UserDatabase)); if (await userAccountDatabase.HasDefaultAccounts()) { try { var result = await Shell.Instance.ViewModel.LoginDefaultUser(); } catch (Exception) { // error happened, send them to account page so we can check on it. } } } else { await Shell.Instance.ViewModel.UpdateTokens(); } var page = Frame.Content as MessagesPage; if (page != null) { Current.NavigationService.FrameFacade.BackRequested += page.ViewModel.MasterDetailViewControl.NavigationManager_BackRequested; } else { var threadpage = Frame.Content as FriendsPage; if (threadpage != null) { Current.NavigationService.FrameFacade.BackRequested += threadpage.ViewModel.MasterDetailViewControl.NavigationManager_BackRequested; } } } await Task.CompletedTask; }
public virtual void OnResuming(object sender, object args, AppExecutionState previousExecutionState) { Bootstrapper.DebugWrite($"Virtual, {nameof(previousExecutionState)}:{previousExecutionState}"); }
/// <summary> /// Code that runs when application is resuming. /// </summary> /// <param name="s">The sender of the event.</param> /// <param name="e">Extra argument.</param> /// <param name="previousExecutionState">The previous execution state.</param> public override void OnResuming(object s, object e, AppExecutionState previousExecutionState) { }
public override async void OnResuming(object s, object e, AppExecutionState previousExecutionState) { base.OnResuming(s, e, previousExecutionState); // On Restore, if we have a frame, remake navigation so we can go back to previous pages. if (Frame != null) { var nav = NavigationServiceFactory(BackButton.Attach, ExistingContent.Include, Frame); var shell = (Shell)Window.Current.Content; shell.SetNav(nav); if (Shell.Instance.ViewModel.CurrentUser == null) { var userAccountDatabase = new UserAccountDatabase(new SQLitePlatformWinRT(), DatabaseWinRTHelpers.GetWinRTDatabasePath(StringConstants.UserDatabase)); if (await userAccountDatabase.HasDefaultAccounts()) { try { var result = await Shell.Instance.ViewModel.LoginDefaultUser(); } catch (Exception) { // error happened, send them to account page so we can check on it. } } } else { await Shell.Instance.ViewModel.UpdateTokens(); } var page = Frame.Content as MessagesPage; if (page != null) { Current.NavigationService.FrameFacade.BackRequested += page.ViewModel.MasterDetailViewControl.NavigationManager_BackRequested; } else { var threadpage = Frame.Content as FriendsPage; if (threadpage != null) { Current.NavigationService.FrameFacade.BackRequested += threadpage.ViewModel.MasterDetailViewControl.NavigationManager_BackRequested; } } } await Task.CompletedTask; }
/// <summary> /// The application is returning from a suspend state of some kind. /// </summary> /// <param name="s">Sender</param> /// <param name="e">EventArgs</param> /// <param name="previousExecutionState"></param> /// <remarks> /// previousExecutionState can be Terminated, which typically does not raise OnResume. /// This is important because the resume model changes a little in Mobile. /// </remarks> public virtual void OnResuming(object s, object e, AppExecutionState previousExecutionState) { }
public override void OnResuming(object s, object e, AppExecutionState previousExecutionState) { base.OnResuming(s, e, previousExecutionState); }
public override void OnResuming(object s, object e, AppExecutionState previousExecutionState) { this.application.Run(); }
public override async void OnResuming(object s, object e, AppExecutionState previousExecutionState) { await LoadSavedCookies(); base.OnResuming(s, e, previousExecutionState); }
/// <summary> /// The application is returning from a suspend state of some kind. /// </summary> /// <param name="s"></param> /// <param name="e"></param> /// <param name="previousExecutionState"></param> /// <remarks> /// previousExecutionState can be Terminated, which typically does not raise OnResume. /// This is important because the resume model changes a little in Mobile. /// </remarks> public virtual void OnResuming(object s, object e, AppExecutionState previousExecutionState) { Logger.Info($"Virtual, {nameof(previousExecutionState)}:{previousExecutionState}"); }
/// <summary> /// The application is returning from a suspend state of some kind. /// </summary> /// <param name="s"></param> /// <param name="e"></param> /// <param name="previousExecutionState"></param> /// <remarks> /// previousExecutionState can be Terminated, which typically does not raise OnResume. /// This is important because the resume model changes a little in Mobile. /// </remarks> public virtual void OnResuming(object s, object e, AppExecutionState previousExecutionState) { DebugWrite($"Virtual, {nameof(previousExecutionState)}:{previousExecutionState}"); }
public static void EnableScreenSaver() { AppExecutionState.Clear(); }
public override void OnResuming(object s, object e, AppExecutionState previousExecutionState) { this.container.Resolve <PLC1Session>().Resume(); }
public static void DisableScreenSaver() { AppExecutionState.Set(ExecutionState.DisplayRequired | ExecutionState.SystemRequired | ExecutionState.Continuous); }