From 4701ecc7811cc23a8440583d7becc6f8dd6be2ef Mon Sep 17 00:00:00 2001 From: liufei Date: Wed, 19 May 2021 17:31:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8A=9F=E8=83=BD=20beta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Constant/AppHideType.cs | 14 +++ Constant/DefaultConstant.cs | 2 +- Constant/IconStartType.cs | 2 +- Constant/SortType.cs | 2 +- Control/ConfigDialog.xaml | 35 ++++++ Control/ConfigDialog.xaml.cs | 14 +++ GeekDesk.csproj | 11 +- MainWindow.xaml | 55 +++++++--- MainWindow.xaml.cs | 199 ++++++++++++++++++++++++++++------- Util/HotKey.cs | 4 + Util/MouseUtil.cs | 35 ++++++ Util/ScreenUtil.cs | 15 +++ Util/VisibilityConvert.cs | 33 ------ ViewModel/AppConfig.cs | 71 ++++++++++++- ViewModel/AppData.cs | 3 + ViewModel/IconInfo.cs | 5 +- ViewModel/MenuInfo.cs | 18 ++-- 17 files changed, 407 insertions(+), 111 deletions(-) create mode 100644 Constant/AppHideType.cs create mode 100644 Control/ConfigDialog.xaml create mode 100644 Control/ConfigDialog.xaml.cs create mode 100644 Util/MouseUtil.cs create mode 100644 Util/ScreenUtil.cs delete mode 100644 Util/VisibilityConvert.cs diff --git a/Constant/AppHideType.cs b/Constant/AppHideType.cs new file mode 100644 index 0000000..2ebeb0d --- /dev/null +++ b/Constant/AppHideType.cs @@ -0,0 +1,14 @@ + + +/// +/// 面板隐藏方式 +/// +namespace GeekDesk.Constant +{ + public enum AppHideType + { + LOST_FOCUS = 1, // 失去焦点后 + START_EXE = 2, //启动程序后 + HANDLE = 3 //手动关闭 + } +} diff --git a/Constant/DefaultConstant.cs b/Constant/DefaultConstant.cs index 1804108..1b9f5da 100644 --- a/Constant/DefaultConstant.cs +++ b/Constant/DefaultConstant.cs @@ -3,7 +3,7 @@ /// namespace GeekDesk.Constant { - enum DefaultConstant + public enum DefaultConstant { WINDOW_WIDTH = 666, //默认窗体宽度 WINDOW_HEIGHT = 500, //默认窗体高度 diff --git a/Constant/IconStartType.cs b/Constant/IconStartType.cs index f3398ec..1d94174 100644 --- a/Constant/IconStartType.cs +++ b/Constant/IconStartType.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; /// namespace GeekDesk.Constant { - enum IconStartType + public enum IconStartType { DEFAULT_STARTUP = 1, //默认启动方式 ADMIN_STARTUP = 2, //管理员方式启动 diff --git a/Constant/SortType.cs b/Constant/SortType.cs index 0255755..cace5e4 100644 --- a/Constant/SortType.cs +++ b/Constant/SortType.cs @@ -1,6 +1,6 @@ namespace GeekDesk.Constant { - enum SortType + public enum SortType { CUSTOM = 1, //自定义排序 NAME = 2, //按名称排序 diff --git a/Control/ConfigDialog.xaml b/Control/ConfigDialog.xaml new file mode 100644 index 0000000..6f7aedc --- /dev/null +++ b/Control/ConfigDialog.xaml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Control/ConfigDialog.xaml.cs b/Control/ConfigDialog.xaml.cs new file mode 100644 index 0000000..c9c22e0 --- /dev/null +++ b/Control/ConfigDialog.xaml.cs @@ -0,0 +1,14 @@ + +namespace GeekDesk.Control +{ + /// + /// ConfigDialog.xaml 的交互逻辑 + /// + public partial class ConfigDialog + { + public ConfigDialog() + { + InitializeComponent(); + } + } +} diff --git a/GeekDesk.csproj b/GeekDesk.csproj index 2e11a81..f747356 100644 --- a/GeekDesk.csproj +++ b/GeekDesk.csproj @@ -71,10 +71,14 @@ + + + ConfigDialog.xaml + IconInfoDialog.xaml @@ -90,13 +94,18 @@ + + - + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/MainWindow.xaml b/MainWindow.xaml index a0c6e6c..a7fa242 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -15,6 +15,9 @@ Background="Transparent" OpacityMask ="White" > + + + @@ -90,7 +93,6 @@ - @@ -132,20 +134,29 @@