123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- using System.Windows;
- using System.Windows.Media;
-
- namespace XHWK.WKTool
- {
- /// <summary>
- /// 最小化工具栏
- /// </summary>
- public partial class MinToolbar : Window
- {
- /// <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="ColorType"></param>
- public void Initialize(double top,double ThisHeight)
- {
- var desktopWorkingArea = System.Windows.SystemParameters.WorkArea;
- Left = desktopWorkingArea.Right - this.Width + 7;
- Top = top;
- BorderBlack.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF638AFF"));
- Height = ThisHeight;
- //if (ColorType == 0)//Blue
- //{
- // BorderBlack.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#2D8CF0"));
- //}
- //else if (ColorType == 1)//Black
- //{
- // BorderBlack.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#364044"));
- //}
- //else
- //{
- // BorderBlack.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#2D8CF0"));
- //}
- // + 330;
- //Console.WriteLine(this.Top + "min");
- }
-
- private void buttonMin_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
- {
- this.Hide();
- APP.W_ScreenRecordingToolbarWindow.MaxToobar();
- }
-
- private void buttonMin_MouseEnter_1(object sender, System.Windows.Input.MouseEventArgs e)
- {
-
- }
- }
- }
|