From 904e9a29997e844cdc7cf77d412cc9450f01a193 Mon Sep 17 00:00:00 2001 From: huangcan Date: Mon, 25 Jul 2022 12:56:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=EF=BC=9A=E5=B0=86=E6=AF=8F=E6=AC=A1=E7=82=B9=E5=87=BB=E5=8A=A0?= =?UTF-8?q?=E5=AF=86=E8=8F=9C=E5=8D=95=E7=9A=84dialog=20type=E5=80=BC?= =?UTF-8?q?=E6=94=B9=E6=88=90input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Control/UserControls/PannelCard/LeftCardControl.xaml.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Control/UserControls/PannelCard/LeftCardControl.xaml.cs b/Control/UserControls/PannelCard/LeftCardControl.xaml.cs index ece408c..ea72a54 100644 --- a/Control/UserControls/PannelCard/LeftCardControl.xaml.cs +++ b/Control/UserControls/PannelCard/LeftCardControl.xaml.cs @@ -329,6 +329,7 @@ namespace GeekDesk.Control.UserControls.PannelCard appData.AppConfig.SelectedMenuIcons = null; RunTimeStatus.SHOW_MENU_PASSWORDBOX = true; MainWindow.mainWindow.RightCard.PDDialog.Title.Text = "输入密码"; + MainWindow.mainWindow.RightCard.PDDialog.type = PasswordType.INPUT; MainWindow.mainWindow.RightCard.PDDialog.Visibility = Visibility.Visible; } else From 3fa3a42bb328523c8123f1a6be23ca5d81e3987d Mon Sep 17 00:00:00 2001 From: huangcan Date: Mon, 25 Jul 2022 17:01:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=9A=E5=9C=A8=E4=BD=BF=E7=94=A8DPI=E7=BC=A9=E6=94=BE?= =?UTF-8?q?=E6=97=B6=E5=8F=AF=E4=BB=A5=E6=AD=A3=E7=A1=AE=E7=9A=84=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=8F=96=E8=89=B2=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Control/Windows/PixelColorPickerWindow.xaml.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Control/Windows/PixelColorPickerWindow.xaml.cs b/Control/Windows/PixelColorPickerWindow.xaml.cs index 29fcbc0..06f151f 100644 --- a/Control/Windows/PixelColorPickerWindow.xaml.cs +++ b/Control/Windows/PixelColorPickerWindow.xaml.cs @@ -7,10 +7,14 @@ using System.Runtime.InteropServices; using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; +using System.Windows.Forms; using System.Windows.Input; using System.Windows.Interop; using System.Windows.Media; using System.Windows.Media.Imaging; +using Cursors = System.Windows.Input.Cursors; +using KeyEventArgs = System.Windows.Input.KeyEventArgs; +using MouseEventArgs = System.Windows.Input.MouseEventArgs; namespace GeekDesk.Control.Windows { @@ -28,10 +32,14 @@ namespace GeekDesk.Control.Windows private readonly ColorPicker colorPicker; + [System.Runtime.InteropServices.DllImport("user32.dll")] + private static extern bool SetProcessDPIAware(); + public PixelColorPickerWindow(ColorPicker colorPicker) { InitializeComponent(); this.colorPicker = colorPicker; + SetProcessDPIAware(); ColorPickerWindow_Init(); } @@ -51,8 +59,8 @@ namespace GeekDesk.Control.Windows this.Topmost = true; bgBitmap = new System.Drawing.Bitmap( - (int)SystemParameters.VirtualScreenWidth, - (int)SystemParameters.VirtualScreenHeight, + Screen.AllScreens[0].Bounds.Width, + Screen.AllScreens[0].Bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb );