private void AppButton_OnClick(object sender, RoutedEventArgs e) { if (PressedWindowState == ApplicationWindow.WindowState.Active) { Window?.Minimize(); } else { Window?.BringToFront(); } }
private void bdrThumbInner_MouseUp(object sender, MouseButtonEventArgs e) { if (e.ChangedButton == MouseButton.Left) { if (_window == null) { return; } if (Keyboard.IsKeyDown(Key.LeftShift) || Keyboard.IsKeyDown(Key.RightShift)) { ShellHelper.StartProcess(_window.IsUWP ? "appx:" + _window.AppUserModelID : _window.WinFileName); return; } if (_window.State == ApplicationWindow.WindowState.Active) { _window.Minimize(); } else { _window.BringToFront(); } ThumbWindow.Close(); } }
public void SelectWindow() { if (Window != null) { if (Keyboard.IsKeyDown(Key.LeftShift) || Keyboard.IsKeyDown(Key.RightShift)) { ShellHelper.StartProcess(Window.WinFileName); return; } if (Window.State == ApplicationWindow.WindowState.Active) { Window.Minimize(); } else { Window.BringToFront(); } } closeThumb(true); }