BililiveRecorder/BililiveRecorder.WPF/Pages/SettingsPage.xaml

119 lines
9.0 KiB
Plaintext
Raw Normal View History

2020-11-27 18:51:02 +08:00
<ui:Page
x:Class="BililiveRecorder.WPF.Pages.SettingsPage"
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:ui="http://schemas.modernwpf.com/2019"
xmlns:local="clr-namespace:BililiveRecorder.WPF.Pages"
xmlns:config="clr-namespace:BililiveRecorder.Core.Config;assembly=BililiveRecorder.Core"
xmlns:flv="clr-namespace:BililiveRecorder.FlvProcessor;assembly=BililiveRecorder.FlvProcessor"
mc:Ignorable="d"
d:DesignHeight="1500" d:DesignWidth="500"
DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=local:RootPage},Path=DataContext.Recorder.Config}"
Title="SettingsPage">
<ui:Page.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="14"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
</ui:Page.Resources>
<ScrollViewer d:DataContext="{d:DesignInstance Type=config:ConfigV1}">
<ui:SimpleStackPanel Orientation="Vertical" Spacing="5" Margin="20">
2020-12-10 17:02:56 +08:00
<TextBlock Text="设置" Style="{StaticResource TitleTextBlockStyle}" FontFamily="Microsoft Yahei" Margin="0,10"/>
2020-11-27 18:51:02 +08:00
<GroupBox Header="弹幕录制">
<StackPanel>
<ui:ToggleSwitch IsOn="{Binding RecordDanmaku}" Name="RecordDanmakuCheckbox" OnContent="保存弹幕&#160;&#160;(当前为保存)" OffContent="不保存弹幕(当前为不保存)"/>
2020-12-10 17:02:56 +08:00
<StackPanel Margin="0,7,0,0" Visibility="{Binding ElementName=RecordDanmakuCheckbox,Path=IsOn,Converter={StaticResource BooleanToVisibilityCollapsedConverter}}">
<ui:ToggleSwitch IsEnabled="{Binding RecordDanmaku}" IsOn="{Binding RecordDanmakuSuperChat}"
2020-11-27 18:51:02 +08:00
OnContent="同时保存 SuperChat" OffContent="不保存 SuperChat"/>
<ui:ToggleSwitch IsEnabled="{Binding RecordDanmaku}" IsOn="{Binding RecordDanmakuGuard}"
OnContent="同时保存 舰长购买" OffContent="不保存 舰长购买"/>
<ui:ToggleSwitch IsEnabled="{Binding RecordDanmaku}" IsOn="{Binding RecordDanmakuGift}"
OnContent="同时保存 送礼信息" OffContent="不保存 送礼信息"/>
<ui:ToggleSwitch IsEnabled="{Binding RecordDanmaku}" IsOn="{Binding RecordDanmakuRaw}"
OnContent="同时保存 弹幕原始数据" OffContent="不保存 弹幕原始数据"/>
2020-11-27 18:51:02 +08:00
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox Header="自动分段">
<StackPanel>
<RadioButton GroupName="自动分段" Name="CutDisabledRadioButton" Content="不自动分段"
IsChecked="{Binding Path=CuttingMode, Converter={StaticResource EnumToBooleanConverter},
ConverterParameter={x:Static flv:AutoCuttingMode.Disabled}}" />
<RadioButton GroupName="自动分段" Name="CutBySizeRadioButton" Content="根据文件大小自动分段"
IsChecked="{Binding Path=CuttingMode, Converter={StaticResource EnumToBooleanConverter},
ConverterParameter={x:Static flv:AutoCuttingMode.BySize}}" />
<RadioButton GroupName="自动分段" Name="CutByTimeRadioButton" Content="根据视频时间自动分段"
IsChecked="{Binding Path=CuttingMode, Converter={StaticResource EnumToBooleanConverter},
ConverterParameter={x:Static flv:AutoCuttingMode.ByTime}}" />
<StackPanel Orientation="Horizontal" Margin="0,5,0,0"
2020-12-10 17:02:56 +08:00
Visibility="{Binding ElementName=CutDisabledRadioButton,Path=IsChecked,Converter={StaticResource InvertBooleanToVisibilityCollapsedConverter}}">
2020-11-27 18:51:02 +08:00
<TextBlock Text="每"/>
<TextBox Margin="5,0" Width="100" Text="{Binding CuttingNumber,Delay=500}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
<TextBlock Text="MiB 保存为一个文件"
2020-12-10 17:02:56 +08:00
Visibility="{Binding ElementName=CutBySizeRadioButton,Path=IsChecked,Converter={StaticResource BooleanToVisibilityCollapsedConverter}}"/>
2020-11-27 18:51:02 +08:00
<TextBlock Text="分 保存为一个文件"
2020-12-10 17:02:56 +08:00
Visibility="{Binding ElementName=CutByTimeRadioButton,Path=IsChecked,Converter={StaticResource BooleanToVisibilityCollapsedConverter}}"/>
2020-11-27 18:51:02 +08:00
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox Header="录制功能">
<StackPanel>
<RadioButton GroupName="录制功能" Name="EnabledFeatureRecordOnlyRadioButton" Content="只启用录制功能" ToolTip="(默认)占内存更少,但不能使用即时剪辑"
IsChecked="{Binding Path=EnabledFeature, Converter={StaticResource EnumToBooleanConverter},
ConverterParameter={x:Static flv:EnabledFeature.RecordOnly}}" />
<RadioButton GroupName="录制功能" Content="只启用即时剪辑功能" ToolTip="不保存所有直播数据"
IsChecked="{Binding Path=EnabledFeature, Converter={StaticResource EnumToBooleanConverter},
ConverterParameter={x:Static flv:EnabledFeature.ClipOnly}}" />
<RadioButton GroupName="录制功能" Content="同时启用两个功能"
IsChecked="{Binding Path=EnabledFeature, Converter={StaticResource EnumToBooleanConverter},
ConverterParameter={x:Static flv:EnabledFeature.Both}}" />
2020-12-10 17:02:56 +08:00
<StackPanel Margin="0,5,0,0" Visibility="{Binding ElementName=EnabledFeatureRecordOnlyRadioButton,Path=IsChecked,Converter={StaticResource InvertBooleanToVisibilityCollapsedConverter}}">
2020-11-27 18:51:02 +08:00
<StackPanel Orientation="Horizontal">
<TextBlock Text="剪辑过去时长"/>
<TextBox Margin="5,0" Width="80" Text="{Binding ClipLengthPast,Delay=500}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
<TextBlock Text="秒"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="剪辑将来时长"/>
<TextBox Margin="5,0" Width="80" Text="{Binding ClipLengthFuture,Delay=500}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
<TextBlock Text="秒"/>
</StackPanel>
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox Header="文件名">
<StackPanel MaxWidth="400" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
<StackPanel.ToolTip>
<TextBlock FontSize="13">
文件名变量说明<LineBreak/>
<LineBreak/>
日期: {date} <LineBreak/>
时间: {time} <LineBreak/>
房间号: {roomid} <LineBreak/>
标题: {title} <LineBreak/>
主播名: {name} <LineBreak/>
随机数字: {random} <LineBreak/>
<LineBreak/>
所有 { } 大括号均为英文半角括号 <LineBreak/>
只支持 flv 格式
</TextBlock>
</StackPanel.ToolTip>
<TextBlock Text="说明"/>
2020-12-10 17:02:56 +08:00
<ui:PathIcon Margin="2,0" VerticalAlignment="Center" Height="15" Style="{StaticResource PathIconDataInformationOutline}"/>
2020-11-27 18:51:02 +08:00
</StackPanel>
<TextBlock Text="录制文件名格式"/>
<TextBox Text="{Binding RecordFilenameFormat,Delay=500}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
2020-12-10 17:02:56 +08:00
<TextBlock Text="剪辑文件名格式" Margin="0,5,0,0" Visibility="{Binding ElementName=EnabledFeatureRecordOnlyRadioButton,Path=IsChecked,Converter={StaticResource InvertBooleanToVisibilityCollapsedConverter}}"/>
2020-11-27 18:51:02 +08:00
<TextBox Text="{Binding ClipFilenameFormat,Delay=500}" ui:TextBoxHelper.IsDeleteButtonVisible="False"
2020-12-10 17:02:56 +08:00
Visibility="{Binding ElementName=EnabledFeatureRecordOnlyRadioButton,Path=IsChecked,Converter={StaticResource InvertBooleanToVisibilityCollapsedConverter}}"/>
2020-11-27 18:51:02 +08:00
</StackPanel>
</GroupBox>
</ui:SimpleStackPanel>
</ScrollViewer>
</ui:Page>