Browse Source

已知问题修复

liufei 3 years ago
parent
commit
56584e1c99

+ 3 - 0
Constant/Constants.cs

@@ -26,6 +26,9 @@ namespace GeekDesk.Constant
 
         public static string ERROR_FILE_PATH = APP_DIR + "Error.log";
 
+        //阴影宽度
+        public static readonly int SHADOW_WIDTH = 20;
+
         //系统图标
         public static Hashtable SYSTEM_ICONS = (Hashtable)ConfigurationManager.GetSection("SystemIcons");
 

+ 4 - 13
Control/UserControls/Config/AboutControl.xaml

@@ -4,7 +4,6 @@
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:cvt="clr-namespace:GeekDesk.Converts"
-             xmlns:local="clr-namespace:GeekDesk.Control.UserControls.PannelCard"
              xmlns:hc="https://handyorg.github.io/handycontrol"
              mc:Ignorable="d" 
              Background="Transparent"
@@ -22,11 +21,11 @@
                     <hc:Shield Subject=".net" Status=">=4.72" Margin="0,0,10,0" Color="#1182c3"/>
                     <hc:Shield Subject="IDE" Status="VS2019" Margin="0,0,10,0" Color="#1182c3"/>
 
-                    <hc:Shield Subject="GitHub" Visibility="Visible" Status="Demo-liu"
+                    <hc:Shield Subject="GitHub" Visibility="Visible" Status="Star"
                            Command="hc:ControlCommands.OpenLink" 
                            CommandParameter="https://github.com/Demo-Liu/GeekDesk"
                            Margin="0,0,10,0" Color="#24292F"/>
-                    <hc:Shield Subject="Gitee" Visibility="Visible" Status="Demo-liu" 
+                    <hc:Shield Subject="Gitee" Visibility="Visible" Status="Star" 
                            Command="hc:ControlCommands.OpenLink" 
                            CommandParameter="https://gitee.com/demo_liu/GeekDesk" 
                            Margin="0,0,10,0" Color="#C71D23"/>
@@ -62,17 +61,9 @@
                         </hc:Poptip.Instance>
                     </hc:Shield>
                 </hc:UniformSpacingPanel>
-                <TextBlock Margin="0,20,0,0" FontSize="13" Width="200" TextAlignment="Center" Text="这是个人开发的程序,所有人可任意修改和免费使用(商用请联系作者)" TextWrapping="Wrap"/>
+                <TextBlock Margin="0,20,0,0" FontSize="13" Width="200" TextAlignment="Center" 
+                           Text="这是个人开发的程序,所有人可任意修改和免费使用(商用请联系作者)" TextWrapping="Wrap"/>
 
-                <!--<hc:UniformSpacingPanel Spacing="10" Visibility="Visible" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10,0,0">
-                <TextBlock Text="更新源:" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
-                <RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" 
-                         Style="{StaticResource RadioButtonIcon}" Content="Gitee"
-                         IsChecked="{Binding UpdateType, Mode=TwoWay, Converter={StaticResource UpdateTypeConvert}, ConverterParameter=1}"/>
-                <RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
-                         Style="{StaticResource RadioButtonIcon}" Content="GitHub" 
-                         IsChecked="{Binding UpdateType, Mode=TwoWay, Converter={StaticResource UpdateTypeConvert}, ConverterParameter=2}"/>
-            </hc:UniformSpacingPanel>-->
             </StackPanel>
         </hc:SimplePanel>
     </Grid>

+ 7 - 4
Control/UserControls/PannelCard/LeftCardControl.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.PannelCard"
              xmlns:hc="https://handyorg.github.io/handycontrol"
              xmlns:cvt="clr-namespace:GeekDesk.Converts"
              xmlns:DraggAnimatedPanel="clr-namespace:DraggAnimatedPanel"
@@ -22,7 +21,7 @@
             </Setter>
             <Setter Property="FocusVisualStyle" Value="{x:Null}" />
             <EventSetter Event="MouseEnter" Handler="Menu_MouseEnter"/>
-            <EventSetter Event="Unselected" Handler="ListBoxItem_Unselected"/>
+            <!--<EventSetter Event="Unselected" Handler="ListBoxItem_Unselected"/>-->
             <Style.Triggers>
                 <MultiTrigger>
                     <MultiTrigger.Conditions>
@@ -49,8 +48,12 @@
                     </MultiTrigger.Setters>
                 </MultiTrigger>
 
-               
-                
+
+
+                <Trigger Property="IsSelected" Value="True">
+                    <Setter Property="Background" Value="#ECECEC"/>
+                    <Setter Property="Foreground" Value="Black"/>
+                </Trigger>
                 <!--<Trigger Property="IsSelected" Value="False">
                     <Setter Property="Background" Value="Transparent"/>
                     <Setter Property="Foreground" Value="Black"/>

+ 51 - 51
Control/UserControls/PannelCard/LeftCardControl.xaml.cs

@@ -83,11 +83,11 @@ namespace GeekDesk.Control.UserControls.PannelCard
         {
             StackPanel sp = sender as StackPanel;
             
-            ListBoxItem lbi = (sp.TemplatedParent as ContentPresenter).TemplatedParent as ListBoxItem;
+            //ListBoxItem lbi = (sp.TemplatedParent as ContentPresenter).TemplatedParent as ListBoxItem;
             if (sp.Visibility == Visibility.Collapsed)
             {
-                SolidColorBrush scb = new SolidColorBrush(Colors.Red);
-                lbi.MouseEnter += Lbi_MouseEnter;
+                //SolidColorBrush scb = new SolidColorBrush(Colors.Red);
+                //lbi.MouseEnter += Lbi_MouseEnter;
 
                 if (MenuListBox.SelectedIndex != -1)
                 {
@@ -100,30 +100,30 @@ namespace GeekDesk.Control.UserControls.PannelCard
                 }
             } else
             {
-                SolidColorBrush bac = new SolidColorBrush(Color.FromRgb(236, 236, 236));
-                SolidColorBrush fontColor = new SolidColorBrush(Colors.Black);
+                //SolidColorBrush bac = new SolidColorBrush(Color.FromRgb(236, 236, 236));
+                //SolidColorBrush fontColor = new SolidColorBrush(Colors.Black);
 
-                lbi.MouseEnter += (s, me) =>
-                {
-                    lbi.Background = bac;
-                };
+                //lbi.MouseEnter += (s, me) =>
+                //{
+                //    lbi.Background = bac;
+                //};
 
-                lbi.MouseLeave += Lbi_MouseLeave;
+                //lbi.MouseLeave += Lbi_MouseLeave;
 
-                lbi.Selected += (s, me) =>
-                {
-                    lbi.MouseLeave -= Lbi_MouseLeave;
-                    lbi.Background = bac;
-                    lbi.Foreground = fontColor;
-                };
+                //lbi.Selected += (s, me) =>
+                //{
+                //    lbi.MouseLeave -= Lbi_MouseLeave;
+                //    lbi.Background = bac;
+                //    lbi.Foreground = fontColor;
+                //};
             }
         }
 
-        private void Lbi_MouseEnter(object sender, MouseEventArgs e)
-        {
-            ListBoxItem lbi = sender as ListBoxItem;
-            lbi.Background = Brushes.Transparent;
-        }
+        //private void Lbi_MouseEnter(object sender, MouseEventArgs e)
+        //{
+        //    ListBoxItem lbi = sender as ListBoxItem;
+        //    lbi.Background = Brushes.Transparent;
+        //}
 
         /// <summary>
         /// 新建菜单
@@ -139,26 +139,26 @@ namespace GeekDesk.Control.UserControls.PannelCard
             appData.AppConfig.SelectedMenuIndex = MenuListBox.SelectedIndex;
             appData.AppConfig.SelectedMenuIcons = info.IconList;
 
-            ItemCollection ic = MenuListBox.Items;
-            SolidColorBrush bac = new SolidColorBrush(Color.FromRgb(236, 236, 236));
-            SolidColorBrush fontColor = new SolidColorBrush(Colors.Black);
-            foreach (var icItem in ic)
-            {
-                ListBoxItem lbi = icItem as ListBoxItem;
-                lbi.MouseEnter += (s, me) =>
-                {
-                    lbi.Background = bac;
-                };
+            //ItemCollection ic = MenuListBox.Items;
+            //SolidColorBrush bac = new SolidColorBrush(Color.FromRgb(236, 236, 236));
+            //SolidColorBrush fontColor = new SolidColorBrush(Colors.Black);
+            //foreach (var icItem in ic)
+            //{
+            //    ListBoxItem lbi = icItem as ListBoxItem;
+            //    lbi.MouseEnter += (s, me) =>
+            //    {
+            //        lbi.Background = bac;
+            //    };
 
-                lbi.MouseLeave += Lbi_MouseLeave;
+            //    lbi.MouseLeave += Lbi_MouseLeave;
 
-                lbi.Selected += (s, me) =>
-                {
-                    lbi.MouseLeave -= Lbi_MouseLeave;
-                    lbi.Background = bac;
-                    lbi.Foreground = fontColor;
-                };
-            }
+            //    lbi.Selected += (s, me) =>
+            //    {
+            //        lbi.MouseLeave -= Lbi_MouseLeave;
+            //        lbi.Background = bac;
+            //        lbi.Foreground = fontColor;
+            //    };
+            //}
         }
 
         /// <summary>
@@ -280,19 +280,19 @@ namespace GeekDesk.Control.UserControls.PannelCard
             }
         }
 
-        private void ListBoxItem_Unselected(object sender, RoutedEventArgs e)
-        {
-            //添加Leave效果
-            ListBoxItem lbi = sender as ListBoxItem;
-            lbi.Background = Brushes.Transparent;
-            lbi.MouseLeave += Lbi_MouseLeave;
-        }
+        //private void ListBoxItem_Unselected(object sender, RoutedEventArgs e)
+        //{
+        //    //添加Leave效果
+        //    ListBoxItem lbi = sender as ListBoxItem;
+        //    //lbi.Background = Brushes.Transparent;
+        //    //lbi.MouseLeave += Lbi_MouseLeave;
+        //}
 
-        private void Lbi_MouseLeave(object sender, MouseEventArgs e)
-        {
-            ListBoxItem lbi = sender as ListBoxItem;
-            lbi.Background = Brushes.Transparent;
-        }
+        //private void Lbi_MouseLeave(object sender, MouseEventArgs e)
+        //{
+        //    ListBoxItem lbi = sender as ListBoxItem;
+        //    lbi.Background = Brushes.Transparent;
+        //}
 
         /// <summary>
         /// 鼠标悬停切换菜单

+ 6 - 0
GeekDesk.csproj

@@ -72,6 +72,9 @@
     <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
       <HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
     </Reference>
+    <Reference Include="NPinyin.Core, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>packages\NPinyin.Core.3.0.0\lib\net45\NPinyin.Core.dll</HintPath>
+    </Reference>
     <Reference Include="Quartz, Version=3.3.3.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
       <HintPath>packages\Quartz.3.3.3\lib\net472\Quartz.dll</HintPath>
     </Reference>
@@ -187,6 +190,7 @@
     <Compile Include="Control\Windows\UpdateWindow.xaml.cs">
       <DependentUpon>UpdateWindow.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Converts\SearchResWidth.cs" />
     <Compile Include="Converts\DoubleToGridLength.cs" />
     <Compile Include="Converts\SortTypeConvert.cs" />
     <Compile Include="Converts\MenuInfoConvert.cs" />
@@ -224,6 +228,7 @@
     <Compile Include="Util\SvgToGeometry.cs" />
     <Compile Include="ViewModel\AppConfig.cs" />
     <Compile Include="ViewModel\AppData.cs" />
+    <Compile Include="ViewModel\Temp\SearchIconList.cs" />
     <Compile Include="ViewModel\ToDoInfo.cs" />
     <Compile Include="ViewModel\IconfontInfo.cs" />
     <Compile Include="ViewModel\IconInfo.cs" />
@@ -400,5 +405,6 @@
     <Resource Include="Resource\Image\SystemIcon\RecycleBin.png" />
     <Resource Include="Resource\Image\SystemIcon\Registry.png" />
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 1 - 0
packages.config

@@ -6,6 +6,7 @@
   <package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net472" />
   <package id="MouseKeyHook" version="5.6.0" targetFramework="net472" />
   <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
+  <package id="NPinyin.Core" version="3.0.0" targetFramework="net472" />
   <package id="Quartz" version="3.3.3" targetFramework="net472" />
   <package id="System.Buffers" version="4.5.1" targetFramework="net472" />
   <package id="System.Diagnostics.DiagnosticSource" version="4.7.1" targetFramework="net472" />