016abafee4
实测部分按钮(如新设置的云储存按钮)仍然有问题 统一设置所有ScrollViewer控件的PanningMode为VerticalOnly,防止水平滚动干扰用户体验 Signed-off-by: doudou0720 <98651603+doudou0720@users.noreply.github.com>
168 lines
14 KiB
XML
168 lines
14 KiB
XML
<UserControl x:Class="Ink_Canvas.Windows.SettingsViews.SnapshotPanel"
|
|
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:Ink_Canvas.Windows.SettingsViews"
|
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="950" d:DesignWidth="640">
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="ComboBoxStyles.xaml"/>
|
|
</ResourceDictionary.MergedDictionaries>
|
|
<!-- 开关样式模板 -->
|
|
<Style x:Key="ToggleSwitchStyle" TargetType="Border">
|
|
<Setter Property="Width" Value="48"/>
|
|
<Setter Property="Height" Value="25"/>
|
|
<Setter Property="CornerRadius" Value="12"/>
|
|
<Setter Property="Padding" Value="3,0"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="HorizontalAlignment" Value="Right"/>
|
|
<Setter Property="Margin" Value="0,0,15,0"/>
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
<ScrollViewer ScrollChanged="ScrollViewerEx_ScrollChanged" IsManipulationEnabled="True" Name="ScrollViewerEx" IsDeferredScrollingEnabled="True" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled" IsTabStop="False" TabIndex="-1" Margin="0,0,2,2" PanningMode="VerticalOnly">
|
|
<StackPanel Margin="60,12,60,24">
|
|
<!-- 截图设置 -->
|
|
<Border BorderBrush="#e6e6e6" BorderThickness="1.25,1.25,1.25,4" CornerRadius="8">
|
|
<StackPanel Orientation="Vertical" Margin="18,18,18,18">
|
|
<TextBlock Text="截图设置" FontWeight="Bold" Foreground="#2e3436" FontSize="18" Margin="0,0,0,12"/>
|
|
<Grid Height="54">
|
|
<StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="清屏时自动截图" HorizontalAlignment="Left"/>
|
|
<TextBlock Foreground="#9a9996" FontSize="11" Margin="0,3.5,0,0" Text="清空画布时自动保存当前画布截图" HorizontalAlignment="Left"/>
|
|
</StackPanel>
|
|
<Border x:Name="ToggleSwitchAutoSaveStrokesAtClear" Style="{StaticResource ToggleSwitchStyle}" Background="#3584e4" Tag="AutoSaveStrokesAtClear" MouseLeftButtonDown="ToggleSwitch_Click">
|
|
<Border Width="19" Height="19" Background="White" CornerRadius="10" HorizontalAlignment="Right" VerticalAlignment="Center">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="4" Direction="-45" Color="Black" Opacity="0.3" ShadowDepth="0"/>
|
|
</Border.Effect>
|
|
</Border>
|
|
</Border>
|
|
</Grid>
|
|
<Border Height="1" Background="#ebebeb" Margin="0,8,0,8"/>
|
|
<Grid Height="54">
|
|
<StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="截图分日期文件夹保存" HorizontalAlignment="Left"/>
|
|
<TextBlock Foreground="#9a9996" FontSize="11" Margin="0,3.5,0,0" Text="截图按日期分类保存到不同文件夹" HorizontalAlignment="Left"/>
|
|
</StackPanel>
|
|
<Border x:Name="ToggleSwitchSaveScreenshotsInDateFolders" Style="{StaticResource ToggleSwitchStyle}" Background="#3584e4" Tag="SaveScreenshotsInDateFolders" MouseLeftButtonDown="ToggleSwitch_Click">
|
|
<Border Width="19" Height="19" Background="White" CornerRadius="10" HorizontalAlignment="Right" VerticalAlignment="Center">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="4" Direction="-45" Color="Black" Opacity="0.3" ShadowDepth="0"/>
|
|
</Border.Effect>
|
|
</Border>
|
|
</Border>
|
|
</Grid>
|
|
<Border Height="1" Background="#ebebeb" Margin="0,8,0,8"/>
|
|
<Grid Height="54">
|
|
<StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="截图时自动保存墨迹" HorizontalAlignment="Left"/>
|
|
<TextBlock Foreground="#9a9996" FontSize="11" Margin="0,3.5,0,0" Text="截图时同时保存当前画布的墨迹数据" HorizontalAlignment="Left"/>
|
|
</StackPanel>
|
|
<Border x:Name="ToggleSwitchAutoSaveStrokesAtScreenshot" Style="{StaticResource ToggleSwitchStyle}" Background="#3584e4" Tag="AutoSaveStrokesAtScreenshot" MouseLeftButtonDown="ToggleSwitch_Click">
|
|
<Border Width="19" Height="19" Background="White" CornerRadius="10" HorizontalAlignment="Right" VerticalAlignment="Center">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="4" Direction="-45" Color="Black" Opacity="0.3" ShadowDepth="0"/>
|
|
</Border.Effect>
|
|
</Border>
|
|
</Border>
|
|
</Grid>
|
|
<Border Height="1" Background="#ebebeb" Margin="0,8,0,8"/>
|
|
<Grid Height="54">
|
|
<StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="自动幻灯片截屏" HorizontalAlignment="Left"/>
|
|
<TextBlock Foreground="#9a9996" FontSize="11" Margin="0,3.5,0,0" Text="开启后,在幻灯片有墨迹时翻页会自动截屏" HorizontalAlignment="Left"/>
|
|
</StackPanel>
|
|
<Border x:Name="ToggleSwitchAutoSaveScreenShotInPowerPoint" Style="{StaticResource ToggleSwitchStyle}" Background="#3584e4" Tag="AutoSaveScreenShotInPowerPoint" MouseLeftButtonDown="ToggleSwitch_Click">
|
|
<Border Width="19" Height="19" Background="White" CornerRadius="10" HorizontalAlignment="Right" VerticalAlignment="Center">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="4" Direction="-45" Color="Black" Opacity="0.3" ShadowDepth="0"/>
|
|
</Border.Effect>
|
|
</Border>
|
|
</Border>
|
|
</Grid>
|
|
<Border Height="1" Background="#ebebeb" Margin="0,8,0,8"/>
|
|
<Grid Height="54">
|
|
<StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="自动截图最小墨迹量" HorizontalAlignment="Left"/>
|
|
<TextBlock Foreground="#9a9996" FontSize="11" Margin="0,3.5,0,0" Text="设置自动截图时所需的最小墨迹量" HorizontalAlignment="Left"/>
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,15,0">
|
|
<Slider x:Name="SideControlMinimumAutomationSlider" Width="150" Minimum="0.3" Maximum="1" Value="1" TickFrequency="0.05" IsSnapToTickEnabled="True" ValueChanged="SideControlMinimumAutomationSlider_ValueChanged"/>
|
|
<TextBlock x:Name="SideControlMinimumAutomationText" Text="1.00" VerticalAlignment="Center" FontSize="14" Margin="12,0,0,0" Foreground="#2e3436" FontFamily="Consolas"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- 截图保存路径设置 -->
|
|
<Border Margin="0,25,0,0" BorderBrush="#e6e6e6" BorderThickness="1.25,1.25,1.25,4" CornerRadius="8">
|
|
<StackPanel Orientation="Vertical" Margin="18,18,18,18">
|
|
<TextBlock Text="截图保存路径" FontWeight="Bold" Foreground="#2e3436" FontSize="18" Margin="0,0,0,12"/>
|
|
<StackPanel Orientation="Vertical" Margin="0,8,0,0">
|
|
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="墨迹与截图的保存路径" HorizontalAlignment="Left" Margin="0,0,0,8"/>
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
|
<TextBox x:Name="AutoSavedStrokesLocation" Width="320" Text="D:\Ink Canvas" TextWrapping="Wrap" TextChanged="AutoSavedStrokesLocation_TextChanged"/>
|
|
<Button x:Name="AutoSavedStrokesLocationButton" Content="浏览" Padding="12,6" Margin="8,0,0,0" Background="#2563eb" Foreground="White" Click="AutoSavedStrokesLocationButton_Click"/>
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
|
<Button x:Name="SetAutoSavedStrokesLocationToDiskDButton" Content="设置保存到 D:\Ink Canvas" Padding="12,6" Margin="0,0,8,0" Background="#2563eb" Foreground="White" Click="SetAutoSavedStrokesLocationToDiskDButton_Click"/>
|
|
<Button x:Name="SetAutoSavedStrokesLocationToDocumentFolderButton" Content="设置保存到 文档" Padding="12,6" Background="#2563eb" Foreground="White" Click="SetAutoSavedStrokesLocationToDocumentFolderButton_Click"/>
|
|
</StackPanel>
|
|
<TextBlock Text="请注意检查保存文件夹是否有写入权限" TextWrapping="Wrap" Foreground="#9a9996" FontSize="11"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- 自动清理设置 -->
|
|
<Border Margin="0,25,0,0" BorderBrush="#e6e6e6" BorderThickness="1.25,1.25,1.25,4" CornerRadius="8">
|
|
<StackPanel Orientation="Vertical" Margin="18,18,18,18">
|
|
<TextBlock Text="自动清理设置" FontWeight="Bold" Foreground="#2e3436" FontSize="18" Margin="0,0,0,12"/>
|
|
<Grid Height="54">
|
|
<StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="定期自动删除超过保存时间的墨迹、截图文件" HorizontalAlignment="Left"/>
|
|
<TextBlock Foreground="#9a9996" FontSize="11" Margin="0,3.5,0,0" Text="开启后将会删除自动保存目录下所有后缀名为 .icstk 和 .png 的文件" HorizontalAlignment="Left"/>
|
|
</StackPanel>
|
|
<Border x:Name="ToggleSwitchAutoDelSavedFiles" Style="{StaticResource ToggleSwitchStyle}" Background="#3584e4" Tag="AutoDelSavedFiles" MouseLeftButtonDown="ToggleSwitch_Click">
|
|
<Border Width="19" Height="19" Background="White" CornerRadius="10" HorizontalAlignment="Right" VerticalAlignment="Center">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="4" Direction="-45" Color="Black" Opacity="0.3" ShadowDepth="0"/>
|
|
</Border.Effect>
|
|
</Border>
|
|
</Border>
|
|
</Grid>
|
|
<Border Height="1" Background="#ebebeb" Margin="0,8,0,8"/>
|
|
<StackPanel Orientation="Vertical" x:Name="AutoDelIntervalPanel" Visibility="Visible">
|
|
<StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,8,0,12">
|
|
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="保存时长" HorizontalAlignment="Left"/>
|
|
<TextBlock Foreground="#9a9996" FontSize="11" Margin="0,3.5,0,0" TextWrapping="Wrap" Text="设置自动删除文件的保存时长" HorizontalAlignment="Left"/>
|
|
</StackPanel>
|
|
<ComboBox x:Name="ComboBoxAutoDelSavedFilesDaysThreshold"
|
|
Style="{StaticResource ComboBoxStyle}"
|
|
ItemContainerStyle="{StaticResource ComboBoxItemStyle}"
|
|
HorizontalAlignment="Left"
|
|
Width="150"
|
|
SelectedIndex="4"
|
|
SelectionChanged="ComboBoxAutoDelSavedFilesDaysThreshold_SelectionChanged">
|
|
<ComboBoxItem Content="1天" Tag="AutoDelSavedFilesDaysThreshold_1"/>
|
|
<ComboBoxItem Content="3天" Tag="AutoDelSavedFilesDaysThreshold_3"/>
|
|
<ComboBoxItem Content="5天" Tag="AutoDelSavedFilesDaysThreshold_5"/>
|
|
<ComboBoxItem Content="7天" Tag="AutoDelSavedFilesDaysThreshold_7"/>
|
|
<ComboBoxItem Content="15天" Tag="AutoDelSavedFilesDaysThreshold_15" IsSelected="True"/>
|
|
<ComboBoxItem Content="30天" Tag="AutoDelSavedFilesDaysThreshold_30"/>
|
|
<ComboBoxItem Content="60天" Tag="AutoDelSavedFilesDaysThreshold_60"/>
|
|
<ComboBoxItem Content="100天" Tag="AutoDelSavedFilesDaysThreshold_100"/>
|
|
<ComboBoxItem Content="365天" Tag="AutoDelSavedFilesDaysThreshold_365"/>
|
|
</ComboBox>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</UserControl>
|