下班喽
This commit is contained in:
@@ -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="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 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="{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>
|
||||
|
||||
|
||||
@@ -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
Control/UserControls/AboutControl.xaml
Normal file
17
Control/UserControls/AboutControl.xaml
Normal file
@@ -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
Control/UserControls/AboutControl.xaml.cs
Normal file
28
Control/UserControls/AboutControl.xaml.cs
Normal file
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
Control/UserControls/MotionControl.xaml
Normal file
62
Control/UserControls/MotionControl.xaml
Normal file
@@ -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
Control/UserControls/MotionControl.xaml.cs
Normal file
38
Control/UserControls/MotionControl.xaml.cs
Normal file
@@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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
Control/UserControls/ThemeControl.xaml
Normal file
88
Control/UserControls/ThemeControl.xaml
Normal file
@@ -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>
|
||||
@@ -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("修改背景失败,已重置为默认背景!");
|
||||
}
|
||||
Reference in New Issue
Block a user