mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 11:42:22 +08:00
Switch to config v3
This commit is contained in:
parent
8a65c9645d
commit
441343e92e
|
@ -5,6 +5,7 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using BililiveRecorder.Core.Config;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
|
||||
namespace BililiveRecorder.Cli.Configure
|
||||
|
|
|
@ -7,7 +7,7 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using BililiveRecorder.Core.Config;
|
||||
using BililiveRecorder.Core.Config.V2;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
using Spectre.Console;
|
||||
|
||||
namespace BililiveRecorder.Cli.Configure
|
||||
|
@ -30,7 +30,7 @@ namespace BililiveRecorder.Cli.Configure
|
|||
return 0;
|
||||
}
|
||||
|
||||
private static void ShowRootMenu(ConfigV2 config, string fullPath)
|
||||
private static void ShowRootMenu(ConfigV3 config, string fullPath)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ namespace BililiveRecorder.Cli.Configure
|
|||
}
|
||||
}
|
||||
|
||||
private static void SetRoomConfig(ConfigV2 config)
|
||||
private static void SetRoomConfig(ConfigV3 config)
|
||||
{
|
||||
if (config.Rooms.Count < 1)
|
||||
{
|
||||
|
@ -112,7 +112,7 @@ namespace BililiveRecorder.Cli.Configure
|
|||
}
|
||||
}
|
||||
|
||||
private static void SetGlobalConfig(ConfigV2 config)
|
||||
private static void SetGlobalConfig(ConfigV3 config)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
|
@ -136,7 +136,7 @@ namespace BililiveRecorder.Cli.Configure
|
|||
}
|
||||
}
|
||||
|
||||
private static void ListRooms(ConfigV2 config)
|
||||
private static void ListRooms(ConfigV3 config)
|
||||
{
|
||||
var table = new Table()
|
||||
.AddColumns("Roomid", "AutoRecord")
|
||||
|
@ -150,7 +150,7 @@ namespace BililiveRecorder.Cli.Configure
|
|||
AnsiConsole.Render(table);
|
||||
}
|
||||
|
||||
private static void AddRoom(ConfigV2 config)
|
||||
private static void AddRoom(ConfigV3 config)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
|
@ -177,7 +177,7 @@ namespace BililiveRecorder.Cli.Configure
|
|||
}
|
||||
}
|
||||
|
||||
private static void DeleteRoom(ConfigV2 config)
|
||||
private static void DeleteRoom(ConfigV3 config)
|
||||
{
|
||||
var toBeDeleted = AnsiConsole.Prompt(new MultiSelectionPrompt<RoomConfig>()
|
||||
.Title("Delete rooms")
|
||||
|
@ -194,7 +194,7 @@ namespace BililiveRecorder.Cli.Configure
|
|||
AnsiConsole.MarkupLine("[green]{0} rooms deleted[/]", toBeDeleted.Count);
|
||||
}
|
||||
|
||||
private static void SetJsonSchema(ConfigV2 config)
|
||||
private static void SetJsonSchema(ConfigV3 config)
|
||||
{
|
||||
var selection = PromptEnumSelection<JsonSchemaSelection>();
|
||||
switch (selection)
|
||||
|
@ -210,7 +210,7 @@ namespace BililiveRecorder.Cli.Configure
|
|||
}
|
||||
}
|
||||
|
||||
private static bool SaveConfig(ConfigV2 config, string fullPath)
|
||||
private static bool SaveConfig(ConfigV3 config, string fullPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ namespace BililiveRecorder.Cli.Configure
|
|||
}
|
||||
}
|
||||
|
||||
private static bool FindConfig(string path, [NotNullWhen(true)] out ConfigV2? config, out string fullPath)
|
||||
private static bool FindConfig(string path, [NotNullWhen(true)] out ConfigV3? config, out string fullPath)
|
||||
{
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
|
@ -241,7 +241,7 @@ namespace BililiveRecorder.Cli.Configure
|
|||
if (File.Exists(fullPath))
|
||||
config = ConfigParser.LoadJson(File.ReadAllText(fullPath, Encoding.UTF8));
|
||||
else
|
||||
config = new ConfigV2();
|
||||
config = new ConfigV3();
|
||||
|
||||
var result = config != null;
|
||||
if (!result)
|
||||
|
|
|
@ -9,7 +9,7 @@ using BililiveRecorder.Cli.Configure;
|
|||
using System.Threading.Tasks;
|
||||
using BililiveRecorder.Core;
|
||||
using BililiveRecorder.Core.Config;
|
||||
using BililiveRecorder.Core.Config.V2;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
using BililiveRecorder.DependencyInjection;
|
||||
using BililiveRecorder.ToolBox;
|
||||
using BililiveRecorder.Web;
|
||||
|
@ -44,7 +44,7 @@ namespace BililiveRecorder.Cli
|
|||
new Option<LogEventLevel>(new []{ "--logfilelevel", "--flog" }, () => LogEventLevel.Debug, "Minimal log level output to file"),
|
||||
new Option<RecordMode>(new []{ "--record-mode", "--mode" }, () => RecordMode.Standard, "Recording mode"),
|
||||
new Option<string>(new []{ "--cookie", "-c" }, "Cookie string for api requests"),
|
||||
new Option<string>(new []{ "--filename-format", "-f" }, "File name format"),
|
||||
new Option<string>(new []{ "--filename", "-f" }, "File name format"),
|
||||
new Option<PortableModeArguments.PortableDanmakuMode>(new []{ "--danmaku", "-d" }, "Flags for danmaku recording"),
|
||||
new Option<string>("--webhook-url", "URL of webhoook"),
|
||||
new Option<string>("--live-api-host"),
|
||||
|
@ -149,7 +149,7 @@ namespace BililiveRecorder.Cli
|
|||
using var logger = BuildLogger(opts.LogLevel, opts.LogFileLevel);
|
||||
Log.Logger = logger;
|
||||
|
||||
var config = new ConfigV2()
|
||||
var config = new ConfigV3()
|
||||
{
|
||||
DisableConfigSave = true,
|
||||
};
|
||||
|
@ -163,8 +163,8 @@ namespace BililiveRecorder.Cli
|
|||
if (!string.IsNullOrWhiteSpace(opts.LiveApiHost))
|
||||
global.LiveApiHost = opts.LiveApiHost;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(opts.FilenameFormat))
|
||||
global.RecordFilenameFormat = opts.FilenameFormat;
|
||||
if (!string.IsNullOrWhiteSpace(opts.Filename))
|
||||
global.FileNameRecordTemplate = opts.Filename;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(opts.WebhookUrl))
|
||||
global.WebHookUrlsV2 = opts.WebhookUrl;
|
||||
|
@ -203,7 +203,7 @@ namespace BililiveRecorder.Cli
|
|||
return 0;
|
||||
}
|
||||
|
||||
private static IServiceProvider BuildServiceProvider(ConfigV2 config, ILogger logger) => new ServiceCollection()
|
||||
private static IServiceProvider BuildServiceProvider(ConfigV3 config, ILogger logger) => new ServiceCollection()
|
||||
.AddSingleton(logger)
|
||||
.AddFlv()
|
||||
.AddRecorderConfig(config)
|
||||
|
@ -254,7 +254,7 @@ namespace BililiveRecorder.Cli
|
|||
|
||||
public string? LiveApiHost { get; set; }
|
||||
|
||||
public string? FilenameFormat { get; set; }
|
||||
public string? Filename { get; set; }
|
||||
|
||||
public string? WebhookUrl { get; set; }
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ using System.Net.Http;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BililiveRecorder.Core.Api.Model;
|
||||
using BililiveRecorder.Core.Config.V2;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BililiveRecorder.Core.Api.Http
|
||||
|
@ -23,7 +23,7 @@ namespace BililiveRecorder.Core.Api.Http
|
|||
private HttpClient mainClient;
|
||||
private bool disposedValue;
|
||||
|
||||
public HttpClient MainHttpClient => mainClient;
|
||||
public HttpClient MainHttpClient => this.mainClient;
|
||||
|
||||
public HttpApiClient(GlobalConfig config)
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using BililiveRecorder.Core.Api.Danmaku;
|
||||
using BililiveRecorder.Core.Config.V2;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
using Serilog;
|
||||
|
||||
#nullable enable
|
||||
|
|
|
@ -2,7 +2,7 @@ using BililiveRecorder.Core;
|
|||
using BililiveRecorder.Core.Api;
|
||||
using BililiveRecorder.Core.Api.Danmaku;
|
||||
using BililiveRecorder.Core.Api.Http;
|
||||
using BililiveRecorder.Core.Config.V2;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
using BililiveRecorder.Core.Danmaku;
|
||||
using BililiveRecorder.Core.Recording;
|
||||
using BililiveRecorder.Flv;
|
||||
|
@ -13,9 +13,9 @@ namespace BililiveRecorder.DependencyInjection
|
|||
{
|
||||
public static class DependencyInjectionExtensions
|
||||
{
|
||||
public static IServiceCollection AddRecorderConfig(this IServiceCollection services, ConfigV2 config) => services
|
||||
public static IServiceCollection AddRecorderConfig(this IServiceCollection services, ConfigV3 config) => services
|
||||
.AddSingleton(config)
|
||||
.AddSingleton(sp => sp.GetRequiredService<ConfigV2>().Global)
|
||||
.AddSingleton(sp => sp.GetRequiredService<ConfigV3>().Global)
|
||||
;
|
||||
|
||||
public static IServiceCollection AddRecorder(this IServiceCollection services) => services
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using BililiveRecorder.Core.Config.V2;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
using BililiveRecorder.Core.Event;
|
||||
|
||||
namespace BililiveRecorder.Core
|
||||
{
|
||||
public interface IRecorder : INotifyPropertyChanged, IDisposable
|
||||
{
|
||||
ConfigV2 Config { get; }
|
||||
ConfigV3 Config { get; }
|
||||
ReadOnlyObservableCollection<IRoom> Rooms { get; }
|
||||
|
||||
event EventHandler<AggregatedRoomEventArgs<RecordSessionStartedEventArgs>>? RecordSessionStarted;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Threading.Tasks;
|
||||
using BililiveRecorder.Core.Config.V2;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
using BililiveRecorder.Core.Event;
|
||||
|
||||
namespace BililiveRecorder.Core
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using BililiveRecorder.Core.Config.V2;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
|
||||
namespace BililiveRecorder.Core
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.ComponentModel;
|
|||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using BililiveRecorder.Core.Config;
|
||||
using BililiveRecorder.Core.Config.V2;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
using BililiveRecorder.Core.Event;
|
||||
using BililiveRecorder.Core.SimpleWebhook;
|
||||
using Serilog;
|
||||
|
@ -22,7 +22,7 @@ namespace BililiveRecorder.Core
|
|||
|
||||
private bool disposedValue;
|
||||
|
||||
public Recorder(IRoomFactory roomFactory, ConfigV2 config, ILogger logger)
|
||||
public Recorder(IRoomFactory roomFactory, ConfigV3 config, ILogger logger)
|
||||
{
|
||||
this.roomFactory = roomFactory ?? throw new ArgumentNullException(nameof(roomFactory));
|
||||
this.Config = config ?? throw new ArgumentNullException(nameof(config));
|
||||
|
@ -54,7 +54,7 @@ namespace BililiveRecorder.Core
|
|||
public event EventHandler<AggregatedRoomEventArgs<RecordingStatsEventArgs>>? RecordingStats;
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
public ConfigV2 Config { get; }
|
||||
public ConfigV3 Config { get; }
|
||||
|
||||
public ReadOnlyObservableCollection<IRoom> Rooms { get; }
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ namespace BililiveRecorder.Core.Recording
|
|||
|
||||
protected (string fullPath, string relativePath) CreateFileName()
|
||||
{
|
||||
var formatString = this.room.RoomConfig.RecordFilenameFormat!;
|
||||
var formatString = this.room.RoomConfig.FileNameRecordTemplate!; // TODO
|
||||
|
||||
var now = DateTime.Now;
|
||||
var date = now.ToString("yyyyMMdd");
|
||||
|
|
|
@ -6,7 +6,7 @@ using System.Runtime.CompilerServices;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BililiveRecorder.Core.Api;
|
||||
using BililiveRecorder.Core.Config.V2;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
using BililiveRecorder.Core.Danmaku;
|
||||
using BililiveRecorder.Core.Event;
|
||||
using BililiveRecorder.Core.Recording;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
using System;
|
||||
using BililiveRecorder.Core.Config.V2;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace BililiveRecorder.Core
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Linq;
|
|||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BililiveRecorder.Core.Config.V2;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
using Newtonsoft.Json;
|
||||
using Serilog;
|
||||
|
||||
|
@ -14,7 +14,7 @@ namespace BililiveRecorder.Core.SimpleWebhook
|
|||
private static readonly ILogger logger = Log.ForContext<BasicWebhookV1>();
|
||||
private static readonly HttpClient client;
|
||||
|
||||
private readonly ConfigV2 Config;
|
||||
private readonly ConfigV3 Config;
|
||||
|
||||
static BasicWebhookV1()
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ namespace BililiveRecorder.Core.SimpleWebhook
|
|||
client.DefaultRequestHeaders.Add("User-Agent", $"BililiveRecorder/{GitVersionInformation.FullSemVer}");
|
||||
}
|
||||
|
||||
public BasicWebhookV1(ConfigV2 config)
|
||||
public BasicWebhookV1(ConfigV3 config)
|
||||
{
|
||||
this.Config = config ?? throw new ArgumentNullException(nameof(config));
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Linq;
|
|||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BililiveRecorder.Core.Config.V2;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
using BililiveRecorder.Core.Event;
|
||||
using Newtonsoft.Json;
|
||||
using Serilog;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
l:ResxLocalizationProvider.DefaultAssembly="BililiveRecorder.WPF"
|
||||
l:ResxLocalizationProvider.DefaultDictionary="Strings"
|
||||
xmlns:local="clr-namespace:BililiveRecorder.WPF.Controls"
|
||||
xmlns:confiv2="clr-namespace:BililiveRecorder.Core.Config.V2;assembly=BililiveRecorder.Core"
|
||||
xmlns:config="clr-namespace:BililiveRecorder.Core.Config;assembly=BililiveRecorder.Core"
|
||||
xmlns:core="clr-namespace:BililiveRecorder.Core;assembly=BililiveRecorder.Core"
|
||||
d:DataContext="{d:DesignInstance core:Room}"
|
||||
DefaultButton="Close"
|
||||
|
@ -53,10 +53,10 @@
|
|||
<StackPanel>
|
||||
<RadioButton GroupName="RecordMode" Content="{l:Loc Settings_RecordMode_RadioButton_Standard}"
|
||||
IsChecked="{Binding Path=RecordMode, Converter={StaticResource EnumToBooleanConverter},
|
||||
ConverterParameter={x:Static confiv2:RecordMode.Standard}}" />
|
||||
ConverterParameter={x:Static config:RecordMode.Standard}}" />
|
||||
<RadioButton GroupName="RecordMode" Content="{l:Loc Settings_RecordMode_RadioButton_RawData}"
|
||||
IsChecked="{Binding Path=RecordMode, Converter={StaticResource EnumToBooleanConverter},
|
||||
ConverterParameter={x:Static confiv2:RecordMode.RawData}}" />
|
||||
ConverterParameter={x:Static config:RecordMode.RawData}}" />
|
||||
</StackPanel>
|
||||
</local:SettingWithDefault>
|
||||
</StackPanel>
|
||||
|
@ -67,13 +67,13 @@
|
|||
<StackPanel>
|
||||
<RadioButton GroupName="Splitting" Content="{l:Loc Settings_Splitting_RadioButton_Disabled}"
|
||||
IsChecked="{Binding Path=CuttingMode, Converter={StaticResource EnumToBooleanConverter},
|
||||
ConverterParameter={x:Static confiv2:CuttingMode.Disabled}}" />
|
||||
ConverterParameter={x:Static config:CuttingMode.Disabled}}" />
|
||||
<RadioButton GroupName="Splitting" Content="{l:Loc Settings_Splitting_RadioButton_BySize}"
|
||||
IsChecked="{Binding Path=CuttingMode, Converter={StaticResource EnumToBooleanConverter},
|
||||
ConverterParameter={x:Static confiv2:CuttingMode.BySize}}" />
|
||||
ConverterParameter={x:Static config:CuttingMode.BySize}}" />
|
||||
<RadioButton GroupName="Splitting" Content="{l:Loc Settings_Splitting_RadioButton_ByTime}"
|
||||
IsChecked="{Binding Path=CuttingMode, Converter={StaticResource EnumToBooleanConverter},
|
||||
ConverterParameter={x:Static confiv2:CuttingMode.ByTime}}" />
|
||||
ConverterParameter={x:Static config:CuttingMode.ByTime}}" />
|
||||
</StackPanel>
|
||||
</local:SettingWithDefault>
|
||||
<local:SettingWithDefault IsSettingNotUsingDefault="{Binding HasCuttingNumber}">
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
l:ResxLocalizationProvider.DefaultDictionary="Strings"
|
||||
xmlns:c="clr-namespace:BililiveRecorder.WPF.Controls"
|
||||
xmlns:local="clr-namespace:BililiveRecorder.WPF.Pages"
|
||||
xmlns:config="clr-namespace:BililiveRecorder.Core.Config.V2;assembly=BililiveRecorder.Core"
|
||||
xmlns:configv3="clr-namespace:BililiveRecorder.Core.Config.V3;assembly=BililiveRecorder.Core"
|
||||
xmlns:model="clr-namespace:BililiveRecorder.WPF.Models"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1500" d:DesignWidth="500"
|
||||
|
@ -31,7 +31,7 @@
|
|||
<Setter Property="SpinButtonPlacementMode" Value="Inline"/>
|
||||
</Style>
|
||||
</ui:Page.Resources>
|
||||
<ScrollViewer d:DataContext="{d:DesignInstance Type=config:GlobalConfig}">
|
||||
<ScrollViewer d:DataContext="{d:DesignInstance Type=configv3:GlobalConfig}">
|
||||
<ui:SimpleStackPanel Orientation="Vertical" Spacing="5" Margin="20">
|
||||
<TextBlock Text="{l:Loc Settings_AdvancedPage_Title}" Style="{StaticResource TitleTextBlockStyle}" FontFamily="Microsoft YaHei" Margin="0,10"/>
|
||||
<TextBlock Text="{l:Loc Settings_AdvancedPage_Warning}"/>
|
||||
|
|
|
@ -278,7 +278,7 @@ You can uninstall me in system settings.", "安装成功 Installed", MessageBoxB
|
|||
}
|
||||
}
|
||||
|
||||
private ServiceProvider BuildServiceProvider(Core.Config.V2.ConfigV2 config, ILogger logger) => new ServiceCollection()
|
||||
private ServiceProvider BuildServiceProvider(Core.Config.V3.ConfigV3 config, ILogger logger) => new ServiceCollection()
|
||||
.AddSingleton(logger)
|
||||
.AddRecorderConfig(config)
|
||||
.AddFlv()
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
xmlns:c="clr-namespace:BililiveRecorder.WPF.Controls"
|
||||
xmlns:m="clr-namespace:BililiveRecorder.WPF.Models"
|
||||
xmlns:local="clr-namespace:BililiveRecorder.WPF.Pages"
|
||||
xmlns:config="clr-namespace:BililiveRecorder.Core.Config.V2;assembly=BililiveRecorder.Core"
|
||||
xmlns:confiv2="clr-namespace:BililiveRecorder.Core.Config.V2;assembly=BililiveRecorder.Core"
|
||||
xmlns:config="clr-namespace:BililiveRecorder.Core.Config;assembly=BililiveRecorder.Core"
|
||||
xmlns:configv3="clr-namespace:BililiveRecorder.Core.Config.V3;assembly=BililiveRecorder.Core"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1500" d:DesignWidth="500"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=local:RootPage},Path=DataContext.Recorder.Config.Global}"
|
||||
|
@ -24,7 +24,7 @@
|
|||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</ui:Page.Resources>
|
||||
<ScrollViewer d:DataContext="{d:DesignInstance Type=config:GlobalConfig}">
|
||||
<ScrollViewer d:DataContext="{d:DesignInstance Type=configv3:GlobalConfig}">
|
||||
<ui:SimpleStackPanel Orientation="Vertical" Spacing="5" Margin="20">
|
||||
<TextBlock Text="{l:Loc Settings_SettingsPage_Title}" Style="{StaticResource TitleTextBlockStyle}" FontFamily="Microsoft Yahei" Margin="0,10"/>
|
||||
<GroupBox Header="{l:Loc Settings_Danmaku_Title}">
|
||||
|
@ -46,23 +46,23 @@
|
|||
<StackPanel>
|
||||
<RadioButton GroupName="RecordMode" Content="{l:Loc Settings_RecordMode_RadioButton_Standard}"
|
||||
IsChecked="{Binding Path=RecordMode, Converter={StaticResource EnumToBooleanConverter},
|
||||
ConverterParameter={x:Static confiv2:RecordMode.Standard}}" />
|
||||
ConverterParameter={x:Static config:RecordMode.Standard}}" />
|
||||
<RadioButton GroupName="RecordMode" Content="{l:Loc Settings_RecordMode_RadioButton_RawData}"
|
||||
IsChecked="{Binding Path=RecordMode, Converter={StaticResource EnumToBooleanConverter},
|
||||
ConverterParameter={x:Static confiv2:RecordMode.RawData}}" />
|
||||
ConverterParameter={x:Static config:RecordMode.RawData}}" />
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox Header="{l:Loc Settings_Splitting_Title}">
|
||||
<StackPanel>
|
||||
<RadioButton GroupName="Splitting" Name="CutDisabledRadioButton" Content="{l:Loc Settings_Splitting_RadioButton_Disabled}"
|
||||
IsChecked="{Binding Path=CuttingMode, Converter={StaticResource EnumToBooleanConverter},
|
||||
ConverterParameter={x:Static confiv2:CuttingMode.Disabled}}" />
|
||||
ConverterParameter={x:Static config:CuttingMode.Disabled}}" />
|
||||
<RadioButton GroupName="Splitting" Name="CutBySizeRadioButton" Content="{l:Loc Settings_Splitting_RadioButton_BySize}"
|
||||
IsChecked="{Binding Path=CuttingMode, Converter={StaticResource EnumToBooleanConverter},
|
||||
ConverterParameter={x:Static confiv2:CuttingMode.BySize}}" />
|
||||
ConverterParameter={x:Static config:CuttingMode.BySize}}" />
|
||||
<RadioButton GroupName="Splitting" Name="CutByTimeRadioButton" Content="{l:Loc Settings_Splitting_RadioButton_ByTime}"
|
||||
IsChecked="{Binding Path=CuttingMode, Converter={StaticResource EnumToBooleanConverter},
|
||||
ConverterParameter={x:Static confiv2:CuttingMode.ByTime}}" />
|
||||
ConverterParameter={x:Static config:CuttingMode.ByTime}}" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,5,0,0"
|
||||
Visibility="{Binding ElementName=CutDisabledRadioButton,Path=IsChecked,Converter={StaticResource InvertBooleanToVisibilityCollapsedConverter}}">
|
||||
|
|
|
@ -4,6 +4,7 @@ import { trimEnd } from "../utils";
|
|||
export default function (data: ConfigEntry[]): string {
|
||||
let result = `using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using BililiveRecorder.Core.Config;
|
||||
using BililiveRecorder.Core.Config.V3;
|
||||
|
||||
namespace BililiveRecorder.Cli.Configure
|
||||
|
|
Loading…
Reference in New Issue
Block a user