mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 11:42:22 +08:00
126 lines
9.5 KiB
XML
126 lines
9.5 KiB
XML
<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:conv="clr-namespace:BililiveRecorder.WPF.Converters"
|
|
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>
|
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
|
<conv:EnumToBooleanConverter x:Key="EnumToBooleanConverter"/>
|
|
<conv:ValueConverterGroup x:Key="InvertBooleanToVisibilityConverter">
|
|
<conv:BooleanInverterConverter/>
|
|
<BooleanToVisibilityConverter/>
|
|
</conv:ValueConverterGroup>
|
|
<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">
|
|
<TextBlock Text="设置" Style="{StaticResource TitleTextBlockStyle}" Margin="0,10"/>
|
|
<GroupBox Header="弹幕录制">
|
|
<StackPanel>
|
|
<ui:ToggleSwitch IsOn="{Binding RecordDanmaku}" Name="RecordDanmakuCheckbox" OnContent="录播时保存弹幕" OffContent="录播时不保存弹幕"/>
|
|
<StackPanel Margin="0,7,0,0" Visibility="{Binding ElementName=RecordDanmakuCheckbox,Path=IsOn,Converter={StaticResource BooleanToVisibilityConverter}}">
|
|
<ui:ToggleSwitch IsEnabled="{Binding RecordDanmaku}" IsOn="{Binding RecordDanmakuRaw}"
|
|
OnContent="同时保存 弹幕原始数据" OffContent="不保存 弹幕原始数据"/>
|
|
<ui:ToggleSwitch IsEnabled="{Binding RecordDanmaku}" IsOn="{Binding RecordDanmakuSuperChat}"
|
|
OnContent="同时保存 SuperChat" OffContent="不保存 SuperChat"/>
|
|
<ui:ToggleSwitch IsEnabled="{Binding RecordDanmaku}" IsOn="{Binding RecordDanmakuGift}"
|
|
OnContent="同时保存 送礼信息" OffContent="不保存 送礼信息"/>
|
|
<ui:ToggleSwitch IsEnabled="{Binding RecordDanmaku}" IsOn="{Binding RecordDanmakuGuard}"
|
|
OnContent="同时保存 舰长购买" OffContent="不保存 舰长购买"/>
|
|
</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"
|
|
Visibility="{Binding ElementName=CutDisabledRadioButton,Path=IsChecked,Converter={StaticResource InvertBooleanToVisibilityConverter}}">
|
|
<TextBlock Text="每"/>
|
|
<TextBox Margin="5,0" Width="100" Text="{Binding CuttingNumber,Delay=500}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
|
|
<TextBlock Text="MiB 保存为一个文件"
|
|
Visibility="{Binding ElementName=CutBySizeRadioButton,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
|
<TextBlock Text="分 保存为一个文件"
|
|
Visibility="{Binding ElementName=CutByTimeRadioButton,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
|
</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}}" />
|
|
|
|
<StackPanel Margin="0,5,0,0" Visibility="{Binding ElementName=EnabledFeatureRecordOnlyRadioButton,Path=IsChecked,Converter={StaticResource InvertBooleanToVisibilityConverter}}">
|
|
<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="说明"/>
|
|
<ui:PathIcon Margin="2,0" VerticalAlignment="Center" Height="15" Data="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"/>
|
|
</StackPanel>
|
|
<TextBlock Text="录制文件名格式"/>
|
|
<TextBox Text="{Binding RecordFilenameFormat,Delay=500}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
|
|
<TextBlock Text="剪辑文件名格式" Margin="0,5,0,0" Visibility="{Binding ElementName=EnabledFeatureRecordOnlyRadioButton,Path=IsChecked,Converter={StaticResource InvertBooleanToVisibilityConverter}}"/>
|
|
<TextBox Text="{Binding ClipFilenameFormat,Delay=500}" ui:TextBoxHelper.IsDeleteButtonVisible="False"
|
|
Visibility="{Binding ElementName=EnabledFeatureRecordOnlyRadioButton,Path=IsChecked,Converter={StaticResource InvertBooleanToVisibilityConverter}}"/>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
</ui:SimpleStackPanel>
|
|
</ScrollViewer>
|
|
</ui:Page>
|