diff --git a/App.config b/App.config index 3a3e105..66892cf 100644 --- a/App.config +++ b/App.config @@ -2,6 +2,8 @@
+
+
@@ -16,6 +18,9 @@ + + + @@ -44,12 +49,13 @@ - - - - - - + + + + + + + diff --git a/App.xaml.cs b/App.xaml.cs index e950c4e..72790e9 100644 --- a/App.xaml.cs +++ b/App.xaml.cs @@ -1,11 +1,8 @@ using GeekDesk.Constant; using GeekDesk.Util; -using Microsoft.Win32; using System; -using System.IO; -using System.Text; using System.Windows; -using System.Windows.Media.Animation; +using System.Windows.Input; using System.Windows.Threading; namespace GeekDesk @@ -43,6 +40,7 @@ namespace GeekDesk void Current_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) { e.Handled = true;//使用这一行代码告诉运行时,该异常被处理了,不再作为UnhandledException抛出了。 + Mouse.OverrideCursor = null; LogUtil.WriteErrorLog(e, "未捕获异常!"); if (Constants.DEV) { @@ -55,6 +53,18 @@ namespace GeekDesk LogUtil.WriteErrorLog(e, "严重异常!"); MessageBox.Show("GeekDesk遇到未知问题崩溃!"); } + public static void DoEvents() + { + var frame = new DispatcherFrame(); + Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background, + new DispatcherOperationCallback( + delegate (object f) + { + ((DispatcherFrame)f).Continue = false; + return null; + }), frame); + Dispatcher.PushFrame(frame); + } } diff --git a/Constant/BGStyle.cs b/Constant/BGStyle.cs new file mode 100644 index 0000000..0e6f6dc --- /dev/null +++ b/Constant/BGStyle.cs @@ -0,0 +1,11 @@ +/// +/// 背景风格 +/// +namespace GeekDesk.Constant +{ + public enum BGStyle + { + ImgBac = 1, //图片 + GradientBac = 2 //渐变色 + } +} diff --git a/Constant/Constants.cs b/Constant/Constants.cs index a1b482e..18889d7 100644 --- a/Constant/Constants.cs +++ b/Constant/Constants.cs @@ -1,10 +1,6 @@ using System; using System.Collections; -using System.Collections.Generic; using System.Configuration; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace GeekDesk.Constant { diff --git a/Constant/HotKeyType.cs b/Constant/HotKeyType.cs new file mode 100644 index 0000000..a468d88 --- /dev/null +++ b/Constant/HotKeyType.cs @@ -0,0 +1,10 @@ +namespace GeekDesk.Constant +{ + public enum HotKeyType + { + + Main = 0, //主窗口 + ToDo = 1, //待办任务 + ColorPicker = 2 //拾色器 + } +} diff --git a/Constant/IconStartType.cs b/Constant/IconStartType.cs index 1d94174..b633a0a 100644 --- a/Constant/IconStartType.cs +++ b/Constant/IconStartType.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -/// +/// /// 图标应用启动方式 /// namespace GeekDesk.Constant diff --git a/Constant/IconType.cs b/Constant/IconType.cs index 859e44d..49400cb 100644 --- a/Constant/IconType.cs +++ b/Constant/IconType.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace GeekDesk.Constant +namespace GeekDesk.Constant { public enum IconType { diff --git a/Constant/RunTimeStatus.cs b/Constant/RunTimeStatus.cs index 80ac272..ba82f5a 100644 --- a/Constant/RunTimeStatus.cs +++ b/Constant/RunTimeStatus.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace GeekDesk.Constant +namespace GeekDesk.Constant { internal class RunTimeStatus { @@ -20,6 +14,12 @@ namespace GeekDesk.Constant public static bool MARGIN_HIDE_AND_OTHER_SHOW = false; + /// + /// 是否锁定主面板 锁定后 不执行隐藏动作 + /// + public static bool LOCK_APP_PANEL = false; + + } diff --git a/Constant/SearchType.cs b/Constant/SearchType.cs new file mode 100644 index 0000000..994125a --- /dev/null +++ b/Constant/SearchType.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace GeekDesk.Constant +{ + public enum SearchType + { + HOT_KEY = 0, //快捷键 + KEY_DOWN = 1, //按下即搜 + } +} diff --git a/Constant/TodoTaskExecType.cs b/Constant/TodoTaskExecType.cs index d634ce7..20ade56 100644 --- a/Constant/TodoTaskExecType.cs +++ b/Constant/TodoTaskExecType.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace GeekDesk.Constant +namespace GeekDesk.Constant { public enum TodoTaskExecType { diff --git a/Constant/UpdateType.cs b/Constant/UpdateType.cs index 6cbb96a..e862b53 100644 --- a/Constant/UpdateType.cs +++ b/Constant/UpdateType.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -/// +/// /// 更新源 /// namespace GeekDesk.Constant diff --git a/Control/Other/BacklogNotificatin.xaml.cs b/Control/Other/BacklogNotificatin.xaml.cs index be06ef4..28b64c9 100644 --- a/Control/Other/BacklogNotificatin.xaml.cs +++ b/Control/Other/BacklogNotificatin.xaml.cs @@ -5,18 +5,8 @@ using GeekDesk.ViewModel; using HandyControl.Controls; using Quartz; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; namespace GeekDesk.Control.Other { diff --git a/Control/Other/CustomIconUrlDialog.xaml.cs b/Control/Other/CustomIconUrlDialog.xaml.cs index fc99031..f632bd0 100644 --- a/Control/Other/CustomIconUrlDialog.xaml.cs +++ b/Control/Other/CustomIconUrlDialog.xaml.cs @@ -1,13 +1,9 @@ using GeekDesk.Control.Windows; using GeekDesk.Util; using GeekDesk.ViewModel; -using Microsoft.Win32; -using System; using System.Configuration; using System.Diagnostics; using System.Windows; -using System.Windows.Controls; -using System.Windows.Media.Imaging; namespace GeekDesk.Control.Other diff --git a/Control/Other/GradientBGDialog.xaml b/Control/Other/GradientBGDialog.xaml new file mode 100644 index 0000000..8e9bb3f --- /dev/null +++ b/Control/Other/GradientBGDialog.xaml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +