Skip to content

Commit ae46db4

Browse files
committed
rename SvgGenerateOption
1 parent fb01734 commit ae46db4

File tree

6 files changed

+10
-12
lines changed

6 files changed

+10
-12
lines changed

OngekiFumenEditor/Kernel/CommandExecutor/DefaultCommandExecutor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ internal class DefaultCommandExecutor : ICommandExecutor
3737
public DefaultCommandExecutor()
3838
{
3939
rootCommand = new RootCommand("CommandLine for OngekiFumenEditor");
40-
rootCommand.AddCommand(GenerateVerbCommands<GenerateOption>("svg", Resources.ProgramCommandDescriptionSvg, ProcessSvgCommand));
40+
rootCommand.AddCommand(GenerateVerbCommands<SvgGenerateOption>("svg", Resources.ProgramCommandDescriptionSvg, ProcessSvgCommand));
4141
rootCommand.AddCommand(GenerateVerbCommands<FumenConvertOption>("convert", Resources.ProgramCommandConvert, ProcessConvertCommand));
4242
rootCommand.AddCommand(GenerateVerbCommands<JacketGenerateOption>("jacket", Resources.ProgramCommandJacket, ProcessJacketCommand));
4343
rootCommand.AddCommand(GenerateVerbCommands<AcbGenerateOption>("acb", Resources.ProgramCommandAcb, ProcessAcbCommand));
@@ -78,7 +78,7 @@ public Task<int> Execute(string[] args)
7878
return command;
7979
}
8080

81-
private async Task<int> ProcessSvgCommand(GenerateOption opt)
81+
private async Task<int> ProcessSvgCommand(SvgGenerateOption opt)
8282
{
8383
if (CheckRelativePaths(opt.AudioFilePath, opt.InputFumenFilePath, opt.OutputFilePath))
8484
return -1;

OngekiFumenEditor/Modules/PreviewSvgGenerator/Commands/GenerateSvg/GenerateSvgCommandHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public override async Task Run(Command command)
3939
{
4040
try
4141
{
42-
var opt = new GenerateOption()
42+
var opt = new SvgGenerateOption()
4343
{
4444
Duration = editor.EditorProjectData.AudioDuration,
4545
OutputFilePath = Path.GetTempFileName() + ".svg"

OngekiFumenEditor/Modules/PreviewSvgGenerator/IPreviewSvgGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ namespace OngekiFumenEditor.Modules.PreviewSvgGenerator
1111
{
1212
public interface IPreviewSvgGenerator
1313
{
14-
Task<byte[]> GenerateSvgAsync(OngekiFumen fumen, GenerateOption option);
14+
Task<byte[]> GenerateSvgAsync(OngekiFumen fumen, SvgGenerateOption option);
1515
}
1616
}

OngekiFumenEditor/Modules/PreviewSvgGenerator/Kernel/DefaultPreviewSvgGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace OngekiFumenEditor.Modules.PreviewSvgGenerator.Kernel
3737
[Export(typeof(IPreviewSvgGenerator))]
3838
public class DefaultPreviewSvgGenerator : IPreviewSvgGenerator
3939
{
40-
private SoflanList GenerateWeightedSoflan(SoflanList soflans, GenerateOption opt)
40+
private SoflanList GenerateWeightedSoflan(SoflanList soflans, SvgGenerateOption opt)
4141
{
4242
var offset = opt.WeightedSoflanOffset;
4343
var stress = opt.WeightedSoflanStress;
@@ -70,7 +70,7 @@ float sigmoid(float x)
7070
return newList;
7171
}
7272

73-
public async Task<byte[]> GenerateSvgAsync(OngekiFumen rawFumen, GenerateOption option)
73+
public async Task<byte[]> GenerateSvgAsync(OngekiFumen rawFumen, SvgGenerateOption option)
7474
{
7575
var svgDocument = new SvgDocument();
7676

OngekiFumenEditor/Modules/PreviewSvgGenerator/Kernel/GenerateContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace OngekiFumenEditor.Modules.PreviewSvgGenerator.Kernel
1010
{
1111
public class GenerateContext
1212
{
13-
public GenerateOption Option { get; init; }
13+
public SvgGenerateOption Option { get; init; }
1414
public double TotalWidth => Option.ViewWidth;
1515
public double TotalHeight { get; init; }
1616
public TGrid MaxTGrid { get; init; }

OngekiFumenEditor/Modules/PreviewSvgGenerator/GenerateOption.cs renamed to OngekiFumenEditor/Modules/PreviewSvgGenerator/SvgGenerateOption.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44

55
namespace OngekiFumenEditor.Modules.PreviewSvgGenerator
66
{
7-
public class GenerateOption
7+
public class SvgGenerateOption
88
{
99
[LocalizableOptionBinding<string>("inputFile", nameof(Resources.ProgramOptionInputFileNyageki), default, true)]
1010
public string InputFumenFilePath { get; set; }
1111
[LocalizableOptionBinding<string>("outputFile", nameof(Resources.ProgramOptionOutputFile), default, true)]
1212
public string OutputFilePath { get; set; }
13+
[LocalizableOptionBinding<string>("audioFile", nameof(Resources.ProgramOptionInputFileAudio), default, true)]
14+
public string AudioFilePath { get; set; }
1315

1416
[LocalizableOptionBinding<double>("maxXGrid", nameof(Resources.ProgramOptionSvgMaxXGrid), 40)]
1517
public double XGridDisplayMaxUnit { get; set; } = 40;
@@ -18,12 +20,8 @@ public class GenerateOption
1820
[LocalizableOptionBinding<double>("verticalScale", nameof(Resources.ProgramOptionSvgVerticalScale), 1)]
1921
public double VerticalScale { get; set; } = 1;
2022

21-
[LocalizableOptionBinding<string>("audioFile", nameof(Resources.ProgramOptionInputFileAudio), default)]
22-
public string AudioFilePath { get; set; }
23-
2423
[LocalizableOptionBinding<SoflanMode>("soflanMode", nameof(Resources.ProgramOptionSvgSoflanMode), SoflanMode.Soflan)]
2524
public SoflanMode SoflanMode { get; set; } = SoflanMode.WeightedSoflan;
26-
2725
[LocalizableOptionBinding<float>("weightedSoflanOffset", nameof(Resources.ProgramOptionSvgWeightedSoflanOffset), 70f)]
2826
public float WeightedSoflanOffset { get; set; } = 70f;
2927
[LocalizableOptionBinding<float>("weightedSoflanStress", nameof(Resources.ProgramOptionSvgWeightedSoflanStress), 0.95f)]

0 commit comments

Comments
 (0)