BililiveRecorder/BililiveRecorder.WPF/Controls/PerRoomSettingsDialog.xaml

88 lines
6.8 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-02-23 18:03:37 +08:00
xmlns:confiv2="clr-namespace:BililiveRecorder.Core.Config.V2;assembly=BililiveRecorder.Core"
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>
<TextBlock VerticalAlignment="Center" Style="{DynamicResource SubtitleTextBlockStyle}" FontFamily="Microsoft Yahei" TextWrapping="NoWrap" HorizontalAlignment="Center"
TextAlignment="Center" TextTrimming="CharacterEllipsis" Text="{Binding StreamerName,Mode=OneWay}" ToolTip="{Binding StreamerName,Mode=OneWay}"/>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal" Grid.Row="1" Grid.ColumnSpan="2" Margin="5,0,0,0">
<ui:PathIcon Height="10" Style="{StaticResource PathIconDataUpperCaseIdentifier}" />
<TextBlock Text="{Binding RoomId, StringFormat=\{0\},Mode=OneWay}" Margin="4,0"/>
<ui:PathIcon Height="10" Style="{StaticResource PathIconDataLowerCaseIdentifier}" Margin="3,0"
Visibility="{Binding ShortRoomId,Converter={StaticResource ShortRoomIdToVisibilityConverter}}"/>
<TextBlock Text="{Binding ShortRoomId, StringFormat=\{0\},Mode=OneWay}"
Visibility="{Binding ShortRoomId,Converter={StaticResource ShortRoomIdToVisibilityConverter}}"/>
</StackPanel>
<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-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-02-23 18:03:37 +08:00
ConverterParameter={x:Static confiv2: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-02-23 18:03:37 +08:00
ConverterParameter={x:Static confiv2: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-02-23 18:03:37 +08:00
ConverterParameter={x:Static confiv2: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>
</ui:SimpleStackPanel>
</ScrollViewer>
</Grid>
</ui:ContentDialog>