diff --git a/Constant/CommonEnum.cs b/Constant/CommonEnum.cs index c45c948..afd9430 100644 --- a/Constant/CommonEnum.cs +++ b/Constant/CommonEnum.cs @@ -5,8 +5,8 @@ namespace GeekDesk.Constant { public enum CommonEnum { - WINDOW_WIDTH = 666, //默认窗体宽度 - WINDOW_HEIGHT = 500, //默认窗体高度 + WINDOW_WIDTH = 850, //默认窗体宽度 + WINDOW_HEIGHT = 600, //默认窗体高度 MENU_CARD_WIDHT = 165, //默认菜单栏宽度 IMAGE_WIDTH = 45, //默认图标宽度 IMAGE_HEIGHT = 45, //默认图标高度 diff --git a/Constant/Constants.cs b/Constant/Constants.cs index ea5516d..a1b482e 100644 --- a/Constant/Constants.cs +++ b/Constant/Constants.cs @@ -26,6 +26,8 @@ namespace GeekDesk.Constant public static string ERROR_FILE_PATH = APP_DIR + "Error.log"; + public static int SHADOW_WIDTH = 20; + //系统图标 public static Hashtable SYSTEM_ICONS = (Hashtable)ConfigurationManager.GetSection("SystemIcons"); diff --git a/Constant/RunTimeStatus.cs b/Constant/RunTimeStatus.cs new file mode 100644 index 0000000..80ac272 --- /dev/null +++ b/Constant/RunTimeStatus.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace GeekDesk.Constant +{ + internal class RunTimeStatus + { + + /// + /// 查询框是否在工作 + /// + public static bool SEARCH_BOX_SHOW = false; + + /// + /// 贴边隐藏后 以非鼠标经过方式触发显示 + /// + public static bool MARGIN_HIDE_AND_OTHER_SHOW = false; + + + + + } +} diff --git a/Constant/SortType.cs b/Constant/SortType.cs index cace5e4..9635b4c 100644 --- a/Constant/SortType.cs +++ b/Constant/SortType.cs @@ -3,7 +3,9 @@ public enum SortType { CUSTOM = 1, //自定义排序 - NAME = 2, //按名称排序 - COUNT = 3 //按使用次数排序 + COUNT_UP = 2, //按使用次数升序 + COUNT_LOW = 3, //按使用次数降序 + NAME_UP = 4, //按名称升序 + NAME_LOW = 5, //按名称降序 } } diff --git a/Control/UserControls/Config/MotionControl.xaml b/Control/UserControls/Config/MotionControl.xaml index 8575b46..dffd0b8 100644 --- a/Control/UserControls/Config/MotionControl.xaml +++ b/Control/UserControls/Config/MotionControl.xaml @@ -41,7 +41,7 @@ - + @@ -60,6 +60,16 @@ + + + + + + + + + + diff --git a/Control/UserControls/Config/MotionControl.xaml.cs b/Control/UserControls/Config/MotionControl.xaml.cs index 684e567..53b970a 100644 --- a/Control/UserControls/Config/MotionControl.xaml.cs +++ b/Control/UserControls/Config/MotionControl.xaml.cs @@ -1,6 +1,6 @@ using GeekDesk.Constant; using GeekDesk.Control.Windows; -using GeekDesk.Thread; +using GeekDesk.MyThread; using GeekDesk.Util; using GeekDesk.ViewModel; using HandyControl.Data; diff --git a/Control/UserControls/Config/OtherControl.xaml b/Control/UserControls/Config/OtherControl.xaml index 6f58f8a..ca5c35e 100644 --- a/Control/UserControls/Config/OtherControl.xaml +++ b/Control/UserControls/Config/OtherControl.xaml @@ -13,6 +13,7 @@ + @@ -40,6 +41,45 @@ + + + + + + + + + + + + + + - + diff --git a/Control/UserControls/Config/OtherControl.xaml.cs b/Control/UserControls/Config/OtherControl.xaml.cs index efe20cc..bd2b09f 100644 --- a/Control/UserControls/Config/OtherControl.xaml.cs +++ b/Control/UserControls/Config/OtherControl.xaml.cs @@ -26,6 +26,13 @@ namespace GeekDesk.Control.UserControls.Config public OtherControl() { InitializeComponent(); + this.Loaded += OtherControl_Loaded; + + } + + private void OtherControl_Loaded(object sender, RoutedEventArgs e) + { + Sort_Check(); } private void SelfStartUpBox_Click(object sender, RoutedEventArgs e) @@ -46,5 +53,70 @@ namespace GeekDesk.Control.UserControls.Config Window.GetWindow(this).DragMove(); } } + + private void SortType_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + RadioButton rb = sender as RadioButton; + SortType type = (SortType)int.Parse(rb.Tag.ToString()); + + SortType resType = type; + switch (type) + { + case SortType.CUSTOM: + break; + case SortType.COUNT_UP: + if (rb.IsChecked == true) + { + CountLowSort.IsChecked = true; + CountUpSort.Visibility = Visibility.Collapsed; + CountLowSort.Visibility = Visibility.Visible; + resType = SortType.COUNT_LOW; + } + break; + case SortType.COUNT_LOW: + if (rb.IsChecked == true) + { + CountUpSort.IsChecked = true; + CountLowSort.Visibility = Visibility.Collapsed; + CountUpSort.Visibility = Visibility.Visible; + resType = SortType.COUNT_UP; + } + break; + case SortType.NAME_UP: + if (rb.IsChecked == true) + { + NameLowSort.IsChecked = true; + NameUpSort.Visibility = Visibility.Collapsed; + NameLowSort.Visibility = Visibility.Visible; + resType = SortType.NAME_LOW; + } + break; + case SortType.NAME_LOW: + if (rb.IsChecked == true) + { + NameUpSort.IsChecked = true; + NameLowSort.Visibility = Visibility.Collapsed; + NameUpSort.Visibility = Visibility.Visible; + resType = SortType.NAME_UP; + } + break; + } + MainWindow.appData.AppConfig.IconSortType = resType; + CommonCode.SortIconList(); + } + + private void Sort_Check() + { + if (NameLowSort.IsChecked == true) + { + NameUpSort.Visibility = Visibility.Collapsed; + NameLowSort.Visibility = Visibility.Visible; + } + if (CountLowSort.IsChecked == true) + { + CountUpSort.Visibility = Visibility.Collapsed; + CountLowSort.Visibility = Visibility.Visible; + } + } } } diff --git a/Control/UserControls/Config/ThemeControl.xaml b/Control/UserControls/Config/ThemeControl.xaml index b6f3e36..ecc94a5 100644 --- a/Control/UserControls/Config/ThemeControl.xaml +++ b/Control/UserControls/Config/ThemeControl.xaml @@ -3,7 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:local="clr-namespace:GeekDesk.Control.UserControls.Config" xmlns:hc="https://handyorg.github.io/handycontrol" mc:Ignorable="d" Background="Transparent" @@ -133,20 +132,27 @@ -