using System.Windows; using System.Windows.Media; namespace XHWK.WKTool { /// /// 最小化工具栏 /// public partial class MinToolbar : Window { /// /// 屏幕宽 /// internal double pwidth = SystemParameters.PrimaryScreenWidth; /// /// 屏幕高 /// internal double pHeight = SystemParameters.PrimaryScreenHeight; public MinToolbar() { InitializeComponent(); ResizeMode = ResizeMode.NoResize; Topmost = true; } /// /// 初始化隐藏工具栏位置颜色 /// /// /// 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) { } } }