liufei vor 4 Jahren
Ursprung
Commit
9a45899b47

+ 1 - 0
App.xaml

@@ -9,6 +9,7 @@
   <Application.Resources>
     <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
+                <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.MergedDictionaries>

+ 52 - 12
Control/ConfigWindow.xaml

@@ -13,7 +13,22 @@
            Background="Transparent"
            >
 
-        <Border CornerRadius="8" BorderThickness="0">
+    <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="8" BorderThickness="0">
         <Border.Background>
             <SolidColorBrush Color="AliceBlue" Opacity="0.9"/>
         </Border.Background>
@@ -27,28 +42,53 @@
             </Grid.ColumnDefinitions>
 
             <hc:Card Grid.Row="0" Grid.Column="0">
-                <hc:SideMenu BorderThickness="1" AutoSelect="True" Header="WorkItems" BorderBrush="#FF958F8F">
-                    <hc:Interaction.Triggers>
-                        <hc:EventTrigger EventName="SelectionChanged">
-                            <hc:EventToCommand Command="{Binding SwitchItemCmd}" PassEventArgsToCommand="True" />
-                        </hc:EventTrigger>
-                    </hc:Interaction.Triggers>
-                    <hc:SideMenuItem Header="Work Items" Background="#FFD1C8C8">
+                <hc:SideMenu BorderThickness="1" 
+                             AutoSelect="True" 
+                             >
+                    <hc:SideMenu.Background>
+                        <SolidColorBrush Color="AliceBlue"/>
+                    </hc:SideMenu.Background>
+
+                    <hc:SideMenu.ItemContainerStyle>
+                        <Style TargetType="hc:SideMenuItem" BasedOn="{StaticResource MenuStyle}"/>
+                    </hc:SideMenu.ItemContainerStyle>
+                    
+                    <hc:SideMenuItem Header="关于"
+                                     IsSelected="True"
+                                     Selected="MemuClick"
+                                     Tag="About"
+                                     >
                         <hc:SideMenuItem.Icon>
                             <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.Geometry="{StaticResource About}" 
                             hc:IconElement.Height="18"
                             hc:IconElement.Width="18"
                             HorizontalAlignment="Right"
                             />
                         </hc:SideMenuItem.Icon>
                     </hc:SideMenuItem>
-                    <hc:SideMenuItem Header="Work Items2">
+                    <hc:SideMenuItem Header="显示设置"
+                                     Tag="Theme"
+                                     Selected="MemuClick">
+                        <hc:SideMenuItem.Icon>
+                            <Button Background="Transparent" 
+                            BorderThickness="0"
+                            hc:IconElement.Geometry="{StaticResource Pannel}"
+                            hc:IconElement.Height="18"
+                            hc:IconElement.Width="18"
+                            HorizontalAlignment="Right"
+                            />
+                        </hc:SideMenuItem.Icon>
+                    </hc:SideMenuItem>
+
+                    <hc:SideMenuItem Header="动作"
+                                     Tag="Motion"
+                                     Selected="MemuClick">
                         <hc:SideMenuItem.Icon>
                             <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.Geometry="{StaticResource Motion}"
                             hc:IconElement.Height="18"
                             hc:IconElement.Width="18"
                             HorizontalAlignment="Right"
@@ -62,7 +102,7 @@
                 </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"/>
+            <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>
 

+ 21 - 1
Control/ConfigWindow.xaml.cs

@@ -15,11 +15,15 @@ namespace GeekDesk.Control
     /// </summary>
     public partial class ConfigWindow
     {
+        private static AboutControl about = new AboutControl();
+        private static ThemeControl theme = new ThemeControl();
+        private static MotionControl motion = new MotionControl();
+
         public ConfigWindow(AppConfig appConfig)
         {
             InitializeComponent();
             this.DataContext = appConfig;
-            RightCard.Content = new SettingControl();
+            RightCard.Content = about;
             this.Topmost = true;
         }
 
@@ -47,5 +51,21 @@ namespace GeekDesk.Control
             this.Close();
         }
 
+        private void MemuClick(object sender, RoutedEventArgs e)
+        {
+            SideMenuItem smi = sender as SideMenuItem;
+            switch (smi.Tag.ToString())
+            {
+                case "Motion":
+                    RightCard.Content = motion;
+                    break;
+                case "Theme":
+                    RightCard.Content = theme;
+                    break;
+                default:
+                    RightCard.Content = about;
+                    break;
+            }
+        }
     }
 }

+ 17 - 0
Control/UserControls/AboutControl.xaml

@@ -0,0 +1,17 @@
+<UserControl x:Class="GeekDesk.Control.UserControls.AboutControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:GeekDesk.Control.UserControls"
+             xmlns:hc="https://handyorg.github.io/handycontrol"
+             mc:Ignorable="d" 
+             Background="AliceBlue"
+             d:DesignHeight="400" d:DesignWidth="500">
+    <hc:SimplePanel Margin="20">
+        <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Top">
+            <Image Source="/Resource/Image/Ico.png" Width="250" Height="250"/>
+            <TextBlock Text="这是个人开发的程序,所有人可任意修改和免费试用(商用请联系作者)"/>
+        </StackPanel>
+    </hc:SimplePanel>
+</UserControl>

+ 28 - 0
Control/UserControls/AboutControl.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace GeekDesk.Control.UserControls
+{
+    /// <summary>
+    /// AboutControl.xaml 的交互逻辑
+    /// </summary>
+    public partial class AboutControl : UserControl
+    {
+        public AboutControl()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 2 - 2
Control/UserControls/LeftCardControl.xaml

@@ -12,7 +12,7 @@
     <UserControl.Resources>
 
         <!--左侧栏样式动画-->
-        <Style x:Key="menuStyle" TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemBaseStyle}">
+        <Style x:Key="MenuStyle" TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemBaseStyle}">
             <Setter Property="FontSize" Value="15"/>
             <Setter Property="Margin" Value="0,0,0,1"/>
             <Setter Property="Background">
@@ -88,7 +88,7 @@
                     </ListBox.Resources>
 
                     <ListBox.ItemContainerStyle>
-                        <Style TargetType="ListBoxItem" BasedOn="{StaticResource menuStyle}">
+                        <Style TargetType="ListBoxItem" BasedOn="{StaticResource MenuStyle}">
                             <Setter Property="ContextMenu" Value="{StaticResource menuDialog}"/>
                         </Style>
                     </ListBox.ItemContainerStyle>

+ 62 - 0
Control/UserControls/MotionControl.xaml

@@ -0,0 +1,62 @@
+<UserControl x:Class="GeekDesk.Control.UserControls.MotionControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:cvt="clr-namespace:GeekDesk.Converts"
+             xmlns:local="clr-namespace:GeekDesk.Control.UserControls"
+             xmlns:hc="https://handyorg.github.io/handycontrol"
+             mc:Ignorable="d" 
+             Background="AliceBlue"
+             d:DesignHeight="300" d:DesignWidth="450">
+
+    <UserControl.Resources>
+        <cvt:HideTypeConvert x:Key="HideTypeConvert"/>
+    </UserControl.Resources>
+        <hc:SimplePanel Margin="20">
+            <hc:UniformSpacingPanel Spacing="10" Margin="0,0,0,10" Grid.ColumnSpan="4">
+                <TextBlock Text="面板动作设置" VerticalAlignment="Center"/>
+            </hc:UniformSpacingPanel>
+            <hc:UniformSpacingPanel Spacing="10" Margin="30,26.394,0,-16.394" Grid.ColumnSpan="4">
+                <CheckBox x:Name="IconIsAdmin" Content="启动时显示主面板" IsChecked="{Binding StartedShowPanel}">
+                    <CheckBox.Background>
+                        <LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
+                            <GradientStop Color="#FF9EA3A6"/>
+                        </LinearGradientBrush>
+                    </CheckBox.Background>
+                </CheckBox>
+            </hc:UniformSpacingPanel>
+
+            <hc:UniformSpacingPanel Spacing="10" Margin="30,50,0,-102.337" Grid.ColumnSpan="4">
+                <CheckBox  Content="显示时追随鼠标位置" IsChecked="{Binding FollowMouse}" Unchecked="CheckBox_Unchecked">
+                    <CheckBox.Background>
+                        <LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
+                            <GradientStop Color="#FF9EA3A6"/>
+                        </LinearGradientBrush>
+                    </CheckBox.Background>
+                </CheckBox>
+            </hc:UniformSpacingPanel>
+            <hc:UniformSpacingPanel Spacing="10" Margin="30,89.49,-30,-79.49" Grid.ColumnSpan="4">
+                <TextBlock Text="面板关闭方式" VerticalAlignment="Center" Margin="-26,0,26,0"/>
+            </hc:UniformSpacingPanel>
+            <hc:UniformSpacingPanel Spacing="10" Margin="10,115,20,-102.337" Grid.ColumnSpan="4">
+                <RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" 
+                         Style="{StaticResource RadioButtonIcon}" Content="失去焦点后"
+                         IsChecked="{Binding AppHideType, Mode=TwoWay, Converter={StaticResource HideTypeConvert}, ConverterParameter=1}"/>
+                <RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
+                         Style="{StaticResource RadioButtonIcon}" Content="运行项目后" 
+                         IsChecked="{Binding AppHideType, Mode=TwoWay, Converter={StaticResource HideTypeConvert}, ConverterParameter=2}"/>
+                <RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" 
+                         Style="{StaticResource RadioButtonIcon}" Content="手动关闭"
+                         IsChecked="{Binding AppHideType, Mode=TwoWay, Converter={StaticResource HideTypeConvert}, ConverterParameter=3}"/>
+            </hc:UniformSpacingPanel>
+
+        <hc:UniformSpacingPanel Spacing="10" Margin="30,164.49,-30,-154.49" Grid.ColumnSpan="4">
+            <TextBlock Text="热键设置" VerticalAlignment="Center" Margin="-26,0,26,0"/>
+        </hc:UniformSpacingPanel>
+        <hc:UniformSpacingPanel Spacing="10" Margin="30,193,0,-180.337" Grid.ColumnSpan="4">
+            <TextBlock Text="当前热键:"/>
+        </hc:UniformSpacingPanel>
+    </hc:SimplePanel>
+   
+</UserControl>

+ 38 - 0
Control/UserControls/MotionControl.xaml.cs

@@ -0,0 +1,38 @@
+using GeekDesk.Util;
+using GeekDesk.ViewModel;
+using Microsoft.Win32;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace GeekDesk.Control.UserControls
+{
+    /// <summary>
+    /// 动作设置
+    /// </summary>
+    public partial class MotionControl : UserControl
+    {
+        public MotionControl()
+        {
+            InitializeComponent();
+        }
+
+        private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+        
+    }
+}

+ 0 - 134
Control/UserControls/SettingControl.xaml

@@ -1,134 +0,0 @@
-<UserControl x:Class="GeekDesk.Control.UserControls.SettingControl"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:cvt="clr-namespace:GeekDesk.Converts"
-             xmlns:local="clr-namespace:GeekDesk.Control.UserControls"
-             xmlns:hc="https://handyorg.github.io/handycontrol"
-             mc:Ignorable="d" 
-             Background="AliceBlue"
-             d:DesignHeight="450" d:DesignWidth="800">
-
-    <UserControl.Resources>
-        <cvt:HideTypeConvert x:Key="HideTypeConvert"/>
-    </UserControl.Resources>
-        <hc:SimplePanel Margin="10">
-            <hc:SimplePanel.Background>
-                <SolidColorBrush Opacity="0.9"/>
-            </hc:SimplePanel.Background>
-
-            <hc:UniformSpacingPanel Spacing="10" Margin="0,0,0,10" Grid.ColumnSpan="4">
-                <TextBlock Text="主面板设置" VerticalAlignment="Center"/>
-            </hc:UniformSpacingPanel>
-            <hc:Divider LineStrokeDashArray="3,3" Margin="30,22,450,119" LineStroke="Black" Grid.ColumnSpan="4"/>
-            <hc:UniformSpacingPanel Spacing="10" Margin="30,26.394,0,-16.394" Grid.ColumnSpan="4">
-                <CheckBox x:Name="IconIsAdmin" Content="启动时显示主面板" IsChecked="{Binding StartedShowPanel}">
-                    <CheckBox.Background>
-                        <LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
-                            <GradientStop Color="#FF9EA3A6"/>
-                        </LinearGradientBrush>
-                    </CheckBox.Background>
-                </CheckBox>
-            </hc:UniformSpacingPanel>
-
-            <hc:UniformSpacingPanel Spacing="10" Margin="30,50,0,-102.337" Grid.ColumnSpan="4">
-                <CheckBox  Content="显示时追随鼠标位置" IsChecked="{Binding FollowMouse}" Unchecked="CheckBox_Unchecked">
-                    <CheckBox.Background>
-                        <LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
-                            <GradientStop Color="#FF9EA3A6"/>
-                        </LinearGradientBrush>
-                    </CheckBox.Background>
-                </CheckBox>
-            </hc:UniformSpacingPanel>
-            <hc:UniformSpacingPanel Spacing="10" Margin="30,89.49,-30,-79.49" Grid.ColumnSpan="4">
-                <TextBlock Text="面板关闭方式" VerticalAlignment="Center"/>
-            </hc:UniformSpacingPanel>
-            <hc:Divider LineStrokeDashArray="3,3" Margin="30,109,450,26.208" LineStroke="Black" Grid.ColumnSpan="4"/>
-            <hc:UniformSpacingPanel Spacing="10" Margin="40,115,-10,-102.337" Grid.ColumnSpan="4">
-                <RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" 
-                         Style="{StaticResource RadioButtonIcon}" Content="失去焦点后"
-                         IsChecked="{Binding AppHideType, Mode=TwoWay, Converter={StaticResource HideTypeConvert}, ConverterParameter=1}"/>
-                <RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
-                         Style="{StaticResource RadioButtonIcon}" Content="运行项目后" 
-                         IsChecked="{Binding AppHideType, Mode=TwoWay, Converter={StaticResource HideTypeConvert}, ConverterParameter=2}"/>
-                <RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" 
-                         Style="{StaticResource RadioButtonIcon}" Content="手动关闭"
-                         IsChecked="{Binding AppHideType, Mode=TwoWay, Converter={StaticResource HideTypeConvert}, ConverterParameter=3}"/>
-            </hc:UniformSpacingPanel>
-            <hc:UniformSpacingPanel Spacing="10" Margin="30,160.5,-30,-150.5" Grid.ColumnSpan="4">
-                <TextBlock Text="背景图片" VerticalAlignment="Center"/>
-            </hc:UniformSpacingPanel>
-            <hc:UniformSpacingPanel Spacing="10" Margin="40,183,-40,-173" Grid.ColumnSpan="4">
-                <TextBlock Text="图片路径:" VerticalAlignment="Center"/>
-                <TextBlock Text="{Binding BacImgName}" Width="200" 
-                       VerticalAlignment="Center"
-                       hc:Poptip.HitMode="None" 
-                       hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
-                       hc:Poptip.Content="{Binding BacImgName}" 
-                       hc:Poptip.Placement="TopLeft"
-                       />
-                <Button Content="修改" Click="BGButton_Click"/>
-            </hc:UniformSpacingPanel>
-            <hc:Divider LineStrokeDashArray="3,3" Margin="30,22,450,119" LineStroke="Black" Grid.ColumnSpan="4"/>
-
-            <hc:Divider LineStrokeDashArray="3,3" Margin="10,217.235,-10,-66.235" LineStroke="Black" Grid.ColumnSpan="4"/>
-            <hc:UniformSpacingPanel Spacing="10" Margin="30,240,-30,-230" Grid.ColumnSpan="4">
-                <TextBlock Text="托盘不透明度" VerticalAlignment="Center"/>
-            </hc:UniformSpacingPanel>
-            <hc:UniformSpacingPanel Spacing="10" Margin="40,267,-40,-257" Grid.ColumnSpan="4">
-                <hc:PreviewSlider Value="{Binding CardOpacity}"
-                              Maximum="100"
-                              Margin="0,0,-313.5,7.5"
-                              >
-                    <hc:PreviewSlider.PreviewContent>
-                        <Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
-                    </hc:PreviewSlider.PreviewContent>
-                </hc:PreviewSlider>
-            </hc:UniformSpacingPanel>
-
-            <hc:UniformSpacingPanel Spacing="10" Margin="30,298.813,-30,-288.813" Grid.ColumnSpan="4">
-                <TextBlock Text="背景图片不透明度" VerticalAlignment="Center"/>
-            </hc:UniformSpacingPanel>
-            <hc:UniformSpacingPanel Spacing="10" Margin="40,330,-40,-320" Grid.ColumnSpan="4">
-                <hc:PreviewSlider Value="{Binding BgOpacity}"
-                              Maximum="100"
-                              Margin="0,0,-313.5,7.5"
-                              >
-                    <hc:PreviewSlider.PreviewContent>
-                        <Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
-                    </hc:PreviewSlider.PreviewContent>
-                </hc:PreviewSlider>
-            </hc:UniformSpacingPanel>
-
-            <hc:UniformSpacingPanel Spacing="10" Margin="30,370.813,-30,-360.813" Grid.ColumnSpan="4">
-                <TextBlock Text="主面板不透明度" VerticalAlignment="Center"/>
-            </hc:UniformSpacingPanel>
-            <hc:UniformSpacingPanel Spacing="10" Margin="40,399,-40,-389" Grid.ColumnSpan="4">
-                <hc:PreviewSlider Value="{Binding PannelOpacity}"
-                              Minimum="50"
-                              Maximum="100"
-                              Margin="0,0,-313.5,7.5"
-                              >
-                    <hc:PreviewSlider.PreviewContent>
-                        <Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
-                    </hc:PreviewSlider.PreviewContent>
-                </hc:PreviewSlider>
-            </hc:UniformSpacingPanel>
-
-            <hc:UniformSpacingPanel Spacing="10" Margin="30,429.313,-30,-419.313" Grid.ColumnSpan="4">
-                <TextBlock Text="主面板圆角大小" VerticalAlignment="Center"/>
-            </hc:UniformSpacingPanel>
-            <hc:UniformSpacingPanel Spacing="10" Margin="40,463.5,-40,-453.5" Grid.ColumnSpan="4">
-                <hc:PreviewSlider Value="{Binding PannelCornerRadius}"
-                              Maximum="25"
-                              Margin="0,0,-313.5,7.5"
-                              >
-                    <hc:PreviewSlider.PreviewContent>
-                        <Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
-                    </hc:PreviewSlider.PreviewContent>
-                </hc:PreviewSlider>
-            </hc:UniformSpacingPanel>
-        </hc:SimplePanel>
-   
-</UserControl>

+ 88 - 0
Control/UserControls/ThemeControl.xaml

@@ -0,0 +1,88 @@
+<UserControl x:Class="GeekDesk.Control.UserControls.ThemeControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:GeekDesk.Control.UserControls"
+             xmlns:hc="https://handyorg.github.io/handycontrol"
+             mc:Ignorable="d" 
+             Background="AliceBlue"
+             d:DesignHeight="350" d:DesignWidth="450">
+    <hc:SimplePanel Margin="20">
+
+        <hc:UniformSpacingPanel Spacing="10" Margin="0,0,-40,-12" Grid.ColumnSpan="4">
+            <TextBlock Text="背景图片" VerticalAlignment="Center"/>
+        </hc:UniformSpacingPanel>
+        <hc:UniformSpacingPanel Spacing="10" Margin="19,20,-59,-31.5" Grid.ColumnSpan="4">
+            <TextBlock Text="图片路径:" VerticalAlignment="Center"/>
+            <TextBlock Text="{Binding BacImgName}" Width="200" 
+                       VerticalAlignment="Center"
+                       hc:Poptip.HitMode="None" 
+                       hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
+                       hc:Poptip.Content="{Binding BacImgName}" 
+                       hc:Poptip.Placement="TopLeft"
+                       />
+            <Button Content="修改" Click="BGButton_Click"/>
+        </hc:UniformSpacingPanel>
+        <hc:Divider LineStrokeDashArray="3,3" Margin="0,60,0,66" LineStroke="Black" Grid.ColumnSpan="4"/>
+
+        <hc:UniformSpacingPanel Spacing="10" Margin="0,80,-40,-89.5" Grid.ColumnSpan="4">
+            <TextBlock Text="托盘不透明度" VerticalAlignment="Center"/>
+        </hc:UniformSpacingPanel>
+        <hc:UniformSpacingPanel Spacing="10" Margin="0,110,-40,-122" Grid.ColumnSpan="4">
+            <hc:PreviewSlider Value="{Binding CardOpacity}"
+                              Maximum="100"
+                              Margin="0,-12,-313.5,19.5"
+                              >
+                <hc:PreviewSlider.PreviewContent>
+                    <Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
+                </hc:PreviewSlider.PreviewContent>
+            </hc:PreviewSlider>
+        </hc:UniformSpacingPanel>
+
+
+        <hc:UniformSpacingPanel Spacing="10" Margin="0,135,-40,-161.626" Grid.ColumnSpan="4">
+            <TextBlock Text="背景图片不透明度" VerticalAlignment="Center"/>
+        </hc:UniformSpacingPanel>
+        <hc:UniformSpacingPanel Spacing="10" Margin="0,155,-40,-183" Grid.ColumnSpan="4">
+            <hc:PreviewSlider Value="{Binding BgOpacity}"
+                              Maximum="100"
+                              Margin="0,0,-313.5,7.5"
+                              >
+                <hc:PreviewSlider.PreviewContent>
+                    <Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
+                </hc:PreviewSlider.PreviewContent>
+            </hc:PreviewSlider>
+        </hc:UniformSpacingPanel>
+
+
+        <hc:UniformSpacingPanel Spacing="10" Margin="0,195,-40,-208.813" Grid.ColumnSpan="4">
+            <TextBlock Text="主面板不透明度" VerticalAlignment="Center"/>
+        </hc:UniformSpacingPanel>
+        <hc:UniformSpacingPanel Spacing="10" Margin="0,215,-40,-241" Grid.ColumnSpan="4">
+            <hc:PreviewSlider Value="{Binding PannelOpacity}"
+                              Minimum="50"
+                              Maximum="100"
+                              Margin="0,0,-313.5,7.5"
+                              >
+                <hc:PreviewSlider.PreviewContent>
+                    <Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
+                </hc:PreviewSlider.PreviewContent>
+            </hc:PreviewSlider>
+        </hc:UniformSpacingPanel>
+
+        <hc:UniformSpacingPanel Spacing="10" Margin="0,245,-40,-279.313" Grid.ColumnSpan="4">
+            <TextBlock Text="主面板圆角大小" VerticalAlignment="Center"/>
+        </hc:UniformSpacingPanel>
+        <hc:UniformSpacingPanel Spacing="10" Margin="0,265,-40,-321" Grid.ColumnSpan="4">
+            <hc:PreviewSlider Value="{Binding PannelCornerRadius}"
+                              Maximum="25"
+                              Margin="0,0,-313.5,7.5"
+                              >
+                <hc:PreviewSlider.PreviewContent>
+                    <Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
+                </hc:PreviewSlider.PreviewContent>
+            </hc:PreviewSlider>
+        </hc:UniformSpacingPanel>
+    </hc:SimplePanel>
+</UserControl>

+ 5 - 9
Control/UserControls/SettingControl.xaml.cs → Control/UserControls/ThemeControl.xaml.cs

@@ -19,20 +19,15 @@ using System.Windows.Shapes;
 namespace GeekDesk.Control.UserControls
 {
     /// <summary>
-    /// SettingControl.xaml 的交互逻辑
+    /// MotionControl.xaml 的交互逻辑
     /// </summary>
-    public partial class SettingControl : UserControl
+    public partial class ThemeControl : System.Windows.Controls.UserControl
     {
-        public SettingControl()
+        public ThemeControl()
         {
             InitializeComponent();
         }
 
-        private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
-        {
-
-        }
-
         /// <summary>
         /// 修改背景图片
         /// </summary>
@@ -54,7 +49,8 @@ namespace GeekDesk.Control.UserControls
                     appConfig.BitmapImage = ImageUtil.GetBitmapImageByFile(ofd.FileName);
                     appConfig.BacImgName = ofd.FileName;
                 }
-            } catch (Exception)
+            }
+            catch (Exception)
             {
                 HandyControl.Controls.Growl.WarningGlobal("修改背景失败,已重置为默认背景!");
             }

+ 18 - 4
GeekDesk.csproj

@@ -107,14 +107,20 @@
     <Compile Include="Control\IconInfoDialog.xaml.cs">
       <DependentUpon>IconInfoDialog.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Control\UserControls\AboutControl.xaml.cs">
+      <DependentUpon>AboutControl.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Control\UserControls\LeftCardControl.xaml.cs">
       <DependentUpon>LeftCardControl.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Control\UserControls\ThemeControl.xaml.cs">
+      <DependentUpon>ThemeControl.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Control\UserControls\RightCardControl.xaml.cs">
       <DependentUpon>RightCardControl.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Control\UserControls\SettingControl.xaml.cs">
-      <DependentUpon>SettingControl.xaml</DependentUpon>
+    <Compile Include="Control\UserControls\MotionControl.xaml.cs">
+      <DependentUpon>MotionControl.xaml</DependentUpon>
     </Compile>
     <Compile Include="Converts\DoubleToGridLength.cs" />
     <Compile Include="Converts\IntToCornerRadius.cs" />
@@ -149,15 +155,23 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Control\UserControls\AboutControl.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Control\UserControls\LeftCardControl.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Control\UserControls\ThemeControl.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Control\UserControls\RightCardControl.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Control\UserControls\SettingControl.xaml">
+    <Page Include="Control\UserControls\MotionControl.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
@@ -173,7 +187,7 @@
       <DependentUpon>MainWindow.xaml</DependentUpon>
       <SubType>Code</SubType>
     </Compile>
-    <Page Include="Resource\Dictionary\GemetryDictionary.xaml">
+    <Page Include="Resource\Dictionary\Geometry.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>

+ 1 - 11
MainWindow.xaml.cs

@@ -27,8 +27,8 @@ namespace GeekDesk
         public static AppData appData = CommonCode.GetAppDataByFile();
         public MainWindow()
         {
-            InitializeComponent();
             LoadData();
+            InitializeComponent();
             this.Topmost = true;
             this.Loaded += Window_Loaded;
             this.SizeChanged += MainWindow_Resize;
@@ -114,12 +114,6 @@ namespace GeekDesk
 
 
 
-
-
-
-
-
-
         /// <summary>
         /// 关闭按钮单击事件
         /// </summary>
@@ -132,10 +126,6 @@ namespace GeekDesk
 
        
 
-        
-
-       
-
         ///// <summary>
         ///// 左侧栏宽度改变 持久化
         ///// </summary>

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 6
Resource/Dictionary/GemetryDictionary.xaml


+ 21 - 0
Resource/Dictionary/Geometry.xaml

@@ -0,0 +1,21 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                    xmlns:local="clr-namespace:GeekDesk.Resource.Dictionary">
+
+
+
+    <Geometry x:Key="About">
+        M512 992C246.912 992 32 777.088 32 512 32 246.912 246.912 32 512 32c265.088 0 480 214.912 480 480 0 265.088-214.912 480-480 480z m-59.072-512v236.32a54.144 54.144 0 1 0 108.288 0V480a54.144 54.144 0 1 0-108.288 0z m53.76-226.464c-14.72 0-27.232 4.544-37.568 15.136-11.04 9.856-16.192 22.72-16.192 38.656 0 15.136 5.152 28 16.192 38.624 10.336 10.592 22.848 15.904 37.6 15.904a57.6 57.6 0 0 0 39.04-15.168c10.304-10.592 15.456-23.456 15.456-39.36s-5.12-28.8-15.456-38.656c-10.304-10.56-23.584-15.136-39.04-15.136z
+    </Geometry>
+
+    <Geometry x:Key="Pannel">
+        M106.666667 106.666667m21.333333 0l128 0q21.333333 0 21.333333 21.333333l0 768q0 21.333333-21.333333 21.333333l-128 0q-21.333333 0-21.333333-21.333333l0-768q0-21.333333 21.333333-21.333333Z
+        M341.333333 106.666667m21.333334 0l533.333333 0q21.333333 0 21.333333 21.333333l0 170.666667q0 21.333333-21.333333 21.333333l-533.333333 0q-21.333333 0-21.333334-21.333333l0-170.666667q0-21.333333 21.333334-21.333333Z
+        M341.333333 384m21.333334 0l533.333333 0q21.333333 0 21.333333 21.333333l0 490.666667q0 21.333333-21.333333 21.333333l-533.333333 0q-21.333333 0-21.333334-21.333333l0-490.666667q0-21.333333 21.333334-21.333333Z
+    </Geometry>
+
+    <Geometry x:Key="Motion">
+        M604.337231 269.666462a33.595077 33.595077 0 0 1-33.634462-33.595077 140.366769 140.366769 0 0 0-140.169846-140.209231 140.366769 140.366769 0 0 0-140.209231 140.209231 33.595077 33.595077 0 0 1-67.150769 0A207.596308 207.596308 0 0 1 430.532923 28.711385a207.596308 207.596308 0 0 1 207.399385 207.36 33.713231 33.713231 0 0 1-33.595077 33.595077z m-287.586462 259.150769V283.608615A114.569846 114.569846 0 0 1 431.241846 169.117538 114.609231 114.609231 0 0 1 545.693538 283.569231v46.158769a34.067692 34.067692 0 0 1 5.435077-0.393846c37.336615 0 70.380308 18.668308 90.19077 47.261538a109.764923 109.764923 0 0 1 119.414153 41.314462c7.758769-1.654154 15.675077-2.520615 23.709539-2.520616h7.207385a113.821538 113.821538 0 0 1 113.703384 113.664v131.15077a29.577846 29.577846 0 0 1 0.196923 3.820307v67.741539c0 153.521231-67.702154 250.052923-190.621538 271.753846-38.4 6.616615-74.161231 10.003692-107.52 10.003692-101.454769 0-181.011692-31.507692-245.681231-96.17723L154.249846 710.025846a122.052923 122.052923 0 0 1 0-172.347077 122.092308 122.092308 0 0 1 162.500923-8.861538z m386.520616 408.457846c89.6-15.753846 135.089231-84.873846 135.08923-205.508923v-19.337846a34.067692 34.067692 0 0 1-0.078769-2.756923v-180.657231c0-25.718154-20.873846-46.473846-46.473846-46.473846h-7.246769c-1.102769 0-2.166154 0-3.308308 0.118154v110.788923a33.634462 33.634462 0 1 1-67.268923-0.118154v-111.773539a42.023385 42.023385 0 0 0-53.169231-40.487384v115.672615a33.595077 33.595077 0 0 1-67.190154 0v-117.76c0-23.433846-19.062154-42.456615-42.496-42.456615a33.792 33.792 0 0 1-5.435077-0.472616v126.267077a33.595077 33.595077 0 1 1-67.229538 0V283.608615a47.379692 47.379692 0 0 0-94.759385 0v321.457231a33.555692 33.555692 0 0 1-57.107692 27.569231l-47.497846-47.458462a54.744615 54.744615 0 0 0-77.390769 77.351385l207.478154 207.399385c69.080615 69.001846 162.500923 90.348308 294.084923 67.347692z
+    </Geometry>
+
+</ResourceDictionary>

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.