private void WindowVisibilityChanged(System.Object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { App.InitializeInstance(); LoggingService.LogInfo($"[{nameof(NotepadsMainPage)}] Window Visibility Changed, Visible = {e.Visible}.", consoleOnly: true); // Perform operations that should take place when the application becomes visible rather than // when it is prelaunched, such as building a what's new feed }
async void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (e.Visible) { await UpdateDialog(); } }
private void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (Window.Current.Visible) { canvasControl.Invalidate(); } }
async void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (e.Visible) { // バックグラウンドからフォラグラウンドに切り替わった await RestartPreviewAsync(); } }
private async void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (e.Visible) { await this.OnAppVisible(); } this.LoadResources(); }
/// <summary> /// Perform operations that should take place when the application becomes visible rather than /// when it is prelaunched, such as building a what's new feed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> static void WindowVisibilityChangedEventHandler(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (!e.Visible) // app losing focus { return; } TodayController.CheckHeroQuote(); }
private void OnWindowVisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { Frame frame = Window.Current.Content as Frame; IWindowVisibilityWatcher watcher = frame.Content as IWindowVisibilityWatcher; if (watcher != null) { watcher.OnVisibilityChanged(e.Visible); } }
private void OnWindowVisibilityChanged(Object sender, Windows.UI.Core.VisibilityChangedEventArgs args) { if (!args.Visible) { OnDiactivating(); } else { OnActivating(); } }
private void WindowVisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (e.Visible && !_onlineTimer.IsEnabled) { _onlineTimer.Start(); } else if (!e.Visible && _onlineTimer.IsEnabled) { _onlineTimer.Stop(); } }
private void OnVisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs args) { if (args.Visible && mRenderSurface != EGL.NO_SURFACE) { StartRenderLoop(); } else { StopRenderLoop(); } }
/// <summary> /// <c>CoreWindow</c>の可視状態が変わった時のイベント処理. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> async void CoreWindow_Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { // 小細工 if (this.wasSavedState && e.Visible) { this.wasSavedState = false; LoadCurrentLockscreenImageAsync(); DoUpdateOnAppLaunchAsync(); await TileHelper.CleanupUnusedTileIdsAsync(); } }
void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (e.Visible) { // App en primer plano } else { // App en segundo plano } }
async void core_VisibilityChanged(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.VisibilityChangedEventArgs args) { if (args.Visible) { await StartMediaCapture(); } else { await StopMediaCapture(); } }
private void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (e.Visible) { WhirlPoolAPIClient.ClearToast(); if (WhirlPoolAPIClient.APIKey == "") { ShowConfig(); } } }
void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (e.Visible) { Page_GotFocus_1(new object(), new RoutedEventArgs()); } else { Page_LostFocus_1(new object(), new RoutedEventArgs()); } }
void OnVisibilityChanged(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.VisibilityChangedEventArgs args) { if (args.Visible && _renderSurface != IntPtr.Zero) { StartRenderLoop(); } else { StopRenderLoop(); } }
private async void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (e.Visible && _initialized) { await Initialize(); } else if (!e.Visible && _initialized) { await CleanUp(); _initialized = true; } }
void OnVisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { Debug.WriteLine(DebugTag + "OnVisibilityChanged(): " + e.Visible); if (e.Visible && !_pickingFile) { InitializeCameraAsync(); } else { StopCameraAsync(); } }
private void OnWindowVisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (_mediaPlayer != null) { if (e.Visible) { _mediaPlayer.MediaPlayer.Play(); } else { _mediaPlayer.MediaPlayer.Pause(); } } }
// important because the UWP camera stream automatically shuts down when a window is minimized private async void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs args) { if (args.Visible == false) { if (_anylineScanView != null) { await _anylineScanView.StopCameraAsync(); } } if (args.Visible == true) { _anylineScanView?.StartCamera(); } }
private void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (_contentProvider is null) { return; } if (e.Visible) { Resume(); } else { Pause(); } }
/// <summary> /// maintains the app's visual state when the screen is locked /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void CurrentWindow_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (onRecogPage.Equals(true)) { if (e.Visible && isLocked == true) { await UpdateResult(); isLocked = false; } else { isLocked = true; } } }
private void CheckIfAppIsSuspended(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (Window.Current.Visible == true) { if (ApplicationApplicationState != Enums.ApplicationStateType.Active) { ApplicationApplicationState = Enums.ApplicationStateType.Active; } } else { if (ApplicationApplicationState != Enums.ApplicationStateType.Suspended) { ApplicationApplicationState = Enums.ApplicationStateType.Suspended; } } }
/// <summary> /// Toggles on and off the camera when app loses/gains visibility on the screen /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { try { if (e.Visible) { await defaultViewModel.ResumePreviewAsync(); } else { await defaultViewModel.PausePreviewAsync(); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.Message); } }
async void Window_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (!e.Visible) { await CleanupAsync(); } else { try { await InitializeAsync(); } catch (Exception err) { rootPage.NotifyUser("Camera initialization error: " + err.Message + "\n Try restarting the sample.", NotifyType.ErrorMessage); } } }
private void Window_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (!(AssociatedObject is Image image) || !(image.Source is BitmapImage bitmap) || !bitmap.IsAnimatedBitmap) { return; } if (e.Visible) { bitmap.Play(); } else { bitmap.Stop(); } }
void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (e.Visible) { Frame rootFrame = Window.Current.Content as Frame; // if we are not on the logon page then we should check if the secure store locked itself if (rootFrame.CurrentSourcePageType != typeof(LogonPage)) { if (Globals.LogonCore != null) { if (!Globals.LogonCore.State.IsSecureStoreOpen) { RegistrationHelper.NavigateToLogonPage(rootFrame); } } } } }
void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (e.Visible) { AppDatabase.Current.LoadInstances(); //_startAll(); NavigationService.NavigateOnUI("FlickrLoginView"); } else { AppDatabase.Current.Unload(); RenderingService.Unload(); _stopAll(); NavigationService.NavigateOnUI("SuspendedView"); } }
private void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (e.Visible) { if (RecentlyPlayed) { this.AssociatedObject.Play(); RecentlyPlayed = false; } } else { RecentlyPlayed = AssociatedObject.CurrentState == Windows.UI.Xaml.Media.MediaElementState.Playing || AssociatedObject.CurrentState == Windows.UI.Xaml.Media.MediaElementState.Opening || AssociatedObject.CurrentState == Windows.UI.Xaml.Media.MediaElementState.Buffering; if (this.AssociatedObject.CanPause) { this.AssociatedObject.Pause(); } } }
void OnWindowVisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { Window w = sender as Window; if (w != null) { Frame f = w.Content as Frame; if (f != null) { MainPage main = f.Content as MainPage; if (main != null) { if (e.Visible) { main.Reconnect(); } else { main.Disconnect(); } } } } }