12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using System.Windows;
- using System.Windows.Media;
-
- namespace XHWK.WKTool
- {
- /// <summary>
- /// 最小化工具栏
- /// </summary>
- public partial class MinToolbar
- {
- /// <summary>
- /// 屏幕宽
- /// </summary>
- internal double pwidth = SystemParameters.PrimaryScreenWidth;
-
- /// <summary>
- /// 屏幕高
- /// </summary>
- internal double pHeight = SystemParameters.PrimaryScreenHeight;
- public MinToolbar()
- {
- InitializeComponent();
- ResizeMode = ResizeMode.NoResize;
- Topmost = true;
-
- }
-
- /// <summary>
- /// 初始化隐藏工具栏位置颜色
- /// </summary>
- /// <param name="top"></param>
- /// <param name="thisHeight"></param>
- public void Initialize(double top, double thisHeight)
- {
- var desktopWorkingArea = System.Windows.SystemParameters.WorkArea;
- Left = desktopWorkingArea.Right - this.Width + 7;
- Top = top;
- // ReSharper disable once PossibleNullReferenceException
- BorderBlack.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF638AFF"));
- Height = thisHeight;
- }
-
- private void buttonMin_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
- {
- this.Hide();
- App.W_ScreenRecordingToolbarWindow.MaxToobar();
- }
- }
- }
|