public MainWindow() { InitializeComponent(); ShowDesktop.AddHook(this); RefreshTimer = new Timer((o) => { ReflushHitokoto(); }, null, 0, RefreshTime); }
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 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(); } }