private void BindSettings(bool enableHotkeys) { BindPosition(null); if (Framework.Settings.Instance.AlwaysTop) { SetTopMost(false); ShowDesktop.RemoveHook(); } else { ClearTopMost(false); ShowDesktop.AddHook(this); } if (Framework.Settings.Instance.ClickThrough) { SetClickThrough(); } else { ClearClickThrough(); } if (Framework.Settings.Instance.ToolbarMode) { HideInAltTab(); } else { ShowInAltTab(); } if (WindowControls.Visibility != Visibility.Visible) { if (Framework.Settings.Instance.CollapseMenuBar) { WindowControls.Visibility = Visibility.Collapsed; } else { WindowControls.Visibility = Visibility.Hidden; } } Hotkey.Initialize(this, Framework.Settings.Instance.Hotkeys); if (enableHotkeys) { Hotkey.Enable(); } }
private void Window_Closing(object sender, CancelEventArgs e) { Ready = false; DataContext = null; if (Model != null) { Model.Dispose(); Model = null; } ClearAppBar(); Devices.RemoveHook(this); ShowDesktop.RemoveHook(); Hotkey.Dispose(); }
private void BindSettings(bool enableHotkeys) { BindPosition(null); if (Framework.Settings.Instance.AlwaysTop) { SetTopMost(false); ShowDesktop.RemoveHook(); } else { ClearTopMost(false); ShowDesktop.AddHook(this); } if (Framework.Settings.Instance.ClickThrough) { SetClickThrough(); } else { ClearClickThrough(); } if (Framework.Settings.Instance.ShowAltTab) { ShowInAltTab(); } else { HideInAltTab(); } Hotkey.Initialize(this, Framework.Settings.Instance.Hotkeys); if (enableHotkeys) { Hotkey.Enable(); } }
private void Window_Closing(object sender, CancelEventArgs e) { Ready = false; DataContext = null; if (Model != null) { Model.Dispose(); Model = null; } if (OS.SupportVirtualDesktop) { VirtualDesktop.CurrentChanged -= VirtualDesktop_CurrentChanged; } ClearAppBar(); Devices.RemoveHook(this); ShowDesktop.RemoveHook(); Hotkey.Dispose(); }