0eb940012d
- Better handles unexpected exceptions - Expected exceptions should be OperationException - Leaves files unchanged even if the exception occurs at *any* point of the operation - TODO: Probably have to optimize this. - Operations now operate on IList<T> instead of List<T> to maintain compatibility with AvaloniaList<T> - Slightly better comments
27 lines
1008 B
C#
27 lines
1008 B
C#
using Avalonia;
|
|
using Avalonia.Collections;
|
|
using Avalonia.Controls;
|
|
|
|
using BFR.DataModels;
|
|
using BFR.Operations;
|
|
|
|
namespace BFR
|
|
{
|
|
public partial class MainWindow : Window
|
|
{
|
|
private readonly AvaloniaProperty<string> workingDirectoryProperty =
|
|
AvaloniaProperty.Register<MainWindow, string>(nameof(WorkingDirectory));
|
|
public string WorkingDirectory { get => GetValue(workingDirectoryProperty); set => SetValue(workingDirectoryProperty, value); }
|
|
|
|
public AvaloniaList<FileModel> AllFiles { get; } = new AvaloniaList<FileModel>();
|
|
public AvaloniaList<FileModel> Files { get; } = new AvaloniaList<FileModel>();
|
|
public AvaloniaList<Operation> Operations { get; } = new AvaloniaList<Operation>();
|
|
|
|
// Filters
|
|
public string FilterExtension { get; set; } = "";
|
|
public string FilterPattern { get; set; } = "";
|
|
public bool FilterFullName { get; set; } = false;
|
|
public bool FilterRegex { get; set; } = false;
|
|
}
|
|
}
|