Renamed Prefix/Suffix modes to Prepend/Append
This commit is contained in:
parent
6a17c0a81c
commit
c6477cb342
|
@ -14,7 +14,7 @@ namespace BFR.Operations
|
||||||
public override string Description => "Numbers all file names according to how they are sorted.";
|
public override string Description => "Numbers all file names according to how they are sorted.";
|
||||||
|
|
||||||
public static readonly AvaloniaProperty<NumberMode> ModeProperty =
|
public static readonly AvaloniaProperty<NumberMode> ModeProperty =
|
||||||
AvaloniaProperty.Register<MainWindow, NumberMode>(nameof(Mode), NumberMode.Prefix);
|
AvaloniaProperty.Register<MainWindow, NumberMode>(nameof(Mode), NumberMode.Prepend);
|
||||||
public NumberMode Mode { get => GetValue(ModeProperty); set => SetValue(ModeProperty, value); }
|
public NumberMode Mode { get => GetValue(ModeProperty); set => SetValue(ModeProperty, value); }
|
||||||
|
|
||||||
[XmlIgnore]
|
[XmlIgnore]
|
||||||
|
@ -43,8 +43,8 @@ namespace BFR.Operations
|
||||||
|
|
||||||
newName = Mode switch
|
newName = Mode switch
|
||||||
{
|
{
|
||||||
NumberMode.Prefix => $"{text}{newName}",
|
NumberMode.Prepend => $"{text}{newName}",
|
||||||
NumberMode.Suffix => $"{newName}{text}",
|
NumberMode.Append => $"{newName}{text}",
|
||||||
NumberMode.Insert => newName.Insert(InsertPosition, text),
|
NumberMode.Insert => newName.Insert(InsertPosition, text),
|
||||||
NumberMode.Replace => newName.Replace(Pattern, text, UseRegex, false),
|
NumberMode.Replace => newName.Replace(Pattern, text, UseRegex, false),
|
||||||
_ => newName
|
_ => newName
|
||||||
|
|
|
@ -8,8 +8,8 @@ namespace BFR.Operations
|
||||||
{
|
{
|
||||||
public class NumberOperationMode : OperationMode<NumberMode>
|
public class NumberOperationMode : OperationMode<NumberMode>
|
||||||
{
|
{
|
||||||
public bool IsPrefix => Index == NumberMode.Prefix;
|
public bool IsPrepend => Index == NumberMode.Prepend;
|
||||||
public bool IsSuffix => Index == NumberMode.Suffix;
|
public bool IsAppend => Index == NumberMode.Append;
|
||||||
public bool IsInsert => Index == NumberMode.Insert;
|
public bool IsInsert => Index == NumberMode.Insert;
|
||||||
public bool IsReplace => Index == NumberMode.Replace;
|
public bool IsReplace => Index == NumberMode.Replace;
|
||||||
|
|
||||||
|
@ -28,10 +28,10 @@ namespace BFR.Operations
|
||||||
|
|
||||||
public enum NumberMode
|
public enum NumberMode
|
||||||
{
|
{
|
||||||
[OperationMode(nameof(Prefix), "Inserts the numbering before the file name.")]
|
[OperationMode(nameof(Prepend), "Inserts the numbering before the file name.")]
|
||||||
Prefix,
|
Prepend,
|
||||||
[OperationMode(nameof(Suffix), "Inserts the numbering after the file name.")]
|
[OperationMode(nameof(Append), "Inserts the numbering after the file name.")]
|
||||||
Suffix,
|
Append,
|
||||||
[OperationMode(nameof(Insert), "Inserts the numbering at the specified index.")]
|
[OperationMode(nameof(Insert), "Inserts the numbering at the specified index.")]
|
||||||
Insert,
|
Insert,
|
||||||
[OperationMode(nameof(Replace), "Replaces the given pattern with the numbering.")]
|
[OperationMode(nameof(Replace), "Replaces the given pattern with the numbering.")]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user