星火微课系统客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MinToolbar.xaml.cs 1.4KB

10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System.Windows;
  2. using System.Windows.Media;
  3. namespace XHWK.WKTool
  4. {
  5. /// <summary>
  6. /// 最小化工具栏
  7. /// </summary>
  8. public partial class MinToolbar
  9. {
  10. /// <summary>
  11. /// 屏幕宽
  12. /// </summary>
  13. internal double pwidth = SystemParameters.PrimaryScreenWidth;
  14. /// <summary>
  15. /// 屏幕高
  16. /// </summary>
  17. internal double pHeight = SystemParameters.PrimaryScreenHeight;
  18. public MinToolbar()
  19. {
  20. InitializeComponent();
  21. ResizeMode = ResizeMode.NoResize;
  22. Topmost = true;
  23. }
  24. /// <summary>
  25. /// 初始化隐藏工具栏位置颜色
  26. /// </summary>
  27. /// <param name="top"></param>
  28. /// <param name="thisHeight"></param>
  29. public void Initialize(double top, double thisHeight)
  30. {
  31. Rect desktopWorkingArea = System.Windows.SystemParameters.WorkArea;
  32. Left = desktopWorkingArea.Right - Width + 7;
  33. Top = top;
  34. // ReSharper disable once PossibleNullReferenceException
  35. BorderBlack.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF638AFF"));
  36. Height = thisHeight;
  37. }
  38. private void buttonMin_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
  39. {
  40. Hide();
  41. App.W_ScreenRecordingToolbarWindow.MaxToobar();
  42. }
  43. }
  44. }