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"
|
2021-01-05 19:08:57 +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:c="clr-namespace:BililiveRecorder.WPF.Controls"
|
2021-11-21 00:08:31 +08:00
|
|
|
xmlns:m="clr-namespace:BililiveRecorder.WPF.Models"
|
2020-11-27 18:51:02 +08:00
|
|
|
xmlns:local="clr-namespace:BililiveRecorder.WPF.Pages"
|
2021-12-19 21:10:34 +08:00
|
|
|
xmlns:config="clr-namespace:BililiveRecorder.Core.Config;assembly=BililiveRecorder.Core"
|
|
|
|
xmlns:configv3="clr-namespace:BililiveRecorder.Core.Config.V3;assembly=BililiveRecorder.Core"
|
2020-11-27 18:51:02 +08:00
|
|
|
mc:Ignorable="d"
|
|
|
|
d:DesignHeight="1500" d:DesignWidth="500"
|
2021-01-01 14:46:27 +08:00
|
|
|
DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=local:RootPage},Path=DataContext.Recorder.Config.Global}"
|
2020-11-27 18:51:02 +08:00
|
|
|
Title="SettingsPage">
|
|
|
|
<ui:Page.Resources>
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
<Setter Property="FontSize" Value="14"/>
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
|
</Style>
|
|
|
|
</ui:Page.Resources>
|
2021-12-19 21:10:34 +08:00
|
|
|
<ScrollViewer d:DataContext="{d:DesignInstance Type=configv3:GlobalConfig}">
|
2020-11-27 18:51:02 +08:00
|
|
|
<ui:SimpleStackPanel Orientation="Vertical" Spacing="5" Margin="20">
|
2021-01-05 19:08:57 +08:00
|
|
|
<TextBlock Text="{l:Loc Settings_SettingsPage_Title}" Style="{StaticResource TitleTextBlockStyle}" FontFamily="Microsoft Yahei" Margin="0,10"/>
|
|
|
|
<GroupBox Header="{l:Loc Settings_Danmaku_Title}">
|
2020-11-27 18:51:02 +08:00
|
|
|
<StackPanel>
|
2021-01-05 19:08:57 +08:00
|
|
|
<ui:ToggleSwitch IsOn="{Binding RecordDanmaku}" Name="RecordDanmakuCheckbox" OnContent="{l:Loc Settings_Danmaku_ToggleSwitch_Enabled}" OffContent="{l:Loc Settings_Danmaku_ToggleSwitch_Enabled}"/>
|
2020-12-10 17:02:56 +08:00
|
|
|
<StackPanel Margin="0,7,0,0" Visibility="{Binding ElementName=RecordDanmakuCheckbox,Path=IsOn,Converter={StaticResource BooleanToVisibilityCollapsedConverter}}">
|
2020-12-19 17:27:45 +08:00
|
|
|
<ui:ToggleSwitch IsEnabled="{Binding RecordDanmaku}" IsOn="{Binding RecordDanmakuSuperChat}"
|
2021-01-05 19:08:57 +08:00
|
|
|
OnContent="{l:Loc Settings_Danmaku_ToggleSwitch_SuperChat}" OffContent="{l:Loc Settings_Danmaku_ToggleSwitch_SuperChat}"/>
|
2020-11-27 18:51:02 +08:00
|
|
|
<ui:ToggleSwitch IsEnabled="{Binding RecordDanmaku}" IsOn="{Binding RecordDanmakuGuard}"
|
2021-01-05 19:08:57 +08:00
|
|
|
OnContent="{l:Loc Settings_Danmaku_ToggleSwitch_Guard}" OffContent="{l:Loc Settings_Danmaku_ToggleSwitch_Guard}"/>
|
2020-12-19 17:27:45 +08:00
|
|
|
<ui:ToggleSwitch IsEnabled="{Binding RecordDanmaku}" IsOn="{Binding RecordDanmakuGift}"
|
2021-01-05 19:08:57 +08:00
|
|
|
OnContent="{l:Loc Settings_Danmaku_ToggleSwitch_Gift}" OffContent="{l:Loc Settings_Danmaku_ToggleSwitch_Gift}"/>
|
2020-12-19 17:27:45 +08:00
|
|
|
<ui:ToggleSwitch IsEnabled="{Binding RecordDanmaku}" IsOn="{Binding RecordDanmakuRaw}"
|
2021-01-05 19:08:57 +08:00
|
|
|
OnContent="{l:Loc Settings_Danmaku_ToggleSwitch_Raw}" OffContent="{l:Loc Settings_Danmaku_ToggleSwitch_Raw}"/>
|
2020-11-27 18:51:02 +08:00
|
|
|
</StackPanel>
|
|
|
|
</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>
|
2021-05-01 23:18:22 +08:00
|
|
|
<RadioButton GroupName="RecordMode" Content="{l:Loc Settings_RecordMode_RadioButton_Standard}"
|
|
|
|
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}"
|
|
|
|
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>
|
|
|
|
</GroupBox>
|
2021-01-05 19:08:57 +08:00
|
|
|
<GroupBox Header="{l:Loc Settings_Splitting_Title}">
|
2020-11-27 18:51:02 +08:00
|
|
|
<StackPanel>
|
2021-01-05 19:08:57 +08:00
|
|
|
<RadioButton GroupName="Splitting" Name="CutDisabledRadioButton" Content="{l:Loc Settings_Splitting_RadioButton_Disabled}"
|
2020-11-27 18:51:02 +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 19:08:57 +08:00
|
|
|
<RadioButton GroupName="Splitting" Name="CutBySizeRadioButton" Content="{l:Loc Settings_Splitting_RadioButton_BySize}"
|
2020-11-27 18:51:02 +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 19:08:57 +08:00
|
|
|
<RadioButton GroupName="Splitting" Name="CutByTimeRadioButton" Content="{l:Loc Settings_Splitting_RadioButton_ByTime}"
|
2020-11-27 18:51:02 +08:00
|
|
|
IsChecked="{Binding Path=CuttingMode, Converter={StaticResource EnumToBooleanConverter},
|
2021-12-19 21:10:34 +08:00
|
|
|
ConverterParameter={x:Static config:CuttingMode.ByTime}}" />
|
2020-11-27 18:51:02 +08:00
|
|
|
|
|
|
|
<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}}">
|
2021-01-05 19:08:57 +08:00
|
|
|
<TextBlock Text="{l:Loc Settings_Splitting_TextBox_Left}"/>
|
2020-11-27 18:51:02 +08:00
|
|
|
<TextBox Margin="5,0" Width="100" Text="{Binding CuttingNumber,Delay=500}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
|
2021-01-05 19:08:57 +08:00
|
|
|
<TextBlock Text="{l:Loc Settings_Splitting_TextBox_SizeUnit}" Visibility="{Binding ElementName=CutBySizeRadioButton,Path=IsChecked,Converter={StaticResource BooleanToVisibilityCollapsedConverter}}"/>
|
|
|
|
<TextBlock Text="{l:Loc Settings_Splitting_TextBox_TimeUnit}" Visibility="{Binding ElementName=CutByTimeRadioButton,Path=IsChecked,Converter={StaticResource BooleanToVisibilityCollapsedConverter}}"/>
|
|
|
|
<TextBlock Text="{l:Loc Settings_Splitting_TextBox_Right}"/>
|
2020-11-27 18:51:02 +08:00
|
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
|
|
|
</GroupBox>
|
2021-01-05 19:08:57 +08:00
|
|
|
<GroupBox Header="{l:Loc Settings_FileName_Title}">
|
|
|
|
<StackPanel MaxWidth="500" HorizontalAlignment="Left">
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
|
|
|
|
<StackPanel.ToolTip>
|
2021-01-08 18:54:50 +08:00
|
|
|
<TextBlock FontSize="13" Text="{l:Loc Settings_FileName_Description_ToolTip}"
|
|
|
|
l:ResxLocalizationProvider.DefaultDictionary="Strings"/>
|
2021-01-05 19:08:57 +08:00
|
|
|
</StackPanel.ToolTip>
|
|
|
|
<ui:PathIcon Margin="2,0" VerticalAlignment="Center" Height="15" Style="{StaticResource PathIconDataInformationOutline}"/>
|
2021-11-21 00:08:31 +08:00
|
|
|
<TextBlock VerticalAlignment="Center" Text="{l:Loc Settings_FileName_Description_Text}"/>
|
|
|
|
<Button Margin="5,0,0,0" Command="{x:Static m:Commands.OpenLink}" CommandParameter="https://rec.danmuji.org/docs/basic/settings/#%E5%BD%95%E5%88%B6%E6%96%87%E4%BB%B6%E5%90%8D%E6%A0%BC%E5%BC%8F">
|
|
|
|
<ui:PathIcon Margin="2,0" VerticalAlignment="Center" Height="15" Style="{StaticResource PathIconDataOpenInNew}"/>
|
|
|
|
</Button>
|
2021-01-05 19:08:57 +08:00
|
|
|
</StackPanel>
|
2021-01-05 22:50:10 +08:00
|
|
|
<c:SettingWithDefault IsSettingNotUsingDefault="{Binding HasRecordFilenameFormat}" Header="{l:Loc Settings_FileName_Record}">
|
2021-01-05 19:08:57 +08:00
|
|
|
<TextBox Text="{Binding RecordFilenameFormat,Delay=500}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
|
|
|
|
</c:SettingWithDefault>
|
|
|
|
</StackPanel>
|
|
|
|
</GroupBox>
|
2021-11-21 00:08:31 +08:00
|
|
|
<GroupBox Header="录制画质">
|
|
|
|
<StackPanel MaxWidth="400" HorizontalAlignment="Left">
|
|
|
|
<Button Margin="5,0,0,0" Command="{x:Static m:Commands.OpenLink}" CommandParameter="https://rec.danmuji.org/docs/basic/settings/#%E7%9B%B4%E6%92%AD%E7%94%BB%E8%B4%A8">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<ui:PathIcon Width="15" Height="15" Style="{StaticResource PathIconDataInformationOutline}"/>
|
|
|
|
<ui:PathIcon Margin="5,0,0,0" Width="15" Height="15" Style="{StaticResource PathIconDataOpenInNew}"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Button>
|
|
|
|
<TextBlock Text="逗号分割的录制画质ID"/>
|
|
|
|
<c:SettingWithDefault IsSettingNotUsingDefault="{Binding HasRecordingQuality}">
|
|
|
|
<TextBox Text="{Binding RecordingQuality,UpdateSourceTrigger=PropertyChanged,Delay=1000}"
|
|
|
|
ui:TextBoxHelper.IsDeleteButtonVisible="False" Width="220" HorizontalAlignment="Left"/>
|
|
|
|
</c:SettingWithDefault>
|
|
|
|
</StackPanel>
|
|
|
|
</GroupBox>
|
2021-01-05 22:50:10 +08:00
|
|
|
<GroupBox Header="{l:Loc Settings_Webhook_Title}">
|
|
|
|
<StackPanel MaxWidth="400" HorizontalAlignment="Left">
|
2021-02-23 18:03:37 +08:00
|
|
|
<TextBlock Text="{l:Loc Settings_Webhook_Address}" Margin="0,0,0,10"/>
|
|
|
|
<TextBlock Text="Webhook v2"/>
|
|
|
|
<TextBox AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible"
|
|
|
|
Text="{Binding WebHookUrlsV2,UpdateSourceTrigger=PropertyChanged,Delay=1000}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
|
|
|
|
<TextBlock Text="Webhook v1"/>
|
2021-01-05 22:50:10 +08:00
|
|
|
<TextBox AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible"
|
|
|
|
Text="{Binding WebHookUrls,UpdateSourceTrigger=PropertyChanged,Delay=1000}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
|
|
|
|
</StackPanel>
|
|
|
|
</GroupBox>
|
2020-11-27 18:51:02 +08:00
|
|
|
</ui:SimpleStackPanel>
|
|
|
|
</ScrollViewer>
|
|
|
|
</ui:Page>
|