BililiveRecorder/BililiveRecorder.WPF/Controls/PerRoomSettingsDialog.xaml

114 lines
8.3 KiB
Plaintext
Raw Normal View History

2021-01-01 14:46:27 +08:00
<ui:ContentDialog
x:Class="BililiveRecorder.WPF.Controls.PerRoomSettingsDialog"
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"
2021-01-05 22:50:10 +08:00
xmlns:l="https://github.com/XAMLMarkupExtensions/WPFLocalizationExtension"
l:LocalizeDictionary.DesignCulture=""
l:ResxLocalizationProvider.DefaultAssembly="BililiveRecorder.WPF"
l:ResxLocalizationProvider.DefaultDictionary="Strings"
2021-01-01 14:46:27 +08:00
xmlns:local="clr-namespace:BililiveRecorder.WPF.Controls"
2021-12-19 21:10:34 +08:00
xmlns:config="clr-namespace:BililiveRecorder.Core.Config;assembly=BililiveRecorder.Core"
2021-02-27 13:24:18 +08:00
xmlns:core="clr-namespace:BililiveRecorder.Core;assembly=BililiveRecorder.Core"
d:DataContext="{d:DesignInstance core:Room}"
2021-01-01 14:46:27 +08:00
DefaultButton="Close"
2021-01-05 22:50:10 +08:00
CloseButtonText="{l:Loc Global_Close}"
2021-01-05 15:41:26 +08:00
mc:Ignorable="d">
2021-01-01 14:46:27 +08:00
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel>
2021-02-27 13:24:18 +08:00
<ContentControl Content="{Binding}" ContentTemplate="{StaticResource RoomDialogHeader}"/>
2021-11-21 00:08:31 +08:00
<TextBlock TextAlignment="Center" Text="Tip: 这里是房间独立设置,是对↙全局设置↙的覆盖"/>
2021-01-01 14:46:27 +08:00
<Separator/>
</StackPanel>
<ScrollViewer Grid.Row="1">
<ui:SimpleStackPanel Orientation="Vertical" Spacing="5" DataContext="{Binding RoomConfig}">
2021-01-05 22:50:10 +08:00
<GroupBox Header="{l:Loc Settings_Danmaku_Title}">
2021-01-01 14:46:27 +08:00
<StackPanel>
<local:SettingWithDefault IsSettingNotUsingDefault="{Binding HasRecordDanmaku}">
2021-01-05 22:50:10 +08:00
<ui:ToggleSwitch IsOn="{Binding RecordDanmaku}" OnContent="{l:Loc Settings_Danmaku_ToggleSwitch_Enabled}" OffContent="{l:Loc Settings_Danmaku_ToggleSwitch_Enabled}"/>
2021-01-01 14:46:27 +08:00
</local:SettingWithDefault>
<local:SettingWithDefault IsSettingNotUsingDefault="{Binding HasRecordDanmakuSuperChat}">
2021-01-05 22:50:10 +08:00
<ui:ToggleSwitch IsOn="{Binding RecordDanmakuSuperChat}" OnContent="{l:Loc Settings_Danmaku_ToggleSwitch_SuperChat}" OffContent="{l:Loc Settings_Danmaku_ToggleSwitch_SuperChat}"/>
2021-01-01 14:46:27 +08:00
</local:SettingWithDefault>
<local:SettingWithDefault IsSettingNotUsingDefault="{Binding HasRecordDanmakuGuard}">
2021-01-05 22:50:10 +08:00
<ui:ToggleSwitch IsOn="{Binding RecordDanmakuGuard}" OnContent="{l:Loc Settings_Danmaku_ToggleSwitch_Guard}" OffContent="{l:Loc Settings_Danmaku_ToggleSwitch_Guard}"/>
2021-01-01 14:46:27 +08:00
</local:SettingWithDefault>
<local:SettingWithDefault IsSettingNotUsingDefault="{Binding HasRecordDanmakuGift}">
2021-01-05 22:50:10 +08:00
<ui:ToggleSwitch IsOn="{Binding RecordDanmakuGift}" OnContent="{l:Loc Settings_Danmaku_ToggleSwitch_Gift}" OffContent="{l:Loc Settings_Danmaku_ToggleSwitch_Gift}"/>
2021-01-01 14:46:27 +08:00
</local:SettingWithDefault>
<local:SettingWithDefault IsSettingNotUsingDefault="{Binding HasRecordDanmakuRaw}">
2021-01-05 22:50:10 +08:00
<ui:ToggleSwitch IsOn="{Binding RecordDanmakuRaw}" OnContent="{l:Loc Settings_Danmaku_ToggleSwitch_Raw}" OffContent="{l:Loc Settings_Danmaku_ToggleSwitch_Raw}"/>
2021-01-01 14:46:27 +08:00
</local:SettingWithDefault>
</StackPanel>
</GroupBox>
2021-05-01 23:18:22 +08:00
<GroupBox Header="{l:Loc Settings_RecordMode_Title}">
2021-04-20 22:28:52 +08:00
<StackPanel>
<local:SettingWithDefault IsSettingNotUsingDefault="{Binding HasRecordMode}">
<StackPanel>
2021-05-01 23:18:22 +08:00
<RadioButton GroupName="RecordMode" Content="{l:Loc Settings_RecordMode_RadioButton_Standard}"
2021-04-20 22:28:52 +08:00
IsChecked="{Binding Path=RecordMode, Converter={StaticResource EnumToBooleanConverter},
2021-12-19 21:10:34 +08:00
ConverterParameter={x:Static config:RecordMode.Standard}}" />
2021-05-01 23:18:22 +08:00
<RadioButton GroupName="RecordMode" Content="{l:Loc Settings_RecordMode_RadioButton_RawData}"
2021-04-20 22:28:52 +08:00
IsChecked="{Binding Path=RecordMode, Converter={StaticResource EnumToBooleanConverter},
2021-12-19 21:10:34 +08:00
ConverterParameter={x:Static config:RecordMode.RawData}}" />
2021-04-20 22:28:52 +08:00
</StackPanel>
</local:SettingWithDefault>
</StackPanel>
</GroupBox>
<GroupBox Header="标准模式录制修复设置">
<StackPanel>
<local:SettingWithDefault IsSettingNotUsingDefault="{Binding HasFlvProcessorSplitOnScriptTag}">
<StackPanel>
<ui:ToggleSwitch IsOn="{Binding FlvProcessorSplitOnScriptTag}" OnContent="检测到可能缺少数据时分段" OffContent="检测到可能缺少数据时分段"/>
</StackPanel>
</local:SettingWithDefault>
</StackPanel>
</GroupBox>
2021-01-05 22:50:10 +08:00
<GroupBox Header="{l:Loc Settings_Splitting_Title}">
2021-01-01 14:46:27 +08:00
<StackPanel>
<local:SettingWithDefault IsSettingNotUsingDefault="{Binding HasCuttingMode}">
<StackPanel>
2021-01-05 22:50:10 +08:00
<RadioButton GroupName="Splitting" Content="{l:Loc Settings_Splitting_RadioButton_Disabled}"
2021-01-01 14:46:27 +08:00
IsChecked="{Binding Path=CuttingMode, Converter={StaticResource EnumToBooleanConverter},
2021-12-19 21:10:34 +08:00
ConverterParameter={x:Static config:CuttingMode.Disabled}}" />
2021-01-05 22:50:10 +08:00
<RadioButton GroupName="Splitting" Content="{l:Loc Settings_Splitting_RadioButton_BySize}"
2021-01-01 14:46:27 +08:00
IsChecked="{Binding Path=CuttingMode, Converter={StaticResource EnumToBooleanConverter},
2021-12-19 21:10:34 +08:00
ConverterParameter={x:Static config:CuttingMode.BySize}}" />
2021-01-05 22:50:10 +08:00
<RadioButton GroupName="Splitting" Content="{l:Loc Settings_Splitting_RadioButton_ByTime}"
2021-01-01 14:46:27 +08:00
IsChecked="{Binding Path=CuttingMode, Converter={StaticResource EnumToBooleanConverter},
2021-12-19 21:10:34 +08:00
ConverterParameter={x:Static config:CuttingMode.ByTime}}" />
2021-01-01 14:46:27 +08:00
</StackPanel>
</local:SettingWithDefault>
<local:SettingWithDefault IsSettingNotUsingDefault="{Binding HasCuttingNumber}">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5,0,0">
2021-01-05 22:50:10 +08:00
<TextBlock VerticalAlignment="Center" Text="{l:Loc Settings_Splitting_TextBox_Left}"/>
2021-01-01 14:46:27 +08:00
<TextBox Margin="5,0" Width="100" Text="{Binding CuttingNumber}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
2021-01-05 22:50:10 +08:00
<TextBlock VerticalAlignment="Center" Text="{l:Loc Settings_Splitting_TextBox_TimeUnit}"/>
<TextBlock VerticalAlignment="Center" Text="/"/>
<TextBlock VerticalAlignment="Center" Text="{l:Loc Settings_Splitting_TextBox_SizeUnit}"/>
<TextBlock VerticalAlignment="Center" Text=" "/>
<TextBlock VerticalAlignment="Center" Text="{l:Loc Settings_Splitting_TextBox_Right}"/>
2021-01-01 14:46:27 +08:00
</StackPanel>
</local:SettingWithDefault>
</StackPanel>
</GroupBox>
2021-07-09 19:48:39 +08:00
<GroupBox Header="录制画质">
<StackPanel>
<TextBlock Text="逗号分割的录制画质ID"/>
<local:SettingWithDefault IsSettingNotUsingDefault="{Binding HasRecordingQuality}">
<TextBox Text="{Binding RecordingQuality,UpdateSourceTrigger=PropertyChanged,Delay=1000}"
ui:TextBoxHelper.IsDeleteButtonVisible="False" Width="220" HorizontalAlignment="Left"/>
</local:SettingWithDefault>
</StackPanel>
</GroupBox>
2021-01-01 14:46:27 +08:00
</ui:SimpleStackPanel>
</ScrollViewer>
</Grid>
</ui:ContentDialog>