Compare commits

..

No commits in common. "master" and "v1.0.1" have entirely different histories.

6 changed files with 75 additions and 137 deletions

8
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,8 @@
image: ilyasemenov/gitlab-ci-git-push
stages:
- deploy
deploy to production:
stage: deploy
script: git-push git@github.com:adroslice/bfr.git

View File

@ -12,7 +12,7 @@
</AvaloniaResource> </AvaloniaResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Avalonia" Version="0.9.0-preview8" /> <PackageReference Include="Avalonia" Version="0.9.0-preview7" />
<PackageReference Include="Avalonia.Desktop" Version="0.9.0-preview8" /> <PackageReference Include="Avalonia.Desktop" Version="0.9.0-preview7" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -35,17 +35,17 @@
<TextBox Classes="HeaderTextBox" Grid.Row="1" Grid.Column="2" Text="After"/> <TextBox Classes="HeaderTextBox" Grid.Row="1" Grid.Column="2" Text="After"/>
<!-- Current and Preview ListBoxes --> <!-- Current and Preview ListBoxes -->
<ListBox Grid.Row="2" Grid.Column="0" Items="{Binding Files}"> <ListBox Grid.Row="2" Grid.Column="0" Items="{Binding Files}" IsEnabled="False">
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding OldFullName}" ToolTip.Tip="{Binding OldPath}" Background="Transparent"/> <TextBlock Text="{Binding OldFullName}"/>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</ListBox> </ListBox>
<ListBox Grid.Row="2" Grid.Column="2" Items="{Binding Files}"> <ListBox Grid.Row="2" Grid.Column="2" Items="{Binding Files}" IsEnabled="False">
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding FullName}" ToolTip.Tip="{Binding Path}" Background="Transparent"/> <TextBlock Text="{Binding FullName}"/>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</ListBox> </ListBox>
@ -55,11 +55,14 @@
<!-- Operations ListBox --> <!-- Operations ListBox -->
<ListBox Grid.Row="0" Items="{Binding Operations}" Name="OperationsListBox" SelectedIndex="{Binding SelectedOperation}"/> <ListBox Grid.Row="0" Items="{Binding Operations}" Name="OperationsListBox" SelectedIndex="{Binding SelectedOperation}"/>
<!-- Add Operation --> <!-- Operations Controls -->
<Border Grid.Row="1" Classes="ConnectUp"> <Border Grid.Row="1" Classes="ConnectUp">
<Grid ColumnDefinitions="*,auto"> <Grid ColumnDefinitions="auto,*,auto,auto,auto">
<ComboBox Grid.Column="0" Items="{Binding OperationTypes}" SelectedIndex="{Binding SelectedOperationType}" ToolTip.Tip="The type of the operation to add."/> <TextBlock Grid.Column="0" Text="New:"/>
<Button Grid.Column="1" Content="Add" Command="{Binding AddOperation}" ToolTip.Tip="Adds a new operation after the one selected (or at the end)."/> <ComboBox Grid.Column="1" Items="{Binding OperationTypes}" SelectedIndex="{Binding SelectedOperationType}" ToolTip.Tip="The type of the operation to add."/>
<Button Grid.Column="2" Content=" + " Command="{Binding AddOperation}" ToolTip.Tip="Adds a new operation after the one selected (or at the end)."/>
<Button Grid.Column="3" Content=" - " Command="{Binding RemoveOperation}" ToolTip.Tip="Removes the selected operation (or the first one)."/>
<ButtonSpinner Grid.Column="4" Spin="MoveOperation" ToolTip.Tip="Moves the selected operation (or the first one)."/>
</Grid> </Grid>
</Border> </Border>
@ -114,7 +117,6 @@
<Setter Property="Margin" Value="4,4,4,-5"/> <Setter Property="Margin" Value="4,4,4,-5"/>
<Setter Property="TextAlignment" Value="Center"/> <Setter Property="TextAlignment" Value="Center"/>
<Setter Property="FontWeight" Value="Bold"/> <Setter Property="FontWeight" Value="Bold"/>
<Setter Property="IsEnabled" Value="False"/>
</Style> </Style>
<Style Selector="Grid.StyleBorders > Border"> <Style Selector="Grid.StyleBorders > Border">
<Setter Property="Margin" Value="4"/> <Setter Property="Margin" Value="4"/>
@ -126,58 +128,19 @@
<Setter Property="Margin" Value="4,-5,4,4"/> <Setter Property="Margin" Value="4,-5,4,4"/>
</Style> </Style>
<!-- Drag + Drop --> <!-- Operation Styles -->
<Style Selector="ListBoxItem.BlackBottom"> <Style Selector="Expander.OperationExpander">
<Setter Property="BorderThickness" Value="0,0,0,2"/> <Setter Property="Header">
<Setter Property="BorderBrush" Value="Black"/> <Template>
<Setter Property="Margin" Value="0,0,0,-2"/> <Grid ColumnDefinitions="auto,*,auto">
</Style> <CheckBox Grid.Column="0" Margin="0,0,8,0" IsChecked="{Binding IsEnabled}" Command="{Binding $parent[6].DataContext.Preview}" ToolTip.Tip="Enable/Disable the operation."/>
<Style Selector="ListBoxItem.BlackTop"> <TextBlock Grid.Column="1" Margin="0,0,8,0" Text="{Binding Name}" ToolTip.Tip="Click here to expand, or further to the side to select this operation."/>
<Setter Property="BorderThickness" Value="0,2,0,0"/> <Grid Grid.Column="2" ToolTip.Tip="{Binding Error}" IsVisible="{Binding !!Error.Length}">
<Setter Property="BorderBrush" Value="Black"/>
<Setter Property="Margin" Value="0,-2,0,0"/>
</Style>
<!-- Expander Fix -->
<Style Selector="Expander /template/ ToggleButton#PART_toggle /template/ Border">
<Setter Property="Background" Value="Transparent"/>
</Style>
<!-- List Destyling -->
<Style Selector="ListBoxItem:not(:pointerover):selected /template/ ContentPresenter">
<Setter Property="Background" Value="Transparent"/>
</Style>
<Style Selector="ListBoxItem:pointerover:selected /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource ThemeControlHighlightMidBrush}"/>
</Style>
<!-- Operation Control (Wrapper) -->
<Style Selector="ContentControl.OperationControl">
<Setter Property="Template">
<ControlTemplate>
<Grid ColumnDefinitions="*,auto,auto,auto" RowDefinitions="auto,auto" Name="OperationGrid" Margin="0" Background="Transparent">
<Expander Grid.Column="0" Name="OperationExpander" Margin="0">
<Expander.Header>
<CheckBox Margin="0" Content="{Binding Name}" IsChecked="{Binding IsEnabled}" PropertyChanged="PreviewChanged"/>
</Expander.Header>
</Expander>
<Grid Grid.Column="1" ToolTip.Tip="{Binding Error}" IsVisible="{Binding !!Error.Length}" Background="Transparent">
<Ellipse Width="18" Height="18" Margin="0" Stroke="DarkRed" StrokeThickness="2"/> <Ellipse Width="18" Height="18" Margin="0" Stroke="DarkRed" StrokeThickness="2"/>
<TextBlock Width="18" Height="18" Margin="0" Foreground="DarkRed" Text="!" FontWeight="Black" TextAlignment="Center"/> <TextBlock Width="18" Height="18" Margin="0" Foreground="DarkRed" Text="!" FontWeight="Black" TextAlignment="Center"/>
</Grid> </Grid>
<Button Grid.Column="2" Background="Transparent" VerticalAlignment="Center" BorderBrush="Transparent" IsVisible="{Binding $parent.IsPointerOver}" ToolTip.Tip="Click to delete this operation." Padding="0">
<Button.Content>
<Grid Width="16" Height="16" Background="Transparent" PointerReleased="DeleteOperation">
<Path Data="M0,0 L8,8 M0,8 L8,0" Stroke="Black" StrokeThickness="2" Height="8" HorizontalAlignment="Center"/>
</Grid>
</Button.Content>
</Button>
<Grid Grid.Column="3" Background="Transparent" Cursor="SizeAll" IsVisible="{Binding $parent.IsPointerOver}" ToolTip.Tip="Click and drag to move this operation." PointerPressed="StartMoveOperation" PointerReleased="EndMoveOperation" PointerMoved="MoveOperation">
<Path Data="M0,0 L12,0 M0,4 L12,4 M0,8 L12,8" Height="8" VerticalAlignment="Center" Margin="4" Stroke="Black" StrokeThickness="2"/>
</Grid>
<ContentPresenter Grid.ColumnSpan="4" Grid.Row="1" Content="{TemplateBinding Content}" IsVisible="{Binding #OperationExpander.IsExpanded}"/>
</Grid> </Grid>
</ControlTemplate> </Template>
</Setter> </Setter>
</Style> </Style>
</Window.Styles> </Window.Styles>
@ -190,17 +153,17 @@
<!-- Operations --> <!-- Operations -->
<DataTemplate DataType="{x:Type ops:Overwrite}"> <DataTemplate DataType="{x:Type ops:Overwrite}">
<ContentControl Classes="OperationControl"> <Expander Classes="OperationExpander">
<Grid ColumnDefinitions="auto,*" RowDefinitions="*,*"> <Grid ColumnDefinitions="auto,*" RowDefinitions="*,*">
<TextBlock Grid.Row="0" Text="Replacement:"/> <TextBlock Grid.Row="0" Text="Replacement:"/>
<TextBox Grid.Row="0" Text="{Binding Replacement}" PropertyChanged="PreviewChanged" ToolTip.Tip="The text to overwrite the entire file name with."/> <TextBox Grid.Row="0" Text="{Binding Replacement}" PropertyChanged="PreviewChanged" ToolTip.Tip="The text to overwrite the entire file name with."/>
<TextBlock Grid.Row="1" Text="Full Name:"/> <TextBlock Grid.Row="1" Text="Full Name:"/>
<CheckBox Grid.Row="1" IsChecked="{Binding FullName}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to overwrite the file extension as well."/> <CheckBox Grid.Row="1" IsChecked="{Binding FullName}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to overwrite the file extension as well."/>
</Grid> </Grid>
</ContentControl> </Expander>
</DataTemplate> </DataTemplate>
<DataTemplate DataType="{x:Type ops:Remove}"> <DataTemplate DataType="{x:Type ops:Remove}">
<ContentControl Classes="OperationControl"> <Expander Classes="OperationExpander">
<Grid ColumnDefinitions="auto,*" RowDefinitions="auto,auto,auto,auto,auto,auto,auto,auto,auto,auto,auto"> <Grid ColumnDefinitions="auto,*" RowDefinitions="auto,auto,auto,auto,auto,auto,auto,auto,auto,auto,auto">
<TextBlock Grid.Row="0" Text="Mode:"/> <TextBlock Grid.Row="0" Text="Mode:"/>
<ComboBox Grid.Row="0" Items="{Binding Modes}" Name="ModeSelector" SelectedIndex="{Binding Mode}" PropertyChanged="PreviewChanged" ToolTip.Tip="How to select the parts removed."> <ComboBox Grid.Row="0" Items="{Binding Modes}" Name="ModeSelector" SelectedIndex="{Binding Mode}" PropertyChanged="PreviewChanged" ToolTip.Tip="How to select the parts removed.">
@ -229,10 +192,10 @@
<TextBlock Grid.Row="10" Text="Full Name:"/> <TextBlock Grid.Row="10" Text="Full Name:"/>
<CheckBox Grid.Row="10" IsChecked="{Binding FullName}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to consider the file extension as well."/> <CheckBox Grid.Row="10" IsChecked="{Binding FullName}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to consider the file extension as well."/>
</Grid> </Grid>
</ContentControl> </Expander>
</DataTemplate> </DataTemplate>
<DataTemplate DataType="{x:Type ops:Replace}"> <DataTemplate DataType="{x:Type ops:Replace}">
<ContentControl Classes="OperationControl"> <Expander Classes="OperationExpander">
<Grid ColumnDefinitions="auto,*" RowDefinitions="auto,auto,auto,auto,auto,auto,auto,auto,auto,auto,auto"> <Grid ColumnDefinitions="auto,*" RowDefinitions="auto,auto,auto,auto,auto,auto,auto,auto,auto,auto,auto">
<TextBlock Grid.Row="0" Text="Mode:"/> <TextBlock Grid.Row="0" Text="Mode:"/>
<ComboBox Grid.Row="0" Items="{Binding Modes}" Name="ModeSelector" SelectedIndex="{Binding Mode}" PropertyChanged="PreviewChanged" ToolTip.Tip="How to select the parts replaced."> <ComboBox Grid.Row="0" Items="{Binding Modes}" Name="ModeSelector" SelectedIndex="{Binding Mode}" PropertyChanged="PreviewChanged" ToolTip.Tip="How to select the parts replaced.">
@ -263,10 +226,10 @@
<TextBlock Grid.Row="10" Text="Full Name:"/> <TextBlock Grid.Row="10" Text="Full Name:"/>
<CheckBox Grid.Row="10" IsChecked="{Binding FullName}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to consider the file extension as well."/> <CheckBox Grid.Row="10" IsChecked="{Binding FullName}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to consider the file extension as well."/>
</Grid> </Grid>
</ContentControl> </Expander>
</DataTemplate> </DataTemplate>
<DataTemplate DataType="{x:Type ops:Number}"> <DataTemplate DataType="{x:Type ops:Number}">
<ContentControl Classes="OperationControl"> <Expander Classes="OperationExpander">
<Grid ColumnDefinitions="auto,*" RowDefinitions="auto,auto,auto,auto,auto,auto,auto,auto,auto"> <Grid ColumnDefinitions="auto,*" RowDefinitions="auto,auto,auto,auto,auto,auto,auto,auto,auto">
<TextBlock Grid.Row="0" Text="Mode:"/> <TextBlock Grid.Row="0" Text="Mode:"/>
<ComboBox Grid.Row="0" Items="{Binding Modes}" Name="ModeSelector" SelectedIndex="{Binding Mode}" PropertyChanged="PreviewChanged" ToolTip.Tip="Where to insert the numbering."> <ComboBox Grid.Row="0" Items="{Binding Modes}" Name="ModeSelector" SelectedIndex="{Binding Mode}" PropertyChanged="PreviewChanged" ToolTip.Tip="Where to insert the numbering.">
@ -293,10 +256,10 @@
<TextBlock Grid.Row="8" Text="Full Name:"/> <TextBlock Grid.Row="8" Text="Full Name:"/>
<CheckBox Grid.Row="8" IsChecked="{Binding FullName}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to consider the file extension as well."/> <CheckBox Grid.Row="8" IsChecked="{Binding FullName}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to consider the file extension as well."/>
</Grid> </Grid>
</ContentControl> </Expander>
</DataTemplate> </DataTemplate>
<DataTemplate DataType="{x:Type ops:Add}"> <DataTemplate DataType="{x:Type ops:Add}">
<ContentControl Classes="OperationControl"> <Expander Classes="OperationExpander">
<Grid ColumnDefinitions="auto,*" RowDefinitions="auto,auto,auto,auto"> <Grid ColumnDefinitions="auto,*" RowDefinitions="auto,auto,auto,auto">
<TextBlock Grid.Row="0" Text="Mode:"/> <TextBlock Grid.Row="0" Text="Mode:"/>
<ComboBox Grid.Row="0" Items="{Binding Modes}" Name="ModeSelector" SelectedIndex="{Binding Mode}" PropertyChanged="PreviewChanged" ToolTip.Tip="Where to add the new text."> <ComboBox Grid.Row="0" Items="{Binding Modes}" Name="ModeSelector" SelectedIndex="{Binding Mode}" PropertyChanged="PreviewChanged" ToolTip.Tip="Where to add the new text.">
@ -313,10 +276,10 @@
<TextBlock Grid.Row="3" Text="Full Name:"/> <TextBlock Grid.Row="3" Text="Full Name:"/>
<CheckBox Grid.Row="3" IsChecked="{Binding FullName}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to consider the file extension as well."/> <CheckBox Grid.Row="3" IsChecked="{Binding FullName}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to consider the file extension as well."/>
</Grid> </Grid>
</ContentControl> </Expander>
</DataTemplate> </DataTemplate>
<DataTemplate DataType="{x:Type ops:Sort}"> <DataTemplate DataType="{x:Type ops:Sort}">
<ContentControl Classes="OperationControl"> <Expander Classes="OperationExpander">
<Grid ColumnDefinitions="auto,*" RowDefinitions="auto,auto,auto"> <Grid ColumnDefinitions="auto,*" RowDefinitions="auto,auto,auto">
<TextBlock Grid.Row="0" Text="Mode:"/> <TextBlock Grid.Row="0" Text="Mode:"/>
<ComboBox Grid.Row="0" Items="{Binding Modes}" Name="ModeSelector" SelectedIndex="{Binding Mode}" PropertyChanged="PreviewChanged" ToolTip.Tip="The method that is used to compare and sort the file names."> <ComboBox Grid.Row="0" Items="{Binding Modes}" Name="ModeSelector" SelectedIndex="{Binding Mode}" PropertyChanged="PreviewChanged" ToolTip.Tip="The method that is used to compare and sort the file names.">
@ -331,7 +294,7 @@
<TextBlock Grid.Row="2" Text="Full Name:" IsVisible="{Binding !#ModeSelector.SelectedItem.IsReverse}"/> <TextBlock Grid.Row="2" Text="Full Name:" IsVisible="{Binding !#ModeSelector.SelectedItem.IsReverse}"/>
<CheckBox Grid.Row="2" IsChecked="{Binding FullName}" IsVisible="{Binding !#ModeSelector.SelectedItem.IsReverse}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to consider the file extension as well."/> <CheckBox Grid.Row="2" IsChecked="{Binding FullName}" IsVisible="{Binding !#ModeSelector.SelectedItem.IsReverse}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to consider the file extension as well."/>
</Grid> </Grid>
</ContentControl> </Expander>
</DataTemplate> </DataTemplate>
</Window.DataTemplates> </Window.DataTemplates>
</Window> </Window>

View File

@ -6,16 +6,11 @@ using System.Collections.Generic;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Avalonia; using Avalonia;
using Avalonia.Input;
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.VisualTree;
using Avalonia.Markup.Xaml; using Avalonia.Markup.Xaml;
using Avalonia.LogicalTree;
using BFR.Helpers; using BFR.Helpers;
using BFR.DataModels; using BFR.DataModels;
using BFR.Operations;
using Avalonia.Markup.Xaml.Styling;
namespace BFR namespace BFR
{ {
@ -27,9 +22,8 @@ namespace BFR
public async Task OpenDirectoryButtonClick() => OpenDirectory(await new OpenFolderDialog() { Directory = WorkingDirectory }.ShowAsync(this)); public async Task OpenDirectoryButtonClick() => OpenDirectory(await new OpenFolderDialog() { Directory = WorkingDirectory }.ShowAsync(this));
public void OpenDirectory(string directory) public void OpenDirectory(string directory)
{ {
WorkingDirectory = directory.Replace('\\', '/'); WorkingDirectory = directory;
AllFiles.ReplaceAll(Directory.GetFiles(WorkingDirectory).Select(x => new FileModel(x.Replace('\\', '/')))); AllFiles.ReplaceAll(Directory.GetFiles(WorkingDirectory).Select(x => new FileModel(x)));
new Sort() { Mode = SortMode.Natural }.ApplyTo(AllFiles);
Filter(); Filter();
} }
@ -86,49 +80,24 @@ namespace BFR
Preview(); Preview();
} }
private ListBox OperationsListBox; public void RemoveOperation()
private ListBoxItem DragItem;
public void DeleteOperation(object sender, PointerReleasedEventArgs e)
{ {
var hoveredItem = (ListBoxItem)OperationsListBox.GetLogicalChildren().FirstOrDefault(x => this.GetVisualsAt(e.GetPosition(this)).Contains(((IVisual)x).GetVisualChildren().First())); if (SelectedOperation >= 0)
if(hoveredItem != null) Operations.RemoveAt(OperationsListBox.GetLogicalChildren().ToList().IndexOf(hoveredItem)); Operations.RemoveAt(SelectedOperation);
else Operations.RemoveAt(0);
Preview(); Preview();
} }
private void ClearDropStyling() public void MoveOperation(object sender, SpinEventArgs e)
{ {
foreach (ListBoxItem item in OperationsListBox.GetLogicalChildren()) HandleEvents = false;
item.Classes.RemoveAll(new[] { "BlackTop", "BlackBottom" }); if (Operations.Count > 1)
} if (e.Direction == SpinDirection.Increase && SelectedOperation > 0)
Operations.Move(SelectedOperation, SelectedOperation - 1);
public void StartMoveOperation(object sender, PointerPressedEventArgs e) => else if (e.Direction == SpinDirection.Decrease && SelectedOperation < Operations.Count - 1)
DragItem = OperationsListBox.GetLogicalChildren().Cast<ListBoxItem>().Single(x => x.IsPointerOver); Operations.Move(SelectedOperation, SelectedOperation + 1);
HandleEvents = true;
public void MoveOperation(object sender, PointerEventArgs e) Preview();
{
if (DragItem == null) return;
var hoveredItem = (ListBoxItem)OperationsListBox.GetLogicalChildren().FirstOrDefault(x => this.GetVisualsAt(e.GetPosition(this)).Contains(((IVisual)x).GetVisualChildren().First()));
var dragItemIndex = OperationsListBox.GetLogicalChildren().ToList().IndexOf(DragItem);
var hoveredItemIndex = OperationsListBox.GetLogicalChildren().ToList().IndexOf(hoveredItem);
ClearDropStyling();
if (hoveredItem != DragItem) hoveredItem?.Classes.Add(dragItemIndex > hoveredItemIndex ? "BlackTop" : "BlackBottom");
}
public void EndMoveOperation(object sender, PointerReleasedEventArgs e)
{
var hoveredItem = (ListBoxItem)OperationsListBox.GetLogicalChildren().FirstOrDefault(x => this.GetVisualsAt(e.GetPosition(this)).Contains(((IVisual)x).GetVisualChildren().First()));
if (DragItem != null && hoveredItem != null && DragItem != hoveredItem)
{
Operations.Move(
OperationsListBox.GetLogicalChildren().ToList().IndexOf(DragItem),
OperationsListBox.GetLogicalChildren().ToList().IndexOf(hoveredItem));
Preview();
}
ClearDropStyling();
DragItem = null;
} }
public void Commit() public void Commit()
@ -157,15 +126,8 @@ namespace BFR
{ {
AvaloniaXamlLoader.Load(this); AvaloniaXamlLoader.Load(this);
DataContext = this; DataContext = this;
OpenDirectory(Environment.OSVersion.Platform == PlatformID.Win32NT ? @"C:/Users/" : @"/home/"); OpenDirectory(Environment.OSVersion.Platform == PlatformID.Win32NT ? @"C:\Users" : @"\home");
HandleEvents = true; HandleEvents = true;
OperationsListBox = this.Find<ListBox>("OperationsListBox");
/*var dark = new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog"))
{
Source = new Uri("resm:Avalonia.Themes.Default.Accents.BaseDark.xaml?assembly=Avalonia.Themes.Default")
};
Styles[0] = dark;/**/
} }
} }
} }

View File

@ -27,8 +27,8 @@
get => $"{Directory}{FullName}"; get => $"{Directory}{FullName}";
set set
{ {
FullName = value.Substring(value.LastIndexOf('/') + 1); FullName = value.Substring(value.LastIndexOf('\\') + 1);
Directory = value.Substring(0, value.LastIndexOf('/') + 1); Directory = value.Substring(0, value.LastIndexOf('\\') + 1);
} }
} }

View File

@ -1,24 +1,29 @@
# BFR - A Modular Bulk File Renaming Utility # BFR - A Modular Bulk File Renaming Utility
Inspired by [this project](https://git.lastassault.de/speatzle/BulkFileRenamer) by speatzle_. Inspired by [this project](https://git.lastassault.de/speatzle/BulkFileRenamer) by speatzle_.
Everyone is welcome to contribute!
## Features ## Features
- Mordern scalable UI (Avalonia) - Mordern scalable UI (Avalonia)
- Extremely flexible - Extremely flexible
- Indefinite undo - Stack-based undo
- Fast automatic preview - Fast and automatic preview
- Crossplatform and portable - Cross-Platform and portable
- Supports RegEx - Supports RegEx
### Operations ### Operations
- Add, Remove, Replace, Overwrite, Number, Sort - Add, Remove, Replace, Overwrite, Number, Sort
### Planned Features ### Upcoming Features
- Case Conversion #1 - [Case Conversion](../issues/1)
- Save-/Loadable Profiles #3 - [Save-/Loadable Profiles](../issues/3)
- Operations based on file Metadata #4 - [Operations based on file Metadata](../issues//4)
- Optional Subdirectory Scanning #5 - [Optional Subdirectory Scanning](../issues/5)
- Anything good that gets [requested](https://git.ulra.eu/adrian/bfr/issues)! - [Option to disable automatic previewing](../issues/7)
- [Tooltips for added clarity on every UI input](../issues/9)
- [Improved Add-/Remove-Buttons](../issues/6)
- Anything good that gets [requested](../issues)!
## [Releases](https://git.ulra.eu/adrian/bfr/releases) ## [Releases](../-/releases)
## Screenshot ## Screenshot
![](https://i.imgur.com/qHRTmJH.png) ![](https://i.imgur.com/qHRTmJH.png)