Browse Source

样式优化 bug修改 鼠标中键呼出

liufei 3 years ago
parent
commit
24ba279b18
41 changed files with 877 additions and 451 deletions
  1. 1 0
      App.xaml
  2. 1 1
      Constant/Constants.cs
  3. 1 1
      Control/Other/BacklogNotificatin.xaml
  4. 5 8
      Control/Other/CustomIconUrlDialog.xaml
  5. 17 17
      Control/Other/IconInfoDialog.xaml
  6. 17 16
      Control/Other/IconInfoUrlDialog.xaml
  7. 15 3
      Control/UserControls/Config/MotionControl.xaml
  8. 46 30
      Control/UserControls/Config/MotionControl.xaml.cs
  9. 2 2
      Control/UserControls/Config/OtherControl.xaml
  10. 3 2
      Control/UserControls/Config/ThemeControl.xaml
  11. 19 1
      Control/UserControls/Config/ThemeControl.xaml.cs
  12. 4 3
      Control/UserControls/IconFont/IconPannel.xaml
  13. 6 4
      Control/UserControls/PannelCard/RightCardControl.xaml
  14. 3 4
      Control/UserControls/PannelCard/RightCardControl.xaml.cs
  15. 23 6
      Control/UserControls/ToDo/TodoControl.xaml
  16. 21 3
      Control/UserControls/ToDo/TodoControl.xaml.cs
  17. 58 76
      Control/Windows/ConfigWindow.xaml
  18. 3 0
      Control/Windows/ConfigWindow.xaml.cs
  19. 62 32
      Control/Windows/IconfontWindow.xaml
  20. 1 1
      Control/Windows/IconfontWindow.xaml.cs
  21. 62 60
      Control/Windows/ToDoInfoWindow.xaml
  22. 45 56
      Control/Windows/ToDoWindow.xaml
  23. 2 0
      Control/Windows/ToDoWindow.xaml.cs
  24. 38 28
      Control/Windows/UpdateWindow.xaml
  25. 2 1
      Control/Windows/UpdateWindow.xaml.cs
  26. 14 2
      GeekDesk.csproj
  27. 84 77
      MainWindow.xaml
  28. 67 5
      MainWindow.xaml.cs
  29. 48 0
      Resource/Dictionary/CommonStyle.xaml
  30. 34 0
      Thread/DispatcherBuild.cs
  31. 58 0
      Thread/MouseHookThread.cs
  32. 4 2
      Thread/UpdateThread.cs
  33. 41 1
      Util/CommonCode.cs
  34. 24 2
      Util/FileIcon.cs
  35. 2 0
      Util/FileUtil.cs
  36. 11 6
      Util/GlobalHotKey.cs
  37. 2 0
      Util/MarginHide.cs
  38. 6 0
      Util/RegisterUtil.cs
  39. 2 0
      Util/ShellContextMenu.cs
  40. 20 0
      ViewModel/AppConfig.cs
  41. 3 1
      packages.config

+ 1 - 0
App.xaml

@@ -12,6 +12,7 @@
                 <ResourceDictionary Source="/GeekDesk;component/Resource/Dictionary/Geometry.xaml"/>
                 <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
                 <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
+                <ResourceDictionary Source="/GeekDesk;component/Resource/Dictionary/CommonStyle.xaml"/>
             </ResourceDictionary.MergedDictionaries>
         </ResourceDictionary>
   </Application.Resources>

+ 1 - 1
Constant/Constants.cs

@@ -10,7 +10,7 @@ namespace GeekDesk.Constant
     {
         public static string APP_DIR = AppDomain.CurrentDomain.BaseDirectory.Trim();
 
-        public static string MY_NAME = "GeekDesk";
+        public static string MY_NAME = "GeekDesk-D";
 
         /// <summary>
         /// app数据文件路径

+ 1 - 1
Control/Other/BacklogNotificatin.xaml

@@ -32,7 +32,7 @@
             </hc:Card.Footer>
         </hc:Card>
 
-        <hc:UniformSpacingPanel Spacing="20" HorizontalAlignment="Center" Margin="0,346,0,0">
+        <hc:UniformSpacingPanel Spacing="20" HorizontalAlignment="Center" Margin="45.5,310,42.5,36">
             <hc:TextBox x:Name="DelayTime" Height="20" Width="60" Text="10" PreviewTextInput="DelayTime_PreviewTextInput" PreviewLostKeyboardFocus="DelayTime_PreviewLostKeyboardFocus" />
             <ComboBox x:Name="DelayType" hc:DropDownElement.ConsistentWidth="False" SelectedIndex="0" Height="20" Width="60">
                 <ComboBox.Items>

+ 5 - 8
Control/Other/CustomIconUrlDialog.xaml

@@ -5,7 +5,8 @@
         CornerRadius="3"
         Width="400"
         Height="230"
-        Opacity="0.95">
+        Opacity="0.95"
+        Style="{StaticResource BorderBG}">
     <Border.Resources>
         <Style x:Key="LeftTB" TargetType="TextBlock" BasedOn="{StaticResource TextBlockBaseStyle}">
             <Setter Property="Width" Value="100"/>
@@ -14,10 +15,7 @@
             <Setter Property="FontSize" Value="14"/>
         </Style>
     </Border.Resources>
-    <Border.Background>
-        <SolidColorBrush Color="AliceBlue" Opacity="1"/>
-    </Border.Background>
-    <hc:SimplePanel Margin="10">
+    <StackPanel Margin="10">
         <Grid Margin="8,20,8,20">
             
             <hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,-10">
@@ -42,10 +40,9 @@
                             />
                 <Button Content="保存" Click="Confirm_Click" 
                         Command="hc:ControlCommands.Close"
-                        Background="#5BC0DE"
-                            Foreground="White"/>
+                        Style="{StaticResource Btn1}"/>
             </hc:UniformSpacingPanel>
         </Grid>
         <!--<Button Width="22" Height="22" Command="hc:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>-->
-    </hc:SimplePanel>
+    </StackPanel>
 </Border>

+ 17 - 17
Control/Other/IconInfoDialog.xaml

@@ -4,34 +4,35 @@
         xmlns:hc="https://handyorg.github.io/handycontrol"
         CornerRadius="4"
         Width="300"
-        Height="300"
+        Height="340"
+        Style="{StaticResource BorderBG}"
         >
     <Border.Resources>
         <Style x:Key="LeftTB" TargetType="TextBlock" BasedOn="{StaticResource TextBlockBaseStyle}">
             <Setter Property="Width" Value="40"/>
+            <Setter Property="TextAlignment" Value="Center"/>
             <Setter Property="HorizontalAlignment" Value="Left"/>
             <Setter Property="VerticalAlignment" Value="Center"/>
+            <Setter Property="Margin" Value="0,8,0,0"/>
             <Setter Property="FontSize" Value="14"/>
         </Style>
     </Border.Resources>
-    <Border.Background>
-        <SolidColorBrush Color="AliceBlue" Opacity="0.98"/>
-    </Border.Background>
-    <hc:SimplePanel Margin="10">
-        <Grid Margin="8,20,8,20">
-            <hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
+    <hc:SimplePanel Margin="10" VerticalAlignment="Center">
+        <StackPanel>
+            <Button Width="22"  Height="22" Command="hc:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top"/>
+            <hc:UniformSpacingPanel Spacing="10">
                 <TextBlock Text="名称:"  Style="{StaticResource LeftTB}"/>
                 <TextBox x:Name="IconName" Text="{Binding Name, Mode=OneWay}" Width="180" FontSize="14"/>
             </hc:UniformSpacingPanel>
-            <hc:Divider LineStrokeDashArray="3,3" Margin="0,50,0,71" LineStroke="Black" Grid.ColumnSpan="4"/>
-            <hc:UniformSpacingPanel Spacing="10" Margin="0,59,0,-9" Grid.ColumnSpan="4">
+            <hc:Divider LineStrokeDashArray="3,3"  LineStroke="Black"/>
+            <hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
                 <TextBlock  Text="图标:"  Style="{StaticResource LeftTB}"/>
-                <Image x:Name="IconImg" Source="{Binding BitmapImage, Mode=OneWay}" Width="60" Height="60"/>
+                <Image x:Name="IconImg" Source="{Binding BitmapImage, Mode=OneWay}" RenderOptions.BitmapScalingMode="HighQuality" Width="60" Height="60"/>
                 <Button Content="修改" Click="EditImage"/>
                 <Button Content="重置" Click="ReStoreImage"/>
             </hc:UniformSpacingPanel>
-            <hc:Divider LineStrokeDashArray="3,3" Margin="0,128,0,23" LineStroke="Black" Grid.ColumnSpan="4"/>
-            <hc:UniformSpacingPanel Spacing="10" Margin="0,150,0,10" Grid.ColumnSpan="4">
+            <hc:Divider LineStrokeDashArray="3,3"  LineStroke="Black" Grid.ColumnSpan="4"/>
+            <hc:UniformSpacingPanel Spacing="10">
                 <CheckBox x:Name="IconIsAdmin" Content="始终以管理员方式启动" IsChecked="{Binding AdminStartUp, Mode=OneWay}">
                     <CheckBox.Background>
                         <LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
@@ -40,11 +41,10 @@
                     </CheckBox.Background>
                 </CheckBox>
             </hc:UniformSpacingPanel>
-            <hc:Divider LineStrokeDashArray="3,3" Margin="0,200,0,-27" LineStroke="Black" Grid.ColumnSpan="4"/>
-            <hc:UniformSpacingPanel Spacing="10" Margin="0,218,0,-38" Grid.ColumnSpan="4">
-                <Button Content="保存" Click="SaveProperty" Margin="208,6,-208,-10"/>
+            <hc:Divider LineStrokeDashArray="3,3"  LineStroke="Black" Grid.ColumnSpan="4"/>
+            <hc:UniformSpacingPanel Spacing="10"  Grid.ColumnSpan="4">
+                <Button Content="保存" Style="{StaticResource Btn1}" Click="SaveProperty" Margin="208,0,0,0"/>
             </hc:UniformSpacingPanel>
-        </Grid>
-        <Button Width="22"  Height="22" Command="hc:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>
+        </StackPanel>
     </hc:SimplePanel>
 </Border>

+ 17 - 16
Control/Other/IconInfoUrlDialog.xaml

@@ -4,42 +4,43 @@
         xmlns:hc="https://handyorg.github.io/handycontrol"
         CornerRadius="4"
         Width="300"
-        Height="300"
+        Height="340"
+        Style="{StaticResource BorderBG}"
         >
     <Border.Resources>
         <Style x:Key="LeftTB" TargetType="TextBlock" BasedOn="{StaticResource TextBlockBaseStyle}">
             <Setter Property="Width" Value="40"/>
+            <Setter Property="TextAlignment" Value="Center"/>
             <Setter Property="HorizontalAlignment" Value="Left"/>
             <Setter Property="VerticalAlignment" Value="Center"/>
+            <Setter Property="Margin" Value="0,8,0,0"/>
             <Setter Property="FontSize" Value="14"/>
         </Style>
     </Border.Resources>
-    <Border.Background>
-        <SolidColorBrush Color="AliceBlue" Opacity="0.98"/>
-    </Border.Background>
     <hc:SimplePanel Margin="10">
-        <Grid Margin="8,20,8,20">
-            <hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
+        <StackPanel>
+            <Button Width="22"  Height="22" Command="hc:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top"/>
+            
+            <hc:UniformSpacingPanel Spacing="10" VerticalAlignment="Center">
                 <TextBlock Text="名称:"  Style="{StaticResource LeftTB}"/>
                 <TextBox x:Name="IconName" Text="{Binding Name, Mode=OneWay}" Width="180" FontSize="14"/>
             </hc:UniformSpacingPanel>
-            <hc:Divider LineStrokeDashArray="3,3" Margin="0,50,0,71" LineStroke="Black" Grid.ColumnSpan="4"/>
-            <hc:UniformSpacingPanel Spacing="10" Margin="0,77,0,-27">
+            <hc:Divider LineStrokeDashArray="3,3"  LineStroke="Black"/>
+            <hc:UniformSpacingPanel Spacing="10"  VerticalAlignment="Center">
                 <TextBlock  Text="Url:"  Style="{StaticResource LeftTB}"/>
                 <TextBox x:Name="IconUrl" Text="{Binding Path, Mode=OneWay}"  Width="180" FontSize="14"/>
             </hc:UniformSpacingPanel>
-            <hc:Divider LineStrokeDashArray="3,3" Margin="0,128,0,23" LineStroke="Black" Grid.ColumnSpan="4"/>
-            <hc:UniformSpacingPanel Spacing="10" Margin="0,133,0,27">
+            <hc:Divider LineStrokeDashArray="3,3" LineStroke="Black"/>
+            <hc:UniformSpacingPanel Spacing="10"  VerticalAlignment="Center">
                 <TextBlock  Text="图标:"  Style="{StaticResource LeftTB}"/>
-                <Image x:Name="IconImg" Source="{Binding BitmapImage, Mode=OneWay}" Width="60" Height="60"/>
+                <Image x:Name="IconImg" Source="{Binding BitmapImage, Mode=OneWay}" RenderOptions.BitmapScalingMode="HighQuality" Width="60" Height="60"/>
                 <Button Content="修改" Click="EditImage"/>
                 <Button Content="重置" Click="ReStoreImage"/>
             </hc:UniformSpacingPanel>
-            <hc:Divider LineStrokeDashArray="3,3" Margin="0,200,0,-27" LineStroke="Black" Grid.ColumnSpan="4"/>
-            <hc:UniformSpacingPanel Spacing="10" Margin="0,218,0,-38" Grid.ColumnSpan="4">
-                <Button Content="保存" Click="SaveProperty" Margin="208,6,-208,-10"/>
+            <hc:Divider LineStrokeDashArray="3,3" LineStroke="Black"/>
+            <hc:UniformSpacingPanel Spacing="10">
+                <Button Content="保存" Click="SaveProperty" Style="{StaticResource Btn1}" Margin="224,-10,-224,0" />
             </hc:UniformSpacingPanel>
-        </Grid>
-        <Button Width="22"  Height="22" Command="hc:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>
+        </StackPanel>
     </hc:SimplePanel>
 </Border>

+ 15 - 3
Control/UserControls/Config/MotionControl.xaml

@@ -6,13 +6,16 @@
              xmlns:cvt="clr-namespace:GeekDesk.Converts"
              xmlns:hc="https://handyorg.github.io/handycontrol"
              mc:Ignorable="d" 
-             Background="AliceBlue"
+             Background="Transparent"
              d:DesignHeight="300" d:DesignWidth="450">
 
     <UserControl.Resources>
         <cvt:HideTypeConvert x:Key="HideTypeConvert"/>
     </UserControl.Resources>
-    <Grid Background="AliceBlue" MouseDown="DragMove">
+    <Grid Background="Transparent" MouseDown="DragMove" 
+          >
+        <StackPanel Panel.ZIndex="1" hc:Growl.GrowlParent="True" hc:Growl.Token="HotKeyGrowl"></StackPanel>
+
         <StackPanel Margin="10">
             <hc:UniformSpacingPanel Spacing="10"  Grid.ColumnSpan="4">
                 <TextBlock Text="面板动作设置" VerticalAlignment="Center"/>
@@ -37,6 +40,16 @@
                 </CheckBox>
             </hc:UniformSpacingPanel>
 
+            <hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
+                <CheckBox  Content="鼠标中间呼出" Checked="MouseMiddle_Changed" IsChecked="{Binding MouseMiddleShow}">
+                    <CheckBox.Background>
+                        <LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
+                            <GradientStop Color="#FF9EA3A6"/>
+                        </LinearGradientBrush>
+                    </CheckBox.Background>
+                </CheckBox>
+            </hc:UniformSpacingPanel>
+
             <hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
                 <CheckBox  Content="贴边隐藏" IsChecked="{Binding MarginHide}" Checked="MarginHide_Changed" Unchecked="MarginHide_Changed">
                     <CheckBox.Background>
@@ -101,7 +114,6 @@
                         KeyUp="HotKeyUp"
                         />
         </hc:UniformSpacingPanel>
-            <StackPanel hc:Growl.GrowlParent="True" hc:Growl.Token="HotKeyGrowl" VerticalAlignment="Top"/>
         </StackPanel>
     </Grid>
    

+ 46 - 30
Control/UserControls/Config/MotionControl.xaml.cs

@@ -30,7 +30,7 @@ namespace GeekDesk.Control.UserControls.Config
     public partial class MotionControl : UserControl
     {
         public static bool hotkeyFinished = true; //热键设置结束
-        private  KeyEventArgs prevKeyTemp; //上一个按键
+        private Key prevKeyTemp = Key.None; //上一个按键
         private readonly List<KeyEventArgs> keysTemp = new List<KeyEventArgs>();//存储一次快捷键集合
         private readonly AppConfig appConfig = MainWindow.appData.AppConfig;
 
@@ -49,13 +49,19 @@ namespace GeekDesk.Control.UserControls.Config
         {
             string tag = (sender as TextBox).Tag.ToString();
 
+            Key downKey = e.Key;
+            if (downKey == Key.System)
+            {
+                downKey = e.SystemKey;
+            }
+
             bool main = false;
             if ("Main".Equals(tag))
             {
                 main = true;
             }
 
-            if (!e.IsRepeat)
+            if (prevKeyTemp == Key.None || prevKeyTemp!=downKey)
             {
                 if (hotkeyFinished)
                 {
@@ -71,25 +77,24 @@ namespace GeekDesk.Control.UserControls.Config
                         appConfig.ToDoHotkeyModifiers = 0;
                     }
                     hotkeyFinished = false;
-
                 }
                 //首次按下按键
                 if ((main && (appConfig.HotkeyStr == null || appConfig.HotkeyStr.Length == 0)) 
                     || (!main && (appConfig.ToDoHotkeyStr == null || appConfig.ToDoHotkeyStr.Length == 0)))
                 {
-                    if (CheckModifierKeys(e))
+                    if (CheckModifierKeys(downKey))
                     {
                         //辅助键
                         if (main)
                         {
-                            appConfig.HotkeyStr = GetKeyName(e);
-                            appConfig.HotkeyModifiers = GetModifierKeys(e);
+                            appConfig.HotkeyStr = GetKeyName(downKey);
+                            appConfig.HotkeyModifiers = GetModifierKeys(downKey);
                         } else
                         {
-                            appConfig.ToDoHotkeyStr = GetKeyName(e);
-                            appConfig.ToDoHotkeyModifiers = GetModifierKeys(e);
+                            appConfig.ToDoHotkeyStr = GetKeyName(downKey);
+                            appConfig.ToDoHotkeyModifiers = GetModifierKeys(downKey);
                         }
-                        prevKeyTemp = e;
+                        prevKeyTemp = downKey;
                         keysTemp.Add(e);
                     }
                 }
@@ -97,44 +102,43 @@ namespace GeekDesk.Control.UserControls.Config
                 {
                     //非首次按下  需要判断前一个键值是否为辅助键
                     if (CheckModifierKeys(prevKeyTemp)
-                        && ((e.Key >= Key.A && e.Key <= Key.Z)
-                        || (e.Key >= Key.F1 && e.Key <= Key.F12)
-                        || (e.Key >= Key.D0 && e.Key <= Key.D9)))
+                        && ((downKey >= Key.A && downKey <= Key.Z)
+                        || (downKey >= Key.F1 && downKey <= Key.F12)
+                        || (downKey >= Key.D0 && downKey <= Key.D9)))
                     {
                         if (main)
                         {
-                            appConfig.Hotkey = e.Key;
-                            appConfig.HotkeyStr += e.Key.ToString();
+                            appConfig.Hotkey = downKey;
+                            appConfig.HotkeyStr += downKey.ToString();
                         } else
                         {
-                            appConfig.ToDoHotkey = e.Key;
-                            appConfig.ToDoHotkeyStr += e.Key.ToString();
+                            appConfig.ToDoHotkey = downKey;
+                            appConfig.ToDoHotkeyStr += downKey.ToString();
                         }
-                        prevKeyTemp = e;
+                        prevKeyTemp = downKey;
                         keysTemp.Add(e);
                     }
-                    else if (CheckModifierKeys(e))
+                    else if (CheckModifierKeys(downKey))
                     {
                         if (main)
                         {
-                            appConfig.HotkeyStr += GetKeyName(e);
-                            appConfig.HotkeyModifiers |= GetModifierKeys(e);
+                            appConfig.HotkeyStr += GetKeyName(downKey);
+                            appConfig.HotkeyModifiers |= GetModifierKeys(downKey);
                         } else
                         {
-                            appConfig.ToDoHotkeyStr += GetKeyName(e);
-                            appConfig.ToDoHotkeyModifiers |= GetModifierKeys(e);
+                            appConfig.ToDoHotkeyStr += GetKeyName(downKey);
+                            appConfig.ToDoHotkeyModifiers |= GetModifierKeys(downKey);
                         }
                         
-                        prevKeyTemp = e;
+                        prevKeyTemp = downKey;
                         keysTemp.Add(e);
                     }
                 }
             }
         }
 
-        private string GetKeyName(KeyEventArgs e)
+        private string GetKeyName(Key key)
         {
-            Key key = e.Key;
             if (key == Key.LeftCtrl || key == Key.RightCtrl)
             {
                 return "Ctrl + ";
@@ -150,12 +154,10 @@ namespace GeekDesk.Control.UserControls.Config
             {
                 return "Alt + ";
             }
-
         }
 
-        private HotkeyModifiers GetModifierKeys(KeyEventArgs e)
+        private HotkeyModifiers GetModifierKeys(Key key)
         {
-            Key key = e.Key;
             if (key == Key.LeftCtrl || key == Key.RightCtrl)
             {
                 return HotkeyModifiers.MOD_CONTROL;
@@ -174,9 +176,8 @@ namespace GeekDesk.Control.UserControls.Config
             }
         }
 
-        private bool CheckModifierKeys(KeyEventArgs e)
+        private bool CheckModifierKeys(Key key)
         {
-            Key key = e.Key;
             return key == Key.LeftCtrl || key == Key.RightCtrl
                 || key == Key.LWin || key == Key.RWin
                 || key == Key.LeftShift || key == Key.RightShift
@@ -208,6 +209,7 @@ namespace GeekDesk.Control.UserControls.Config
                 if (allKeyUp && !hotkeyFinished)
                 {
                     keysTemp.Clear();
+                    prevKeyTemp = Key.None;
                     hotkeyFinished = true;
 
                     if (main)
@@ -271,5 +273,19 @@ namespace GeekDesk.Control.UserControls.Config
         }
 
 
+        /// <summary>
+        /// 鼠标中键呼出 change
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void MouseMiddle_Changed(object sender, RoutedEventArgs e)
+        {
+     
+        }
+
+        private void HookListener_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
+        {
+            Console.WriteLine(e.KeyChar);
+        }
     }
 }

+ 2 - 2
Control/UserControls/Config/OtherControl.xaml

@@ -7,14 +7,14 @@
              xmlns:local="clr-namespace:GeekDesk.Control.UserControls.PannelCard"
              xmlns:hc="https://handyorg.github.io/handycontrol"
              mc:Ignorable="d" 
-             Background="AliceBlue"
+             Background="Transparent"
              d:DesignHeight="400" d:DesignWidth="500"
              >
 
     <UserControl.Resources>
         <cvt:UpdateTypeConvert x:Key="UpdateTypeConvert"/>
     </UserControl.Resources>
-    <Grid MouseDown="DragMove" Background="AliceBlue">
+    <Grid MouseDown="DragMove" Background="Transparent">
         <hc:SimplePanel Margin="20" >
             <StackPanel >
                 <TextBlock Text="程序设置" />

+ 3 - 2
Control/UserControls/Config/ThemeControl.xaml

@@ -6,12 +6,12 @@
              xmlns:local="clr-namespace:GeekDesk.Control.UserControls.Config"
              xmlns:hc="https://handyorg.github.io/handycontrol"
              mc:Ignorable="d" 
-             Background="AliceBlue"
+             Background="Transparent"
              d:DesignHeight="500" d:DesignWidth="450">
 
 
     <Grid>
-        <Grid  MouseDown="DragMove" Background="AliceBlue">
+        <Grid  MouseDown="DragMove" Background="Transparent">
             <StackPanel Margin="20" >
                 <hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
                     <TextBlock Text="背景图片" VerticalAlignment="Center"/>
@@ -26,6 +26,7 @@
                            hc:Poptip.Placement="TopLeft"
                            />
                     <Button Content="修改" Click="BGButton_Click"/>
+                    <Button Content="默认" Click="DefaultButton_Click"/>
                 </hc:UniformSpacingPanel>
 
                 <hc:UniformSpacingPanel Spacing="10" Margin="20,0,0,0"  Grid.ColumnSpan="4">

+ 19 - 1
Control/UserControls/Config/ThemeControl.xaml.cs

@@ -1,4 +1,5 @@
-using GeekDesk.Util;
+using GeekDesk.Constant;
+using GeekDesk.Util;
 using GeekDesk.ViewModel;
 using Microsoft.Win32;
 using System;
@@ -59,6 +60,23 @@ namespace GeekDesk.Control.UserControls.Config
 
         }
 
+
+        private void DefaultButton_Click(object sender, RoutedEventArgs e)
+        {
+
+            try
+            {
+                appConfig.BitmapImage = ImageUtil.Base64ToBitmapImage(Constants.DEFAULT_BAC_IMAGE_BASE64);
+                appConfig.BacImgName = "系统默认";
+            }
+            catch (Exception)
+            {
+                HandyControl.Controls.Growl.WarningGlobal("修改背景失败,已重置为默认背景!");
+            }
+
+        }
+
+
         private void ColorButton_Click(object sender, RoutedEventArgs e)
         {
             ColorPanel.Visibility = Visibility.Visible;

+ 4 - 3
Control/UserControls/IconFont/IconPannel.xaml

@@ -5,10 +5,11 @@
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:hc="https://handyorg.github.io/handycontrol"
              xmlns:local="clr-namespace:GeekDesk.Control.UserControls.IconFont"
-             mc:Ignorable="d" 
+             mc:Ignorable="d"
+             Background="#00FFFFFF"
              >
-    <WrapPanel  HorizontalAlignment="Center" VerticalAlignment="Top">
-        <ListBox x:Name="IconListBox" ItemsSource="{Binding Iconfonts}" BorderThickness="0" Background="AliceBlue">
+    <WrapPanel  HorizontalAlignment="Center" VerticalAlignment="Top" Background="Transparent">
+        <ListBox x:Name="IconListBox" ItemsSource="{Binding Iconfonts}" BorderThickness="0" Background="Transparent">
             <ListBox.ItemsPanel>
                 <ItemsPanelTemplate>
                     <WrapPanel Orientation="Horizontal" Background="Transparent"/>

+ 6 - 4
Control/UserControls/PannelCard/RightCardControl.xaml

@@ -8,7 +8,9 @@
              xmlns:cvt="clr-namespace:GeekDesk.Converts"
              xmlns:DraggAnimatedPanel="clr-namespace:DraggAnimatedPanel"
              mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800">
+             d:DesignHeight="450" d:DesignWidth="800"
+             
+             >
     <UserControl.Resources>
         <!--右侧栏样式动画-->
         <Style x:Key="ImageStyle" TargetType="Image">
@@ -30,7 +32,6 @@
 
         <cvt:OpcityConvert x:Key="OpcityConvert"/>
     </UserControl.Resources>
-
     <!--右侧栏-->
     <hc:Card AllowDrop="True" 
              Drop="Wrap_Drop" 
@@ -48,7 +49,7 @@
                 <MenuItem Header="添加URL项目" Click="AddUrlIcon"/>
             </ContextMenu>
         </hc:Card.ContextMenu>
-        <WrapPanel Orientation="Horizontal">
+        <WrapPanel Orientation="Horizontal" VirtualizingPanel.VirtualizationMode="Recycling"  VirtualizingPanel.IsVirtualizing="True"  VirtualizingPanel.IsContainerVirtualizable="True">
             <ListBox x:Name="IconListBox" ItemsSource="{Binding AppConfig.SelectedMenuIcons, Mode=TwoWay}" 
                                  BorderThickness="0"
                                  >
@@ -101,7 +102,7 @@
                                         MouseEnter="StackPanel_MouseEnter"
                                         MouseLeave="StackPanel_MouseLeave"
                                         >
-                            <Image Style="{StaticResource ImageStyle}"/>
+                            <Image Style="{StaticResource ImageStyle}"  RenderOptions.BitmapScalingMode="HighQuality"/>
                             <TextBlock MaxWidth="80"
                                        Margin="0,5,0,0"
                                        MaxHeight="40"
@@ -116,6 +117,7 @@
                     </DataTemplate>
                 </ListBox.ItemTemplate>
             </ListBox>
+            
         </WrapPanel>
     </hc:Card>
 </UserControl>

+ 3 - 4
Control/UserControls/PannelCard/RightCardControl.xaml.cs

@@ -253,14 +253,13 @@ namespace GeekDesk.Control.UserControls.PannelCard
             {
                 case IconType.URL:
                     IconInfoUrlDialog urlDialog = new IconInfoUrlDialog(info);
-                    urlDialog.dialog = HandyControl.Controls.Dialog.Show(urlDialog);
+                    urlDialog.dialog = HandyControl.Controls.Dialog.Show(urlDialog, "IconInfoDialog");
                     break;
                 default:
                     IconInfoDialog dialog = new IconInfoDialog(info);
-                    dialog.dialog = HandyControl.Controls.Dialog.Show(dialog);
+                    dialog.dialog = HandyControl.Controls.Dialog.Show(dialog, "IconInfoDialog");
                     break;
             }
-            
         }
 
         private void StackPanel_MouseEnter(object sender, MouseEventArgs e)
@@ -406,7 +405,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
         private void AddUrlIcon(object sender, RoutedEventArgs e)
         {
             IconInfoUrlDialog urlDialog = new IconInfoUrlDialog();
-            urlDialog.dialog = HandyControl.Controls.Dialog.Show(urlDialog);
+            urlDialog.dialog = HandyControl.Controls.Dialog.Show(urlDialog, "IconInfoDialog");
         }
     }
 }

+ 23 - 6
Control/UserControls/ToDo/TodoControl.xaml

@@ -4,13 +4,13 @@
              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:hc="https://handyorg.github.io/handycontrol" xmlns:viewmodel="clr-namespace:GeekDesk.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ToDoInfo}"
              mc:Ignorable="d" 
-             Background="AliceBlue"
+             Background="Transparent"
              >
     
-    <hc:SimplePanel Margin="20">
-        <Grid>
+   <hc:SimplePanel Margin="20" Background="Transparent">
+        <Grid Background="Transparent">
             <DataGrid x:Name="BacklogList" 
                   HeadersVisibility="All"  
                   AutoGenerateColumns="False" 
@@ -26,13 +26,30 @@
                 </DataGrid.ContextMenu>
                 <DataGrid.RowStyle>
                     <Style TargetType="DataGridRow" BasedOn="{StaticResource DataGridRowStyle}">
-                        <EventSetter Event="MouseRightButtonUp" Handler="DataGridRow_MouseRightButtonUp" />
+                        <EventSetter Event="MouseRightButtonDown" Handler="DataGridRow_MouseRightButtonDown" />
+                        <EventSetter Event="Selected" Handler="DataGridRow_Selected"/>
+                        <Setter Property="Background" Value="White"/>
+                        <Style.Triggers>
+                            <Trigger Property="IsSelected" Value="True">
+                                <Setter Property="Background" Value="#5BC0DE"/>
+                            </Trigger>
+                            <Trigger Property="IsSelected" Value="False">
+                                <Setter Property="Background" Value="White"/>
+                            </Trigger>
+                        </Style.Triggers>
                     </Style>
                 </DataGrid.RowStyle>
 
                 <DataGrid.CellStyle>
                     <Style TargetType="DataGridCell" BasedOn="{StaticResource DataGridCellStyle}">
                         <Setter Property="HorizontalContentAlignment" Value="Center"/>
+                        <Setter Property="Background" Value="Transparent"/>
+                        <Style.Triggers>
+                            <Trigger Property="IsSelected" Value="True">
+                                <Setter Property="Background" Value="Transparent"/>
+                                <Setter Property="Foreground" Value="Black"/>
+                            </Trigger>
+                        </Style.Triggers>
                     </Style>
                 </DataGrid.CellStyle>
                 <DataGrid.ColumnHeaderStyle>
@@ -42,7 +59,7 @@
                 </DataGrid.ColumnHeaderStyle>
 
                 <DataGrid.Background>
-                    <SolidColorBrush Color="AliceBlue"/>
+                    <SolidColorBrush Color="Transparent"/>
                 </DataGrid.Background>
                 <DataGrid.Columns>
                     <DataGridTextColumn Width="120" Binding="{Binding Title}" Header="待办任务"/>

+ 21 - 3
Control/UserControls/ToDo/TodoControl.xaml.cs

@@ -73,13 +73,31 @@ namespace GeekDesk.Control.UserControls.Backlog
             BacklogList.ContextMenu = null;
         }
 
-
-        private void DataGridRow_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
+        /// <summary>
+        /// 打开右键菜单
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void DataGridRow_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
         {
             BacklogList.SelectedIndex = ((DataGridRow)sender).GetIndex();
             Menu.IsOpen = true;
         }
 
-
+        /// <summary>
+        /// 选中时颜色变化
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void DataGridRow_Selected(object sender, RoutedEventArgs e)
+        {
+            Color c = Color.FromRgb(91, 192, 222);
+            SolidColorBrush b = new SolidColorBrush
+            {
+                Color = c,
+                Opacity = 0.9
+            };
+            ((DataGridRow)sender).Background = b;
+        }
     }
 }

+ 58 - 76
Control/Windows/ConfigWindow.xaml

@@ -8,63 +8,44 @@
            Title="Setting"
            mc:Ignorable="d"
            WindowStartupLocation="CenterScreen"
-           Height="450" 
-           Width="600" 
+           Height="550" 
+           Width="750" 
            WindowStyle="None"
+           ResizeMode="NoResize"
            AllowsTransparency="True"
-           Background="Transparent" ShowInTaskbar="False"
+           Background="#00FFFFFF" ShowInTaskbar="False"
+           BorderThickness="0"
            >
 
-    <Window.Resources>
-        <Style x:Key="MenuStyle" TargetType="hc:SideMenuItem" BasedOn="{StaticResource SideMenuItemBaseStyle}">
-            <Style.Setters>
-                <Setter Property="Background" Value="Transparent"/>
-            </Style.Setters>
-            <Style.Triggers>
-                <Trigger Property="IsMouseOver" Value="True">
-                    <Setter Property="Background" Value="Transparent"/>
-                </Trigger>
-                <Trigger Property="IsSelected" Value="True">
-                    <Setter Property="Background" Value="Transparent"/>
-                </Trigger>
-            </Style.Triggers>
-        </Style>
-    </Window.Resources>
-    <Border CornerRadius="8" BorderThickness="0">
-        <Border.Background>
-            <!--<SolidColorBrush Color="AliceBlue" Opacity="0.9"/>-->
-            <LinearGradientBrush>
-                <GradientStop Color="#009A98" Offset="0"/>
-                <GradientStop Color="#00CA68" Offset="1"/>
-            </LinearGradientBrush>
-        </Border.Background>
-        <Grid Background="Transparent" MouseDown="DragMove">
-            <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
-            </Grid.RowDefinitions>
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="140"/>
-                <ColumnDefinition Width="*"/>
-            </Grid.ColumnDefinitions>
+    <Grid Margin="30">
+        <Grid.Effect>
+            <DropShadowEffect BlurRadius="20" Direction="-90" Color="Gray"
+                              RenderingBias="Quality" ShadowDepth="2"/>
+        </Grid.Effect>
+        <Border Style="{StaticResource BorderBG}">
+            <Grid Background="Transparent">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="*"/>
+                </Grid.RowDefinitions>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="140"/>
+                    <ColumnDefinition Width="*"/>
+                </Grid.ColumnDefinitions>
 
-            <hc:Card Grid.Row="0" Grid.Column="0" Background="Transparent" BorderThickness="0">
-                <hc:SideMenu BorderThickness="0" 
-                             AutoSelect="True" 
-                             >
-                    <hc:SideMenu.Background>
-                        <SolidColorBrush Color="#00FFFFFF"/>
-                    </hc:SideMenu.Background>
-                    <hc:SideMenu.ItemContainerStyle>
-                        <Style TargetType="hc:SideMenuItem" BasedOn="{StaticResource MenuStyle}"/>
-                    </hc:SideMenu.ItemContainerStyle>
-                    
-                    <hc:SideMenuItem Header="关于"
+                <hc:Card Grid.Row="0" Grid.Column="0" Background="Transparent" BorderThickness="0">
+
+                    <hc:SideMenu AutoSelect="True" Background="Transparent" Margin="1,7,0,3">
+                        <hc:SideMenu.ItemContainerStyle>
+                            <Style TargetType="hc:SideMenuItem" BasedOn="{StaticResource MyMenuStyle}"/>
+                        </hc:SideMenu.ItemContainerStyle>
+
+                        <hc:SideMenuItem Header="关于"
                                      IsSelected="True"
                                      Selected="MemuClick"
                                      Tag="About"
                                      >
-                        <hc:SideMenuItem.Icon>
-                            <Button Background="Transparent" 
+                            <hc:SideMenuItem.Icon>
+                                <Button Background="Transparent" 
                                     IsEnabled="False"
                                     Opacity="0.9"
                                     BorderThickness="0"
@@ -73,13 +54,13 @@
                                     hc:IconElement.Width="18"
                                     HorizontalAlignment="Right"
                                     />
-                        </hc:SideMenuItem.Icon>
-                    </hc:SideMenuItem>
-                    <hc:SideMenuItem Header="显示设置"
+                            </hc:SideMenuItem.Icon>
+                        </hc:SideMenuItem>
+                        <hc:SideMenuItem Header="显示设置"
                                      Tag="Theme"
                                      Selected="MemuClick">
-                        <hc:SideMenuItem.Icon>
-                            <Button Background="Transparent" 
+                            <hc:SideMenuItem.Icon>
+                                <Button Background="Transparent" 
                                     IsEnabled="False"
                                     Opacity="1"
                             BorderThickness="0"
@@ -88,14 +69,14 @@
                             hc:IconElement.Width="18"
                             HorizontalAlignment="Right"
                             />
-                        </hc:SideMenuItem.Icon>
-                    </hc:SideMenuItem>
+                            </hc:SideMenuItem.Icon>
+                        </hc:SideMenuItem>
 
-                    <hc:SideMenuItem Header="动作"
+                        <hc:SideMenuItem Header="动作"
                                      Tag="Motion"
                                      Selected="MemuClick">
-                        <hc:SideMenuItem.Icon>
-                            <Button Background="Transparent" 
+                            <hc:SideMenuItem.Icon>
+                                <Button Background="Transparent" 
                                     IsEnabled="False"
                                     Opacity="1"
                             BorderThickness="0"
@@ -104,13 +85,13 @@
                             hc:IconElement.Width="18"
                             HorizontalAlignment="Right"
                             />
-                        </hc:SideMenuItem.Icon>
-                    </hc:SideMenuItem>
-                    <hc:SideMenuItem Header="其它"
+                            </hc:SideMenuItem.Icon>
+                        </hc:SideMenuItem>
+                        <hc:SideMenuItem Header="其它"
                                      Tag="Other"
                                      Selected="MemuClick">
-                        <hc:SideMenuItem.Icon>
-                            <Button Background="Transparent" 
+                            <hc:SideMenuItem.Icon>
+                                <Button Background="Transparent" 
                                     IsEnabled="False"
                                     Opacity="1"
                             BorderThickness="0"
@@ -119,20 +100,21 @@
                             hc:IconElement.Width="18"
                             HorizontalAlignment="Right"
                             />
-                        </hc:SideMenuItem.Icon>
-                    </hc:SideMenuItem>
-                </hc:SideMenu>
-            </hc:Card>
-            <hc:ScrollViewer  Grid.Row="0" Grid.Column="1" BorderThickness="0">
-                <hc:Card x:Name="RightCard" Height="480" BorderThickness="0">
-                    <hc:Card.Background>
-                        <SolidColorBrush  Opacity="0"/>
-                    </hc:Card.Background>
+                            </hc:SideMenuItem.Icon>
+                        </hc:SideMenuItem>
+                    </hc:SideMenu>
                 </hc:Card>
-            </hc:ScrollViewer>
+                <hc:ScrollViewer  Grid.Row="0" Grid.Column="1" BorderThickness="0" Margin="0,5,1,5">
+                    <hc:Card x:Name="RightCard" Height="480" BorderThickness="0"  MouseDown="DragMove">
+                        <hc:Card.Background>
+                            <SolidColorBrush  Opacity="0"/>
+                        </hc:Card.Background>
+                    </hc:Card>
+                </hc:ScrollViewer>
 
-            <Button Width="22" Height="22" Click="Close_Button_Click" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" Grid.Column="1"/>
-        </Grid>
-    </Border>
+                <Button Width="22" Height="22" Click="Close_Button_Click" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" Grid.Column="1"/>
+            </Grid>
+        </Border>
+    </Grid>
 
 </hc:Window>

+ 3 - 0
Control/Windows/ConfigWindow.xaml.cs

@@ -1,6 +1,8 @@
 
+using GeekDesk.Constant;
 using GeekDesk.Control.UserControls;
 using GeekDesk.Control.UserControls.Config;
+using GeekDesk.Util;
 using GeekDesk.ViewModel;
 using HandyControl.Controls;
 using HandyControl.Data;
@@ -24,6 +26,7 @@ namespace GeekDesk.Control.Windows
         private ConfigWindow(AppConfig appConfig, MainWindow mainWindow)
         {
             InitializeComponent();
+            //BG.Source = ImageUtil.Base64ToBitmapImage(Constants.DEFAULT_BAC_IMAGE_BASE64);
             this.DataContext = appConfig;
             RightCard.Content = about;
             this.Topmost = true;

+ 62 - 32
Control/Windows/IconfontWindow.xaml

@@ -8,46 +8,76 @@
         xmlns:uc="clr-namespace:GeekDesk.Control.UserControls.IconFont"
         mc:Ignorable="d"
         Title="Svg"
-        Height="450" Width="600"
+        Height="520" Width="700"
         WindowStyle="None"
+        ResizeMode="NoResize"
         AllowsTransparency="True"
-        Background="AliceBlue"
-        MouseDown="DragMove"
+        Background="Transparent" ShowInTaskbar="False"
+        BorderThickness="0"
         >
 
     <Window.Resources>
-        <Style x:Key="LeftTB" TargetType="TextBlock" BasedOn="{StaticResource TextBlockBaseStyle}">
-            <Setter Property="Width" Value="80"/>
-            <Setter Property="HorizontalAlignment" Value="Left"/>
-            <Setter Property="VerticalAlignment" Value="Center"/>
-            <Setter Property="FontSize" Value="11"/>
+        <Style x:Key="HcTabControl" TargetType="hc:TabControl" BasedOn="{StaticResource TabControlInLine}">
+            <Style.Setters>
+                <Setter Property="Background" Value="Transparent"/>
+            </Style.Setters>
+        </Style>
+
+        <Style x:Key="TabTitle" TargetType="hc:TabItem" BasedOn="{StaticResource TabItemInLine}">
+            <Style.Setters>
+                <Setter Property="Background">
+                    <Setter.Value>
+                        <SolidColorBrush Color="White" Opacity="0.68"/>
+                    </Setter.Value>
+                </Setter>
+            </Style.Setters>
         </Style>
     </Window.Resources>
 
+    <Grid Margin="20">
+        <Grid.Effect>
+            <DropShadowEffect BlurRadius="30" Direction="-90" Color="Gray"
+                              RenderingBias="Quality" ShadowDepth="2"/>
+        </Grid.Effect>
+        <Border MouseDown="DragMove" Style="{StaticResource BorderBG}">
+            <!--<Border.Background>
+                --><!--<SolidColorBrush Color="AliceBlue" Opacity="0.9"/>--><!--
+                <LinearGradientBrush Opacity="0.97">
+                    <GradientStop Color="#D1F0A4" Offset="0"/>
+                    <GradientStop Color="#97D282" Offset="1"/>
+                </LinearGradientBrush>
+            </Border.Background>-->
+            <Grid MouseDown="DragMove">
+                <TextBox x:Name="CheckSettingUrl" Visibility="Collapsed" Text="{Binding IsSettingUrl}" TextChanged="CheckSettingUrl_TextChanged"/>
+                <hc:TabControl x:Name="MyTabControl" 
+                               IsAnimationEnabled="True" 
+                               SelectionChanged="TabControl_SelectionChanged" 
+                               ShowContextMenu="True"  
+                               IsTabFillEnabled="True" 
+                               Margin="20,30,20,20" 
+                               Height="350" 
+                               VerticalAlignment="Top"
+                               Style="{StaticResource HcTabControl}">
+                    <hc:TabItem Tag="System"  IsSelected="True" Header="系统图标" hc:IconElement.Height="16" hc:IconElement.Width="16" hc:IconElement.Geometry="{StaticResource SystemIcon}" Style="{StaticResource TabTitle}">
+                        <hc:SimplePanel>
+                            <uc:IconPannel x:Name="SystemIcon"/>
+                        </hc:SimplePanel>
+                    </hc:TabItem>
+                    <hc:TabItem Tag="Custom" Header="自定义图标" hc:IconElement.Height="16" hc:IconElement.Width="16" hc:IconElement.Geometry="{StaticResource CustomIcon}" Style="{StaticResource TabTitle}">
+                        <hc:SimplePanel>
+                            <uc:IconPannel x:Name="CustomIcon"/>
+                            <hc:LoadingCircle x:Name="LoadingEle"/>
+                        </hc:SimplePanel>
+                    </hc:TabItem>
+                </hc:TabControl>
+
+
+                <Button Content="取消" Click="Close_Click" Margin="391,397.5,163,22.5"/>
+                <Button Content="自定义设置" Click="CustomButton_Click" IsEnabled="False" Name="CustomButton" Style="{StaticResource Btn1}" Margin="447,397.5,71,22.5"/>
+                <Button Content="确定" Click="Confirm_Click" Style="{StaticResource Btn1}" Margin="534,397.5,20,22.5" />
+            </Grid>
+        </Border>
+    </Grid>
 
-    <Border MouseDown="DragMove">
-        <Grid MouseDown="DragMove">
-            <TextBox x:Name="CheckSettingUrl" Visibility="Collapsed" Text="{Binding IsSettingUrl}" TextChanged="CheckSettingUrl_TextChanged"/>
-            <hc:TabControl x:Name="MyTabControl" IsAnimationEnabled="True" SelectionChanged="TabControl_SelectionChanged" ShowContextMenu="True"  IsTabFillEnabled="True" Margin="20,30,20,20" Height="350" VerticalAlignment="Top">
-                <hc:TabItem Tag="System"  IsSelected="True" Header="系统图标" hc:IconElement.Height="16" hc:IconElement.Width="16" hc:IconElement.Geometry="{StaticResource SystemIcon}" >
-                    <hc:SimplePanel Background="AliceBlue">
-                        <uc:IconPannel x:Name="SystemIcon"/>
-                    </hc:SimplePanel>
-                </hc:TabItem>
-                <hc:TabItem Tag="Custom" Header="自定义图标" hc:IconElement.Height="16" hc:IconElement.Width="16" hc:IconElement.Geometry="{StaticResource CustomIcon}">
-                    <hc:SimplePanel Background="AliceBlue">
-                        <uc:IconPannel x:Name="CustomIcon"/>
-                        <hc:LoadingCircle x:Name="LoadingEle"/>
-                    </hc:SimplePanel>
-                </hc:TabItem>
-            </hc:TabControl>
 
-            
-            <Button Content="取消" Click="Close_Click" Margin="391,397.5,163,22.5"/>
-            <Button Content="自定义设置" Click="CustomButton_Click" IsEnabled="False" Name="CustomButton" Background="#5BC0DE" Foreground="White"  RenderTransformOrigin="-0.868,0.583" Margin="447,397.5,71,22.5"/>
-            <Button Content="确定" Click="Confirm_Click" Background="#5BC0DE" Foreground="White" Margin="534,397.5,20,22.5" RenderTransformOrigin="0.696,0.45"/>
-        </Grid>
-    </Border>
-    
-    
 </Window>

+ 1 - 1
Control/Windows/IconfontWindow.xaml.cs

@@ -132,7 +132,7 @@ namespace GeekDesk.Control.Windows
                 window = new IconfontWindow(listInfo, menuInfo);
             }
             window.Show();
-            ShowWindowFollowMouse.Show(window, MousePosition.LEFT_CENTER, 0, 0);
+            ShowWindowFollowMouse.Show(window, MousePosition.LEFT_CENTER, 0, 0, false);
         }
 
         private void CustomButton_Click(object sender, RoutedEventArgs e)

+ 62 - 60
Control/Windows/ToDoInfoWindow.xaml

@@ -8,9 +8,8 @@
            xmlns:local="clr-namespace:GeekDesk"
            mc:Ignorable="d"
            WindowStartupLocation="CenterScreen"
-           Height="700" 
-           Width="450" 
-           Title="TaskInfo"
+           Height="450" 
+           Width="510" 
            WindowStyle="None"
            AllowsTransparency="True"
            Background="Transparent" ShowInTaskbar="False"
@@ -18,81 +17,84 @@
     <Window.Resources>
         <cvt:TodoTaskExecConvert x:Key="TodoTaskExecConvert"/>
     </Window.Resources>
-    <Border CornerRadius="3" BorderThickness="2" BorderBrush="Black" Margin="0,0,0,313.323"  MouseDown="DragMove">
-        <Border.Background>
-            <SolidColorBrush Color="AliceBlue"/>
-        </Border.Background>
-        <Border.Resources>
-            <Style x:Key="LeftTB" TargetType="TextBlock" BasedOn="{StaticResource TextBlockBaseStyle}">
-                <Setter Property="Width" Value="67"/>
-                <Setter Property="HorizontalAlignment" Value="Left"/>
-                <Setter Property="VerticalAlignment" Value="Center"/>
-                <Setter Property="TextAlignment" Value="Center"/>
-                <Setter Property="FontSize" Value="14"/>
-            </Style>
-        </Border.Resources>
-        <Grid Margin="0,0,0,8">
-            <StackPanel Margin="20" HorizontalAlignment="Center">
-                <hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
-                    <WrapPanel VerticalAlignment="Center">
-                        <TextBlock Text="待办任务:"  Style="{StaticResource LeftTB}"/>
-                        <TextBlock Text="*" Foreground="Red" />
-                    </WrapPanel>
-                    <TextBox x:Name="Title" Width="290" Text="{Binding Title, Mode=OneWay}" FontSize="14" />
-                </hc:UniformSpacingPanel>
 
-                <hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
-                    <TextBlock Text="待办详情:"  Style="{StaticResource LeftTB}"/>
-                    <TextBox x:Name="Msg" TextWrapping="Wrap"
+    <Grid Margin="20">
+        <Grid.Effect>
+            <DropShadowEffect BlurRadius="20" Direction="-90" Color="Gray"
+                              RenderingBias="Quality" ShadowDepth="2"/>
+        </Grid.Effect>
+        <Border Style="{StaticResource BorderBG}"  MouseDown="DragMove">
+            <Border.Resources>
+                <Style x:Key="LeftTB" TargetType="TextBlock" BasedOn="{StaticResource TextBlockBaseStyle}">
+                    <Setter Property="Width" Value="67"/>
+                    <Setter Property="HorizontalAlignment" Value="Left"/>
+                    <Setter Property="VerticalAlignment" Value="Center"/>
+                    <Setter Property="TextAlignment" Value="Center"/>
+                    <Setter Property="FontSize" Value="14"/>
+                </Style>
+            </Border.Resources>
+            <Grid Margin="0,15,0,0">
+                <StackPanel Margin="20" HorizontalAlignment="Center">
+                    <hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
+                        <WrapPanel VerticalAlignment="Center">
+                            <TextBlock Text="待办任务:"  Style="{StaticResource LeftTB}"/>
+                            <TextBlock Text="*" Foreground="Red" />
+                        </WrapPanel>
+                        <TextBox x:Name="Title" Width="290" Text="{Binding Title, Mode=OneWay}" FontSize="14" />
+                    </hc:UniformSpacingPanel>
+
+                    <hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
+                        <TextBlock Text="待办详情:"  Style="{StaticResource LeftTB}"/>
+                        <TextBox x:Name="Msg" TextWrapping="Wrap"
                              Margin="5,0,0,0"
                              Text="{Binding Msg, Mode=OneWay}"
                              AcceptsReturn="True"
                              VerticalScrollBarVisibility="Visible" 
                              Height="100" MaxHeight="150"  MinHeight="100" Width="290" MinWidth="290" 
                              VerticalAlignment="Center" HorizontalAlignment="Center"/>
-                </hc:UniformSpacingPanel>
+                    </hc:UniformSpacingPanel>
 
-                <hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
-                    <TextBlock Text="运行方式:"  Style="{StaticResource LeftTB}"/>
-                    <RadioButton Margin="10,0,0,0" Checked="ExecType_Checked" Tag="1" Background="{DynamicResource SecondaryRegionBrush}" 
+                    <hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
+                        <TextBlock Text="运行方式:"  Style="{StaticResource LeftTB}"/>
+                        <RadioButton Margin="10,0,0,0" Checked="ExecType_Checked" Tag="1" Background="{DynamicResource SecondaryRegionBrush}" 
                          Style="{StaticResource RadioButtonIcon}" Content="指定时间"
                          IsChecked="{Binding ExecType, Mode=OneWay, Converter={StaticResource TodoTaskExecConvert}, ConverterParameter=1}"/>
-                    <RadioButton Margin="10,0,0,0" Checked="ExecType_Checked" Background="{DynamicResource SecondaryRegionBrush}"  Tag="2"
+                        <RadioButton Margin="10,0,0,0" Checked="ExecType_Checked" Background="{DynamicResource SecondaryRegionBrush}"  Tag="2"
                          Style="{StaticResource RadioButtonIcon}" Content="CRON表达式"
                          IsChecked="{Binding ExecType, Mode=OneWay, Converter={StaticResource TodoTaskExecConvert}, ConverterParameter=2}"/>
-                </hc:UniformSpacingPanel>
+                    </hc:UniformSpacingPanel>
 
-                <hc:UniformSpacingPanel x:Name="SetTimePanel" Visibility="Visible" Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
-                    <TextBlock Text="指定时间:"  Style="{StaticResource LeftTB}"/>
-                    <TextBlock Text="*" Foreground="Red" Margin="-10,0,0,0"/>
-                    <hc:DateTimePicker x:Name="ExeTime" Text="{Binding ExeTime, Mode=OneWay}" ErrorStr="Error!"  Width="200" Margin="-5.2,0,0,0"/>
-                </hc:UniformSpacingPanel>
+                    <hc:UniformSpacingPanel x:Name="SetTimePanel" Visibility="Visible" Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
+                        <TextBlock Text="指定时间:"  Style="{StaticResource LeftTB}"/>
+                        <TextBlock Text="*" Foreground="Red" Margin="-10,0,0,0"/>
+                        <hc:DateTimePicker x:Name="ExeTime" Text="{Binding ExeTime, Mode=OneWay}" ErrorStr="Error!"  Width="200" Margin="-5.2,0,0,0"/>
+                    </hc:UniformSpacingPanel>
 
-                <hc:UniformSpacingPanel x:Name="CronPanel" Visibility="Collapsed" Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
-                    <WrapPanel VerticalAlignment="Center">
-                        <TextBlock Text="CRON:"  Style="{StaticResource LeftTB}"/>
-                        <TextBlock Text="*" Foreground="Red" />
-                    </WrapPanel>
-                    <TextBox x:Name="Cron" Width="290" Text="{Binding Cron, Mode=OneWay}" FontSize="14" />
-                </hc:UniformSpacingPanel>
+                    <hc:UniformSpacingPanel x:Name="CronPanel" Visibility="Collapsed" Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
+                        <WrapPanel VerticalAlignment="Center">
+                            <TextBlock Text="CRON:"  Style="{StaticResource LeftTB}"/>
+                            <TextBlock Text="*" Foreground="Red" />
+                        </WrapPanel>
+                        <TextBox x:Name="Cron" Width="290" Text="{Binding Cron, Mode=OneWay}" FontSize="14" />
+                    </hc:UniformSpacingPanel>
 
 
 
-                <hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
-                    <TextBlock Text="完成时间:"  Style="{StaticResource LeftTB}"/>
-                    <TextBlock x:Name="DoneTime" Text="{Binding DoneTime, Mode=OneWay}" Width="200"/>
-                </hc:UniformSpacingPanel>
+                    <hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
+                        <TextBlock Text="完成时间:"  Style="{StaticResource LeftTB}"/>
+                        <TextBlock x:Name="DoneTime" Text="{Binding DoneTime, Mode=OneWay}" Width="200"/>
+                    </hc:UniformSpacingPanel>
 
 
-                <hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4">
-                    <Button Content="保存" Background="#5BC0DE"
-                            Foreground="White" Margin="320,6,-208,-10"
+                    <hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4">
+                        <Button Content="保存" Style="{StaticResource Btn1}" Margin="320,6,-208,-10"
                             Click="Save_Button_Click"/>
-                </hc:UniformSpacingPanel>
-            </StackPanel>
-            <Button Panel.ZIndex="2" Width="22" Height="22" Click="Close_Button_Click" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0"/>
-            <StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,0"/>
-        </Grid>
-        
-    </Border>
+                    </hc:UniformSpacingPanel>
+                </StackPanel>
+                <Button Panel.ZIndex="2" Width="22" Height="22" Click="Close_Button_Click" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0"/>
+                <StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,0"/>
+            </Grid>
+
+        </Border>
+    </Grid>
 </Window>

+ 45 - 56
Control/Windows/ToDoWindow.xaml

@@ -7,60 +7,48 @@
            xmlns:local="clr-namespace:GeekDesk"
            mc:Ignorable="d"
            WindowStartupLocation="CenterScreen"
-           Height="450" 
-           Width="850" 
+           Height="550" 
+           Width="1000" 
            Title="Task"
            WindowStyle="None"
            AllowsTransparency="True"
            Background="Transparent" ShowInTaskbar="False"
         >
-    <Window.Resources>
-        <Style x:Key="MenuStyle" TargetType="hc:SideMenuItem" BasedOn="{StaticResource SideMenuItemBaseStyle}">
-            <Style.Setters>
-                <Setter Property="Background" Value="AliceBlue"/>
-            </Style.Setters>
-            <Style.Triggers>
-                <Trigger Property="IsMouseOver" Value="True">
-                    <Setter Property="Background" Value="#FFE2E2E2"/>
-                </Trigger>
-                <Trigger Property="IsSelected" Value="True">
-                    <Setter Property="Background" Value="#FFDAD7D7"/>
-                </Trigger>
-            </Style.Triggers>
-        </Style>
-    </Window.Resources>
-    <Border CornerRadius="4" BorderThickness="0">
-        <Border.Background>
-            <SolidColorBrush Color="AliceBlue" Opacity="0.9"/>
-        </Border.Background>
-        <Grid>
-            <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
-            </Grid.RowDefinitions>
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="140"/>
-                <ColumnDefinition Width="*"/>
-            </Grid.ColumnDefinitions>
 
-            <hc:Card Grid.Row="0" Grid.Column="0">
-                <hc:SideMenu BorderThickness="1" 
+    <Grid Margin="50">
+        <Grid.Effect>
+            <DropShadowEffect BlurRadius="20" Direction="-90" Color="Gray"
+                              RenderingBias="Quality" ShadowDepth="2"/>
+        </Grid.Effect>
+
+        <Border Style="{StaticResource BorderBG}">
+            <Grid>
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="*"/>
+                </Grid.RowDefinitions>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="140"/>
+                    <ColumnDefinition Width="*"/>
+                </Grid.ColumnDefinitions>
+
+                <hc:Card Grid.Row="0" Grid.Column="0" Background="Transparent" BorderThickness="0">
+                    <hc:SideMenu BorderThickness="0" 
                              AutoSelect="True" 
+                             Background="Transparent"
+                             Margin="5"
                              >
-                    <hc:SideMenu.Background>
-                        <SolidColorBrush Color="AliceBlue"/>
-                    </hc:SideMenu.Background>
 
-                    <hc:SideMenu.ItemContainerStyle>
-                        <Style TargetType="hc:SideMenuItem" BasedOn="{StaticResource MenuStyle}"/>
-                    </hc:SideMenu.ItemContainerStyle>
+                        <hc:SideMenu.ItemContainerStyle>
+                            <Style TargetType="hc:SideMenuItem" BasedOn="{StaticResource MyMenuStyle}"/>
+                        </hc:SideMenu.ItemContainerStyle>
 
-                    <hc:SideMenuItem Header="待办列表"
+                        <hc:SideMenuItem Header="待办列表"
                                      IsSelected="True"
                                      Selected="MemuClick"
                                      Tag="ExeList"
                                      >
-                        <hc:SideMenuItem.Icon>
-                            <Button Background="Transparent" 
+                            <hc:SideMenuItem.Icon>
+                                <Button Background="Transparent" 
                                     IsEnabled="False"
                                     Opacity="1"
                             BorderThickness="0"
@@ -69,13 +57,13 @@
                             hc:IconElement.Width="18"
                             HorizontalAlignment="Right"
                             />
-                        </hc:SideMenuItem.Icon>
-                    </hc:SideMenuItem>
-                    <hc:SideMenuItem Header="历史待办"
+                            </hc:SideMenuItem.Icon>
+                        </hc:SideMenuItem>
+                        <hc:SideMenuItem Header="历史待办"
                                      Tag="History"
                                      Selected="MemuClick">
-                        <hc:SideMenuItem.Icon>
-                            <Button Background="Transparent" 
+                            <hc:SideMenuItem.Icon>
+                                <Button Background="Transparent" 
                                     IsEnabled="False"
                                     Opacity="1"
                             BorderThickness="0"
@@ -84,21 +72,22 @@
                             hc:IconElement.Width="18"
                             HorizontalAlignment="Right"
                             />
-                        </hc:SideMenuItem.Icon>
-                    </hc:SideMenuItem>
-                </hc:SideMenu>
-            </hc:Card>
-            <hc:Card Grid.Row="0" Grid.Column="1" x:Name="RightCard" Height="450"  MouseDown="DragMove" />
+                            </hc:SideMenuItem.Icon>
+                        </hc:SideMenuItem>
+                    </hc:SideMenu>
+                </hc:Card>
+                <hc:Card Grid.Row="0" MouseDown="DragMove" Background="Transparent" BorderThickness="0" Grid.Column="1" x:Name="RightCard" Height="450">
+                </hc:Card>
 
 
-            <Button Width="22" Height="22" Click="Close_Button_Click" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" Grid.Column="1"/>
-            <Button Content="新建待办"
+                <Button Width="22" Height="22" Click="Close_Button_Click" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" Grid.Column="1"/>
+                <Button Content="新建待办"
                     Panel.ZIndex="1"
-                    Background="#5BC0DE"
-                    Foreground="White"
+                    Style="{StaticResource Btn1}"
                     Grid.Column="1"
                     Margin="590.01,29,10,384"
                     Click="CreateBacklog_BtnClick"/>
-        </Grid>
-    </Border>
+            </Grid>
+        </Border>
+    </Grid>
 </Window>

+ 2 - 0
Control/Windows/ToDoWindow.xaml.cs

@@ -85,7 +85,9 @@ namespace GeekDesk.Control.Windows
 
 
         private static System.Windows.Window window = null;
+#pragma warning disable CS0108 // “ToDoWindow.Show()”隐藏继承的成员“Window.Show()”。如果是有意隐藏,请使用关键字 new。
         public static void Show()
+#pragma warning restore CS0108 // “ToDoWindow.Show()”隐藏继承的成员“Window.Show()”。如果是有意隐藏,请使用关键字 new。
         {
             if (window == null || !window.Activate())
             {

+ 38 - 28
Control/Windows/UpdateWindow.xaml

@@ -6,39 +6,49 @@
         xmlns:local="clr-namespace:GeekDesk.Control.Windows"
         xmlns:hc="https://handyorg.github.io/handycontrol"
         mc:Ignorable="d"
-        Title="UpdateWindow" Height="300" Width="450"
+        Height="460" Width="610"
         WindowStyle="None"
         AllowsTransparency="True"
         Background="Transparent" ShowInTaskbar="False">
-    <Border CornerRadius="4" Background="AliceBlue" BorderThickness="1" BorderBrush="Green" MouseDown="DragMove">
-        <StackPanel HorizontalAlignment="Center">
-            <hc:Card BorderThickness="0" Effect="{DynamicResource EffectShadow2}" Margin="20,20,20,0">
-                <!--Card 的内容部分-->
-                <Border CornerRadius="4,4,0,0" Height="160">
-                    <StackPanel>
-                        <TextBlock Margin="10" x:Name="MsgTitle" TextWrapping="Wrap" FontSize="16" HorizontalAlignment="Left" Style="{DynamicResource TextBlockLargeBold}" Text="测试"/>
-                        <TextBlock Margin="15" x:Name="Msg" TextWrapping="Wrap" VerticalAlignment="Center" Text=""/>
-                    </StackPanel>
-                </Border>
-                <!--Card 的尾部部分-->
-                <hc:Card.Footer>
-                    <StackPanel Margin="10" Width="420">
-                        <!--Card 的一级内容-->
-                        <TextBlock TextWrapping="NoWrap" x:Name="Title"  Style="{DynamicResource TextBlockLargeBold}" TextTrimming="CharacterEllipsis" 
+    <Grid Margin="20">
+        <Grid.Effect>
+            <DropShadowEffect BlurRadius="30" Direction="-90" Color="Gray"
+                              RenderingBias="Quality" ShadowDepth="2"/>
+        </Grid.Effect>
+        <Border CornerRadius="4" Background="White" BorderThickness="0" MouseDown="DragMove">
+            <StackPanel HorizontalAlignment="Center">
+                <hc:Card BorderThickness="0" Effect="{DynamicResource EffectShadow2}" Margin="20,20,20,0">
+                    <!--Card 的内容部分-->
+                    <Border CornerRadius="4,4,0,0" Height="260">
+                        <StackPanel>
+                            <TextBlock Margin="10" x:Name="MsgTitle" TextWrapping="Wrap" FontSize="16" HorizontalAlignment="Left" Style="{DynamicResource TextBlockLargeBold}" Text="测试"/>
+                            <StackPanel x:Name="MsgPanel">
+                                <hc:ScrollViewer x:Name="MsgBar"  HorizontalScrollBarVisibility="Visible"  IsInertiaEnabled="True" Margin="10" Width="430">
+                                    <TextBlock  Width="430" LineHeight="20" x:Name="Msg" TextWrapping="Wrap" VerticalAlignment="Center" Text=""/>
+                                </hc:ScrollViewer>
+                            </StackPanel>
+                        </StackPanel>
+                    </Border>
+                    <!--Card 的尾部部分-->
+                    <hc:Card.Footer>
+                        <StackPanel Margin="10" Width="520">
+                            <!--Card 的一级内容-->
+                            <TextBlock TextWrapping="NoWrap" x:Name="Title"  Style="{DynamicResource TextBlockLargeBold}" TextTrimming="CharacterEllipsis" 
                                        Text="" 
                                        HorizontalAlignment="Left"/>
-                        <!--Card 的二级内容-->
-                        <TextBlock TextWrapping="NoWrap" x:Name="SubTitle" Style="{DynamicResource TextBlockDefault}" TextTrimming="CharacterEllipsis" 
+                            <!--Card 的二级内容-->
+                            <TextBlock TextWrapping="NoWrap" x:Name="SubTitle" Style="{DynamicResource TextBlockDefault}" TextTrimming="CharacterEllipsis" 
                                        Margin="0,6,0,0"
                                        HorizontalAlignment="Left"/>
-                    </StackPanel>
-                </hc:Card.Footer>
-            </hc:Card>
-            <hc:UniformSpacingPanel Spacing="100" HorizontalAlignment="Center" Margin="0,10,0,0">
-                <Button Content="暂不更新" Click="Close_Click" />
-                <Button Content="前往更新" Click="Confirm_Click" Background="#5BC0DE" Foreground="White" RenderTransformOrigin="0.696,0.45"/>
-            </hc:UniformSpacingPanel>
-        </StackPanel>
-        
-    </Border>
+                        </StackPanel>
+                    </hc:Card.Footer>
+                </hc:Card>
+                <hc:UniformSpacingPanel Spacing="100" HorizontalAlignment="Center" Margin="0,10,0,0">
+                    <Button Content="暂不更新" Click="Close_Click" />
+                    <Button Content="前往更新" Click="Confirm_Click" Style="{StaticResource Btn1}"/>
+                </hc:UniformSpacingPanel>
+            </StackPanel>
+
+        </Border>
+    </Grid>
 </Window>

+ 2 - 1
Control/Windows/UpdateWindow.xaml.cs

@@ -33,6 +33,7 @@ namespace GeekDesk.Control.Windows
             try
             {
                 WindowStartupLocation = WindowStartupLocation.CenterScreen;
+                this.Topmost = true;
                 InitializeComponent();
                 DataHandle(jo);
             }
@@ -68,7 +69,7 @@ namespace GeekDesk.Control.Windows
             string msg = "";
             for (int i=0; i<ja.Count; i++)
             {
-                msg += "•" + ja[i].ToString() + "\n";
+                msg += "• " + ja[i].ToString() + "\n";
             }
             Msg.Text = msg;
         }

+ 14 - 2
GeekDesk.csproj

@@ -57,8 +57,14 @@
     <Reference Include="CommonServiceLocator, Version=2.0.6.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
       <HintPath>packages\CommonServiceLocator.2.0.6\lib\net45\CommonServiceLocator.dll</HintPath>
     </Reference>
-    <Reference Include="HandyControl, Version=3.1.0.0, Culture=neutral, PublicKeyToken=45be8712787a1e5b, processorArchitecture=MSIL">
-      <HintPath>packages\HandyControl.3.1.0\lib\net472\HandyControl.dll</HintPath>
+    <Reference Include="Gma.System.MouseKeyHook, Version=5.6.130.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>packages\MouseKeyHook.5.6.0\lib\net40\Gma.System.MouseKeyHook.dll</HintPath>
+    </Reference>
+    <Reference Include="HandyControl, Version=3.3.0.0, Culture=neutral, PublicKeyToken=45be8712787a1e5b, processorArchitecture=MSIL">
+      <HintPath>packages\HandyControl.3.3.0\lib\net472\HandyControl.dll</HintPath>
+    </Reference>
+    <Reference Include="KeyMouseHook, Version=1.0.6.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>packages\KeyMouseHook.1.0.6\lib\net40\KeyMouseHook.dll</HintPath>
     </Reference>
     <Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
       <HintPath>packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
@@ -184,6 +190,8 @@
     <Compile Include="DraggAnimatedPanel\DraggAnimatedPanel.Drag.cs" />
     <Compile Include="Converts\HideTypeConvert.cs" />
     <Compile Include="Task\ToDoTask.cs" />
+    <Compile Include="Thread\MouseHookThread.cs" />
+    <Compile Include="Thread\DispatcherBuild.cs" />
     <Compile Include="Thread\UpdateThread.cs" />
     <Compile Include="Util\AeroGlassHelper.cs" />
     <Compile Include="Util\GlobalHotKey.cs" />
@@ -294,6 +302,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Resource\Dictionary\CommonStyle.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Properties\AssemblyInfo.cs">

+ 84 - 77
MainWindow.xaml

@@ -9,20 +9,19 @@
         xmlns:cvt="clr-namespace:GeekDesk.Converts"
         xmlns:DraggAnimatedPanel="clr-namespace:DraggAnimatedPanel"
         x:Name="window"
-        xmlns:hc="https://handyorg.github.io/handycontrol"
+        xmlns:hc="https://handyorg.github.io/handycontrol" 
         Title="GeekDesk" 
         d:DesignHeight="500" d:DesignWidth="700"
         WindowStyle="None"
         AllowsTransparency="True"
-        Background="#00FFFFFF"
-        OpacityMask ="White"
+        Background="Transparent"
         ShowInTaskbar="False"
         Opacity="0"
         Deactivated="Window_Deactivated"
         SizeChanged="Window_SizeChanged"
         >
     <WindowChrome.WindowChrome>
-        <WindowChrome CaptionHeight="0" ResizeBorderThickness="10"/>
+        <WindowChrome CaptionHeight="0" ResizeBorderThickness="15"/>
     </WindowChrome.WindowChrome>
     <Window.Resources>
        
@@ -32,50 +31,59 @@
         <cvt:DoubleToGridLength x:Key="DoubleToGridLength"/>
     </Window.Resources>
 
-
-    <Border CornerRadius="{Binding AppConfig.PannelCornerRadius, Mode=TwoWay, Converter={StaticResource IntToCornerRadius}}"  BorderThickness="0"
+    <Window.Effect>
+        <DropShadowEffect BlurRadius="30" Direction="-90" Color="Gray"
+                              RenderingBias="Quality" ShadowDepth="2"/>
+    </Window.Effect>
+        <Border Margin="20" CornerRadius="{Binding AppConfig.PannelCornerRadius, Mode=TwoWay, Converter={StaticResource IntToCornerRadius}}"  BorderThickness="0"
             Background="AliceBlue" LostFocus="App_LostFocus"
-            Opacity="{Binding AppConfig.PannelOpacity, Mode=TwoWay, Converter={StaticResource OpcityConvert}}">
-        <Border CornerRadius="{Binding AppConfig.PannelCornerRadius, Mode=TwoWay, Converter={StaticResource IntToCornerRadius}}"  BorderThickness="0">
-            <!--背景图片-->
-            <Border.Background>
-                <VisualBrush>
-                    <VisualBrush.Visual>
-                        <Grid ClipToBounds="True">
-                            <Image Source="{Binding AppConfig.BitmapImage}" Margin="-30" Opacity="{Binding AppConfig.BgOpacity, Mode=TwoWay, Converter={StaticResource OpcityConvert}}">
-                                <Image.Effect>
-                                    <BlurEffect Radius="{Binding AppConfig.BlurValue}"/>
-                                </Image.Effect>
-                            </Image>
-                        </Grid>
-                    </VisualBrush.Visual>
-                </VisualBrush>
-                <!--<ImageBrush ImageSource="{Binding AppConfig.BitmapImage}" Opacity="{Binding AppConfig.BgOpacity, Mode=TwoWay, Converter={StaticResource OpcityConvert}}"></ImageBrush>-->
-            </Border.Background>
-            <Grid>
-                <Grid.RowDefinitions>
-                    <RowDefinition Height="40" MouseMove="DragMove"></RowDefinition>
-                    <RowDefinition Height="*"></RowDefinition>
-                </Grid.RowDefinitions>
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition x:Name="LeftColumn" MinWidth="80" Width="{Binding AppConfig.MenuCardWidth, Mode=TwoWay, Converter={StaticResource DoubleToGridLength}}" MaxWidth="200"></ColumnDefinition>
-                    <ColumnDefinition Width="*"></ColumnDefinition>
-                </Grid.ColumnDefinitions>
+            Opacity="{Binding AppConfig.PannelOpacity, Mode=TwoWay, Converter={StaticResource OpcityConvert}}"
+            VirtualizingPanel.VirtualizationMode="Recycling"  VirtualizingPanel.IsVirtualizing="True"  VirtualizingPanel.IsContainerVirtualizable="True"
+            hc:Dialog.Token="IconInfoDialog"
+            >
+        <hc:DialogContainer>
+
+            <Border CornerRadius="{Binding AppConfig.PannelCornerRadius, Mode=TwoWay, Converter={StaticResource IntToCornerRadius}}"  BorderThickness="0">
+                <!--背景图片-->
+                <Border.Background>
+                    <VisualBrush>
+                        <VisualBrush.Visual>
+                            <Grid ClipToBounds="True">
+                                <Image Source="{Binding AppConfig.BitmapImage}" Margin="-30" Opacity="{Binding AppConfig.BgOpacity, Mode=TwoWay, Converter={StaticResource OpcityConvert}}">
+                                    <Image.Effect>
+                                        <BlurEffect Radius="{Binding AppConfig.BlurValue}"/>
+                                    </Image.Effect>
+                                </Image>
+                            </Grid>
+                        </VisualBrush.Visual>
+                    </VisualBrush>
+                </Border.Background>
+
+                <Grid>
+                    <Grid.RowDefinitions>
+                        <RowDefinition Height="40" MouseMove="DragMove"></RowDefinition>
+                        <RowDefinition Height="*"></RowDefinition>
+                    </Grid.RowDefinitions>
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition x:Name="LeftColumn" MinWidth="80" Width="{Binding AppConfig.MenuCardWidth, Mode=TwoWay, Converter={StaticResource DoubleToGridLength}}" MaxWidth="200"></ColumnDefinition>
+                        <ColumnDefinition Width="*"></ColumnDefinition>
+                    </Grid.ColumnDefinitions>
 
 
-                <DockPanel Grid.Row="0" Grid.Column="0" MouseMove="DragMove">
-                    <DockPanel.Background>
-                        <SolidColorBrush Opacity="0.01"/>
-                    </DockPanel.Background>
-                    <Image Source="/Resource/Image/TitleLogo.png" Margin="10,0,0,0" Width="94" Height="30" HorizontalAlignment="Left"/>
-                </DockPanel>
 
-                <DockPanel Grid.Row="0" Grid.Column="2" MouseMove="DragMove">
-                    <DockPanel.Background>
-                        <SolidColorBrush Opacity="0.01"/>
-                    </DockPanel.Background>
-                    <hc:UniformSpacingPanel Spacing="0" Grid.ColumnSpan="4" HorizontalAlignment="Right" VerticalAlignment="Center">
-                        <Button Background="Transparent"
+                    <DockPanel Grid.Row="0" Grid.Column="0" MouseMove="DragMove">
+                        <DockPanel.Background>
+                            <SolidColorBrush Opacity="0.01"/>
+                        </DockPanel.Background>
+                        <Image Source="/Resource/Image/TitleLogo.png" Margin="10,0,0,0" Width="94" Height="30" HorizontalAlignment="Left"/>
+                    </DockPanel>
+
+                    <DockPanel Grid.Row="0" Grid.Column="2" MouseMove="DragMove">
+                        <DockPanel.Background>
+                            <SolidColorBrush Opacity="0.01"/>
+                        </DockPanel.Background>
+                        <hc:UniformSpacingPanel Grid.ColumnSpan="4" HorizontalAlignment="Right" VerticalAlignment="Center">
+                            <Button Background="Transparent"
                                 BorderThickness="0"
                                 hc:IconElement.Geometry="M917.930667 512c0-57.6 36.181333-106.496 86.869333-125.952a505.429333 505.429333 0 0 0-55.210667-133.461333A134.826667 134.826667 0 0 1 771.413333 74.410667 507.733333 507.733333 0 0 0 637.952 19.2 135.168 135.168 0 0 1 512 106.069333 134.912 134.912 0 0 1 386.048 19.2 505.429333 505.429333 0 0 0 252.586667 74.410667c22.186667 49.749333 13.141333 109.824-27.562667 150.528a135.168 135.168 0 0 1-150.528 27.648 502.016 502.016 0 0 0-55.296 133.461333c50.688 19.626667 86.869333 68.437333 86.869333 125.952 0 57.6-36.181333 106.496-86.869333 125.952 12.117333 47.530667 30.72 92.330667 55.210667 133.461333a134.826667 134.826667 0 0 1 178.090666 178.176 507.733333 507.733333 0 0 0 133.546667 55.210667A135.168 135.168 0 0 1 512 917.930667c57.6 0 106.496 36.181333 125.952 86.869333a505.429333 505.429333 0 0 0 133.461333-55.210667 134.912 134.912 0 0 1 27.562667-150.528 135.168 135.168 0 0 1 150.528-27.648 502.016 502.016 0 0 0 55.296-133.461333A134.912 134.912 0 0 1 917.930667 512zM512 647.338667a135.338667 135.338667 0 1 1 0.085333-270.762667A135.338667 135.338667 0 0 1 512 647.338667z"
                                 hc:IconElement.Height="18"
@@ -85,14 +93,14 @@
                                 Initialized="SettingButton_Initialized"
                                 x:Name="SettingButton"
                                 >
-                            <Button.ContextMenu>
-                                <ContextMenu x:Name="SettingMenus" Width="130">
-                                    <MenuItem Header="设置" Click="ConfigMenuClick"/>
-                                    <MenuItem Header="待办" Click="BacklogMenuClick"/>
-                                </ContextMenu>
-                            </Button.ContextMenu>
-                        </Button>
-                        <Button Background="Transparent" 
+                                <Button.ContextMenu>
+                                    <ContextMenu x:Name="SettingMenus" Width="130">
+                                        <MenuItem Header="设置" Click="ConfigMenuClick"/>
+                                        <MenuItem Header="待办" Click="BacklogMenuClick"/>
+                                    </ContextMenu>
+                                </Button.ContextMenu>
+                            </Button>
+                            <Button Background="Transparent" 
                                 BorderThickness="0"
                                 hc:IconElement.Geometry="M828.770654 148.714771C641.293737-20.89959 354.184117-19.590868 168.245698 152.630946c-212.062907 196.418185-212.062907 522.329912 0 718.748098 185.93842 172.221815 473.048039 173.520546 660.524956 3.916176 219.435707-198.536117 219.435707-528.054322 0-726.580449z m-121.880976 569.643707c-11.708566 11.708566-30.680039 11.708566-42.388605 0L502.729054 556.586459c-0.659356-0.659356-1.728312-0.659356-2.397659 0L338.609327 718.318517c-11.708566 11.708566-30.680039 11.708566-42.388605 0l-0.039961-0.039961c-11.708566-11.708566-11.708566-30.680039 0-42.388605l161.732059-161.732058c0.659356-0.659356 0.659356-1.728312 0-2.397659L296.1408 350.008195c-11.708566-11.708566-11.708566-30.680039 0-42.388605l0.039961-0.039961c11.708566-11.708566 30.680039-11.708566 42.388605 0l161.772019 161.77202c0.659356 0.659356 1.728312 0.659356 2.397659 0L664.551024 307.539668c11.708566-11.708566 30.680039-11.708566 42.388605 0l0.039961 0.039961c11.708566 11.708566 11.708566 30.680039 0 42.388605L545.15762 511.770224c-0.659356 0.659356-0.659356 1.728312 0 2.397659L706.919649 675.939902c11.708566 11.708566 11.708566 30.680039 0 42.388605l-0.029971 0.029971z" 
                                 hc:IconElement.Height="18"
@@ -100,35 +108,34 @@
                                 HorizontalAlignment="Right"
                                 Click="CloseButtonClick"
                                 />
-                    </hc:UniformSpacingPanel>
+                        </hc:UniformSpacingPanel>
+
+                    </DockPanel>
+
 
-                </DockPanel>
+                    <uc:LeftCardControl  Grid.Row="1" Grid.Column="0"/>
+                    <!--分割线-->
+                    <GridSplitter Opacity="0" Grid.Row="1" Grid.Column="0" Width="1"  VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
 
+                    <uc:RightCardControl Grid.Row="1" Grid.Column="1"/>
 
-                <uc:LeftCardControl  Grid.Row="1" Grid.Column="0"/>
-                <!--分割线-->
-                <GridSplitter Opacity="0" Grid.Row="1" Grid.Column="0" Width="1"  VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
+                    <hc:NotifyIcon Icon="/Taskbar.ico" Text="GeekDesk" Click="NotifyIcon_Click">
+                        <hc:NotifyIcon.ContextMenu>
+                            <ContextMenu Width="130">
+                                <MenuItem Header="打开面板" Click="ShowApp"/>
+                                <MenuItem Header="待办"  Click="BacklogMenuClick"/>
+                                <MenuItem Header="程序目录"  Click="OpenThisDir"/>
+                                <MenuItem Header="设置"  Click="ConfigApp"/>
+                                <MenuItem Header="重启"  Click="ReStartApp"/>
+                                <MenuItem Header="退出" Click="ExitApp"/>
+                            </ContextMenu>
+                        </hc:NotifyIcon.ContextMenu>
 
-                <uc:RightCardControl Grid.Row="1" Grid.Column="1"/>
-                
-                <hc:NotifyIcon Icon="/Taskbar.ico" Text="GeekDesk" Click="NotifyIcon_Click">
-                    <hc:NotifyIcon.ContextMenu>
-                        <ContextMenu Width="130">
-                            <MenuItem Header="打开面板" Click="ShowApp"/>
-                            <MenuItem Header="待办"  Click="BacklogMenuClick"/>
-                            <MenuItem Header="程序目录"  Click="OpenThisDir"/>
-                            <MenuItem Header="设置"  Click="ConfigApp"/>
-                            <MenuItem Header="重启"  Click="ReStartApp"/>
-                            <MenuItem Header="退出" Click="ExitApp"/>
-                        </ContextMenu>
-                    </hc:NotifyIcon.ContextMenu>
-                    
-                </hc:NotifyIcon>
-                <StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,0"/>
-            </Grid>
-        </Border>
+                    </hc:NotifyIcon>
+                    <StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,0"/>
+                </Grid>
+            </Border>
+        </hc:DialogContainer>
     </Border>
-   
-   
 
 </Window>

+ 67 - 5
MainWindow.xaml.cs

@@ -7,7 +7,9 @@ using GeekDesk.Task;
 using GeekDesk.Thread;
 using GeekDesk.Util;
 using GeekDesk.ViewModel;
+using Gma.System.MouseKeyHook;
 using HandyControl.Data;
+
 using System;
 using System.Collections.ObjectModel;
 using System.Diagnostics;
@@ -30,6 +32,8 @@ namespace GeekDesk
     public partial class MainWindow : Window
     {
 
+        //public IKeyboardMouseEvents m_GlobalHook = Hook.GlobalEvents();
+
         public static AppData appData = CommonCode.GetAppDataByFile();
         //public static ToDoInfoWindow toDoInfoWindow = (ToDoInfoWindow)ToDoInfoWindow.GetThis();
         public static ToDoInfoWindow toDoInfoWindow;
@@ -55,6 +59,9 @@ namespace GeekDesk
             }
         }
 
+        /// <summary>
+        /// 加载缓存数据
+        /// </summary>
         private void LoadData()
         {
             this.DataContext = appData;
@@ -64,10 +71,14 @@ namespace GeekDesk
             }
 
             this.Width = appData.AppConfig.WindowWidth;
-            this.Height = appData.AppConfig.WindowHeight;
-            
+            this.Height = appData.AppConfig.WindowHeight;            
         }
 
+        /// <summary>
+        /// 窗口加载完毕 执行方法
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         void Window_Loaded(object sender, RoutedEventArgs e)
         {
             if (!appData.AppConfig.StartedShowPanel)
@@ -83,17 +94,48 @@ namespace GeekDesk
             {
                 ShowApp();
             }
+
+            //注册热键
             RegisterHotKey(true);
             RegisterCreateToDoHotKey(true);
 
-            if (!appData.AppConfig.SelfStartUped)
+            //注册自启动
+            if (!appData.AppConfig.SelfStartUped && "GeekDesk".Equals(Constants.MY_NAME))
             {
                 RegisterUtil.SetSelfStarting(appData.AppConfig.SelfStartUp, Constants.MY_NAME);
             }
-            UpdateThread.Update();
 
+            //注册鼠标中键监听事件
+            //m_GlobalHook.MouseUpExt += M_GlobalHook_MouseUpExt;
+            MouseHookThread.MiddleHook();
+
+            //更新线程开启  检测更新
+            UpdateThread.Update();
         }
 
+        /// <summary>
+        /// 鼠标中键呼出
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        //private void M_GlobalHook_MouseUpExt(object sender, System.Windows.Forms.MouseEventArgs e)
+        //{
+        //    if (appData.AppConfig.MouseMiddleShow && e.Button == System.Windows.Forms.MouseButtons.Middle)
+        //    {
+        //        if (MotionControl.hotkeyFinished)
+        //        {
+        //            if (mainWindow.Visibility == Visibility.Collapsed || mainWindow.Opacity == 0)
+        //            {
+        //                ShowApp();
+        //            }
+        //            else
+        //            {
+        //                HideApp();
+        //            }
+        //        }
+        //    }
+        //}
+
         /// <summary>
         /// 注册当前窗口的热键
         /// </summary>
@@ -138,6 +180,12 @@ namespace GeekDesk
             }
         }
 
+        /// <summary>
+        /// 淡入淡出效果
+        /// </summary>
+        /// <param name="opacity"></param>
+        /// <param name="milliseconds"></param>
+        /// <param name="visibility"></param>
         public static void FadeStoryBoard(int opacity, int milliseconds, Visibility visibility)
         {
             if (appData.AppConfig.AppAnimation)
@@ -209,6 +257,11 @@ namespace GeekDesk
         }
 
 
+        /// <summary>
+        /// 重置窗体大小 写入缓存
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         void MainWindow_Resize(object sender, System.EventArgs e)
         {
             if (this.DataContext != null)
@@ -221,7 +274,11 @@ namespace GeekDesk
 
 
        
-
+        /// <summary>
+        /// 程序窗体拖动
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void DragMove(object sender, MouseEventArgs e)
         {
             //if (e.LeftButton == MouseButtonState.Pressed)
@@ -298,6 +355,11 @@ namespace GeekDesk
         }
         public static void ShowApp()
         {
+            //有全屏化应用则不显示
+            //if (CommonCode.IsPrimaryFullScreen())
+            //{
+            //    return;
+            //}
             if (appData.AppConfig.FollowMouse)
             {
                 ShowWindowFollowMouse.Show(mainWindow, MousePosition.CENTER, 0, 0, false);

+ 48 - 0
Resource/Dictionary/CommonStyle.xaml

@@ -0,0 +1,48 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                    xmlns:hc="https://handyorg.github.io/handycontrol">
+
+
+    <Style x:Key="BorderBG" TargetType="Border">
+        <Style.Setters>
+            <Setter Property="Background">
+                <Setter.Value>
+                    <LinearGradientBrush Opacity="0.97">
+                        <GradientStop Color="#EBF7E3" Offset="0"/>
+                        <GradientStop Color="#A8E4C0" Offset="1"/>
+                    </LinearGradientBrush>
+                </Setter.Value>
+            </Setter>
+            <Setter Property="CornerRadius" Value="8"/>
+            <Setter Property="BorderThickness" Value="0"/>
+        </Style.Setters>
+    </Style>
+
+    <Style x:Key="Btn1" TargetType="Button" BasedOn="{StaticResource ButtonInfo}">
+        <Setter Property="Background">
+            <Setter.Value>
+                <LinearGradientBrush Opacity="0.97">
+                    <GradientStop Color="#5BC0DE" Offset="0"/>
+                    <GradientStop Color="#5BC0DE" Offset="1"/>
+                </LinearGradientBrush>
+            </Setter.Value>
+        </Setter>
+        <Setter Property="Foreground" Value="White"/>
+    </Style>
+
+    <Style x:Key="MyMenuStyle" TargetType="hc:SideMenuItem" BasedOn="{StaticResource SideMenuItemBaseStyle}">
+        <Style.Setters>
+            <Setter Property="Background" Value="Transparent"/>
+        </Style.Setters>
+        <Style.Triggers>
+            <Trigger Property="IsMouseOver" Value="True">
+                <Setter Property="Background" Value="Transparent"/>
+            </Trigger>
+            <Trigger Property="IsSelected" Value="True">
+                <Setter Property="Background" Value="Transparent"/>
+            </Trigger>
+        </Style.Triggers>
+    </Style>
+    
+    
+</ResourceDictionary>

+ 34 - 0
Thread/DispatcherBuild.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows.Threading;
+
+namespace GeekDesk.Thread
+{
+    public class DispatcherBuild
+    {
+
+        //创建一个Dispatcher来单独使用ui线程
+        public static Dispatcher Build()
+        {
+            Dispatcher dispatcher = null;
+            var manualResetEvent = new ManualResetEvent(false);
+            var thread = new System.Threading.Thread(() =>
+            {
+                dispatcher = Dispatcher.CurrentDispatcher;
+                var synchronizationContext = new DispatcherSynchronizationContext(dispatcher);
+                SynchronizationContext.SetSynchronizationContext(synchronizationContext);
+
+                manualResetEvent.Set();
+                Dispatcher.Run();
+            });
+            thread.Start();
+            manualResetEvent.WaitOne();
+            manualResetEvent.Dispose();
+            return dispatcher;
+        }
+    }
+}

+ 58 - 0
Thread/MouseHookThread.cs

@@ -0,0 +1,58 @@
+using GeekDesk.Control.UserControls.Config;
+using GeekDesk.ViewModel;
+using Gma.System.MouseKeyHook;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Threading;
+
+namespace GeekDesk.Thread
+{
+    public class MouseHookThread
+    {
+        private static AppConfig appConfig = MainWindow.appData.AppConfig;
+        public static IKeyboardMouseEvents m_GlobalHook = Hook.GlobalEvents();
+        
+
+        public static void MiddleHook()
+        {
+            //使用dispatcher来单独监听UI线程  防止程序卡顿
+            Dispatcher dispatcher = DispatcherBuild.Build();
+            dispatcher.Invoke((Action)(() =>
+            {
+                m_GlobalHook.MouseDownExt += M_GlobalHook_MouseDownExt;
+            }));
+        }
+
+        /// <summary>
+        /// 鼠标中键呼出
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private static void M_GlobalHook_MouseDownExt(object sender, System.Windows.Forms.MouseEventArgs e)
+        {
+            if (appConfig.MouseMiddleShow && e.Button == System.Windows.Forms.MouseButtons.Middle)
+            {
+                if (MotionControl.hotkeyFinished)
+                {
+                    MainWindow.mainWindow.Dispatcher.Invoke((Action)(() =>
+                    {
+                        if (MainWindow.mainWindow.Visibility == Visibility.Collapsed || MainWindow.mainWindow.Opacity == 0)
+                        {
+                            MainWindow.ShowApp();
+                        }
+                        else
+                        {
+                            MainWindow.HideApp();
+                        }
+                    }));
+                }
+            }
+        }
+
+    }
+}

+ 4 - 2
Thread/UpdateThread.cs

@@ -32,7 +32,7 @@ namespace GeekDesk.Thread
             {
 
                 //等待1分钟后再检查更新  有的网络连接过慢
-                System.Threading.Thread.Sleep(60 * 1000);
+                System.Threading.Thread.Sleep(1 * 1000);
 
                 string updateUrl;
                 string nowVersion = ConfigurationManager.AppSettings["Version"];
@@ -50,7 +50,7 @@ namespace GeekDesk.Thread
                 {
                     JObject jo = JObject.Parse(updateInfo);
                     string onlineVersion = jo["version"].ToString();
-                    if (onlineVersion.CompareTo(nowVersion) > 0)
+                    if (onlineVersion.CompareTo(nowVersion) > 0 || true)
                     {
                         App.Current.Dispatcher.Invoke((Action)(() =>
                         {
@@ -59,7 +59,9 @@ namespace GeekDesk.Thread
                         }));
                     }
                 }
+#pragma warning disable CS0168 // 声明了变量“e”,但从未使用过
             } catch (Exception e)
+#pragma warning restore CS0168 // 声明了变量“e”,但从未使用过
             {
                 //不做处理
                 //MessageBox.Show(e.Message);

+ 41 - 1
Util/CommonCode.cs

@@ -2,6 +2,7 @@
 using GeekDesk.ViewModel;
 using System;
 using System.IO;
+using System.Runtime.InteropServices;
 using System.Runtime.Serialization.Formatters.Binary;
 using System.Windows;
 
@@ -52,7 +53,46 @@ namespace GeekDesk.Util
             }
         }
 
-        
+
+
+        /// <summary>
+        /// 判断当前屏幕(鼠标最后活动屏幕)是否有全屏化应用
+        /// </summary>
+        /// <returns></returns>
+        public static bool IsPrimaryFullScreen()
+        {
+            RECT rect = new RECT();
+            GetWindowRect(new HandleRef(null, GetForegroundWindow()), ref rect);
+
+            int windowHeight = rect.bottom - rect.top;
+            int screenHeight = (int)SystemParameters.PrimaryScreenHeight;
+
+            if (windowHeight >= screenHeight)
+            {
+                return true;
+            }
+            return false;
+        }
+
+
+        [StructLayout(LayoutKind.Sequential)]
+        private struct RECT
+        {
+            public int left;
+            public int top;
+            public int right;
+            public int bottom;
+        }
+
+        [DllImport("user32.dll")]
+        private static extern bool GetWindowRect(HandleRef hWnd, [In, Out] ref RECT rect);
+
+        [DllImport("user32.dll")]
+        private static extern IntPtr GetForegroundWindow();
+
+
+
+
 
 
     }

+ 24 - 2
Util/FileIcon.cs

@@ -2,6 +2,7 @@
 using System;
 using System.Collections.Generic;
 using System.Drawing;
+using System.Drawing.Imaging;
 using System.IO;
 using System.Runtime.InteropServices;
 using System.Windows.Media.Imaging;
@@ -65,7 +66,15 @@ namespace GeekDesk.Util
 
             Bitmap bmp = ico.ToBitmap();
             MemoryStream strm = new MemoryStream();
-            bmp.Save(strm, System.Drawing.Imaging.ImageFormat.Png);
+
+            ImageCodecInfo myImageCodecInfo = GetEncoderInfo("image/png");
+            Encoder myEncoder = Encoder.Quality;
+            EncoderParameter myEncoderParameter = new EncoderParameter(myEncoder, 75L);
+            EncoderParameters myEncoderParameters = new EncoderParameters(1);
+            myEncoderParameters.Param[0] = myEncoderParameter;
+
+            bmp.Save(strm, myImageCodecInfo, myEncoderParameters);
+            bmp.Save("d:\\test.png", myImageCodecInfo, myEncoderParameters);
             BitmapImage bmpImage = new BitmapImage();
             bmpImage.BeginInit();
             strm.Seek(0, SeekOrigin.Begin);
@@ -78,7 +87,20 @@ namespace GeekDesk.Util
             return bmpImage.Clone();
         }
 
-       
+        private static ImageCodecInfo GetEncoderInfo(String mimeType)
+        {
+            int j;
+            ImageCodecInfo[] encoders;
+            encoders = ImageCodecInfo.GetImageEncoders();
+            for (j = 0; j < encoders.Length; ++j)
+            {
+                if (encoders[j].MimeType == mimeType)
+                    return encoders[j];
+            }
+            return null;
+        }
+
+
 
         public static int GetIconIndex(string pszFile)
         {

+ 2 - 0
Util/FileUtil.cs

@@ -23,7 +23,9 @@ namespace GeekDesk.Util
                 }
                 return shortcut.TargetPath;
             }
+#pragma warning disable CS0168 // 声明了变量“e”,但从未使用过
             catch (Exception e)
+#pragma warning restore CS0168 // 声明了变量“e”,但从未使用过
             {
                 return null;
             }

+ 11 - 6
Util/GlobalHotKey.cs

@@ -1,10 +1,8 @@
 using System;
 using System.Collections.Generic;
 using System.Runtime.InteropServices;
-using System.Windows;
 using System.Windows.Forms;
 using System.Windows.Input;
-using System.Windows.Interop;
 
 namespace GeekDesk.Util
 {
@@ -50,10 +48,17 @@ namespace GeekDesk.Util
 
         public static void Dispose(int id)
         {
-            bool test = UnregisterHotKey(handleTemp[id].Handle, id);
-            GlobalHotKey.handleTemp[id].Dispose();
-            GlobalHotKey.handleTemp.Remove(id);
-            Console.WriteLine(test);
+            try
+            {
+                UnregisterHotKey(handleTemp[id].Handle, id);
+                GlobalHotKey.handleTemp[id].Dispose();
+                GlobalHotKey.handleTemp.Remove(id);
+            } catch
+            {
+                //nothing
+            }
+
+
         }
 
         // Registers a hot key with Windows.

+ 2 - 0
Util/MarginHide.cs

@@ -31,7 +31,9 @@ namespace GeekDesk.Util
 
         private double showMarginWidth = 1;
 
+#pragma warning disable CS0414 // 字段“MarginHide.isHide”已被赋值,但从未使用过它的值
         private bool isHide;
+#pragma warning restore CS0414 // 字段“MarginHide.isHide”已被赋值,但从未使用过它的值
 
         public Timer timer;
         //构造函数,传入将要匹配的窗体      

+ 6 - 0
Util/RegisterUtil.cs

@@ -48,7 +48,9 @@ namespace GeekDesk.Util
                         key.Close();
 
                     }
+#pragma warning disable CS0168 // 声明了变量“ex”,但从未使用过
                     catch (Exception ex)
+#pragma warning restore CS0168 // 声明了变量“ex”,但从未使用过
                     {
                         return false;
                     }
@@ -60,14 +62,18 @@ namespace GeekDesk.Util
                         key.DeleteValue(exeName);//取消开机启动
                         key.Close();
                     }
+#pragma warning disable CS0168 // 声明了变量“ex”,但从未使用过
                     catch (Exception ex)
+#pragma warning restore CS0168 // 声明了变量“ex”,但从未使用过
                     {
                         return false;
                     }
                 }
                 return true;
             }
+#pragma warning disable CS0168 // 声明了变量“ex”,但从未使用过
             catch (Exception ex)
+#pragma warning restore CS0168 // 声明了变量“ex”,但从未使用过
             {
                 if (key != null)
                 {

+ 2 - 0
Util/ShellContextMenu.cs

@@ -1509,7 +1509,9 @@ namespace GeekDesk.Util
                 m_hookType,
                 m_filterFunc,
                 IntPtr.Zero,
+#pragma warning disable CS0618 // “AppDomain.GetCurrentThreadId()”已过时:“AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread.  http://go.microsoft.com/fwlink/?linkid=14202”
                 (int)AppDomain.GetCurrentThreadId());
+#pragma warning restore CS0618 // “AppDomain.GetCurrentThreadId()”已过时:“AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread.  http://go.microsoft.com/fwlink/?linkid=14202”
         }
         // ************************************************************************
 

+ 20 - 0
ViewModel/AppConfig.cs

@@ -66,7 +66,22 @@ namespace GeekDesk.ViewModel
         private int imageWidth = (int)CommonEnum.IMAGE_WIDTH; //图片宽度
         private int imageHeight = (int)CommonEnum.IMAGE_HEIGHT; //图片高度
 
+        private bool mouseMiddleShow = false;  //鼠标中键呼出 默认不启用
+
         #region GetSet
+        public bool MouseMiddleShow
+        {
+            get
+            {
+                return mouseMiddleShow;
+            }
+            set
+            {
+                mouseMiddleShow = value;
+                OnPropertyChanged("MouseMiddleShow");
+            }
+        }
+
         public int ImageWidth
         {
             get
@@ -101,6 +116,10 @@ namespace GeekDesk.ViewModel
                 {
                     s -= i;
                 }
+                if (s < 2.2)
+                {
+                    s = 2.2;
+                }
                 //设置容器宽度
                 ImgPanelWidth = (int)(ImageWidth * s);
 
@@ -138,6 +157,7 @@ namespace GeekDesk.ViewModel
                 {
                     s -= i;
                 }
+                if (s < 1.5) s = 1.5;
 
                 //设置容器高度
                 ImgPanelHeight = ImageHeight * s;

+ 3 - 1
packages.config

@@ -1,8 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
   <package id="CommonServiceLocator" version="2.0.6" targetFramework="net452" requireReinstallation="true" />
-  <package id="HandyControl" version="3.1.0" targetFramework="net472" />
+  <package id="HandyControl" version="3.3.0" targetFramework="net472" />
+  <package id="KeyMouseHook" version="1.0.6" targetFramework="net472" developmentDependency="true" />
   <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="Quartz" version="3.3.3" targetFramework="net472" />
   <package id="System.Buffers" version="4.5.1" targetFramework="net472" />