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 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); }
|
||||
|
||||
[XmlIgnore]
|
||||
|
@ -43,8 +43,8 @@ namespace BFR.Operations
|
|||
|
||||
newName = Mode switch
|
||||
{
|
||||
NumberMode.Prefix => $"{text}{newName}",
|
||||
NumberMode.Suffix => $"{newName}{text}",
|
||||
NumberMode.Prepend => $"{text}{newName}",
|
||||
NumberMode.Append => $"{newName}{text}",
|
||||
NumberMode.Insert => newName.Insert(InsertPosition, text),
|
||||
NumberMode.Replace => newName.Replace(Pattern, text, UseRegex, false),
|
||||
_ => newName
|
||||
|
|
|
@ -8,8 +8,8 @@ namespace BFR.Operations
|
|||
{
|
||||
public class NumberOperationMode : OperationMode<NumberMode>
|
||||
{
|
||||
public bool IsPrefix => Index == NumberMode.Prefix;
|
||||
public bool IsSuffix => Index == NumberMode.Suffix;
|
||||
public bool IsPrepend => Index == NumberMode.Prepend;
|
||||
public bool IsAppend => Index == NumberMode.Append;
|
||||
public bool IsInsert => Index == NumberMode.Insert;
|
||||
public bool IsReplace => Index == NumberMode.Replace;
|
||||
|
||||
|
@ -28,10 +28,10 @@ namespace BFR.Operations
|
|||
|
||||
public enum NumberMode
|
||||
{
|
||||
[OperationMode(nameof(Prefix), "Inserts the numbering before the file name.")]
|
||||
Prefix,
|
||||
[OperationMode(nameof(Suffix), "Inserts the numbering after the file name.")]
|
||||
Suffix,
|
||||
[OperationMode(nameof(Prepend), "Inserts the numbering before the file name.")]
|
||||
Prepend,
|
||||
[OperationMode(nameof(Append), "Inserts the numbering after the file name.")]
|
||||
Append,
|
||||
[OperationMode(nameof(Insert), "Inserts the numbering at the specified index.")]
|
||||
Insert,
|
||||
[OperationMode(nameof(Replace), "Replaces the given pattern with the numbering.")]
|
||||
|
|
Loading…
Reference in New Issue
Block a user