private void OnWindowClosing(object sender, CancelEventArgs e) { IsClosing = true; if (Startup.IsShuttingDown && Screen.Primary) { NotificationArea.Instance.Dispose(); AppBarHelper.RegisterBar(this, Screen, this.ActualWidth * dpiScale, this.ActualHeight * dpiScale); WinSparkle.win_sparkle_cleanup(); if (Startup.IsCairoUserShell) { AppBarHelper.ResetWorkArea(); } } else if (Startup.IsSettingScreens || Startup.IsShuttingDown) { AppBarHelper.RegisterBar(this, Screen, this.ActualWidth, this.ActualHeight); } else { IsClosing = false; e.Cancel = true; } _listener.UnHookKeyboard(); }
private void OnWindowClosing(object sender, CancelEventArgs e) { SysTray.DestroySystemTray(); AppBarHelper.RegisterBar(this, this.ActualWidth, this.ActualHeight); WinSparkle.win_sparkle_cleanup(); if (Startup.IsCairoUserShell) { AppBarHelper.ResetWorkArea(); } }
private void OnWindowClosing(object sender, CancelEventArgs e) { IsClosing = true; if (Startup.IsShuttingDown && Screen.Primary) { NotificationArea.Instance.Dispose(); AppBarHelper.RegisterBar(this, Screen, this.ActualWidth * dpiScale, this.ActualHeight * dpiScale); WinSparkle.win_sparkle_cleanup(); // Currently Unused if (keyboardListener != null) { keyboardListener.UnHookKeyboard(); } if (Startup.IsCairoRunningAsShell) { AppBarHelper.ResetWorkArea(); } FullScreenHelper.Instance.FullScreenApps.CollectionChanged -= FullScreenApps_CollectionChanged; FullScreenHelper.Instance.Dispose(); Microsoft.Win32.SystemEvents.TimeChanged -= new EventHandler(TimeChanged); } else if (Startup.IsSettingScreens || Startup.IsShuttingDown) { AppBarHelper.RegisterBar(this, Screen, this.ActualWidth * dpiScale, this.ActualHeight * dpiScale); FullScreenHelper.Instance.FullScreenApps.CollectionChanged -= FullScreenApps_CollectionChanged; } else { IsClosing = false; e.Cancel = true; } }