bfr/BFR/MainWindowUIProperties.cs
adroslice 5d8327f071 Fully implemented Operations UI with one example
- You can now add, remove, modify and move operations
- FilterChangedAny was renamed to FilterChanged, the new event for the preview follows the same naming scheme with PreviewChanged
- Operations now actually verify that they're enabled (This was originally supposed to be done in the loop in Preview(), but this way seems nicer since it also removes the error label when the operation is disabled)
- The foundation has been laid to make it very easy to add more operations
2019-11-17 02:22:13 +01:00

34 lines
1.2 KiB
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>();
public int SelectedOperation { get; set; }
public int SelectedOperationType { get; set; } = 0;
public OperationType[] OperationTypes { get; } = new[]
{
OperationType.Make<Overwrite>()
};
// Filters
public string FilterExtension { get; set; } = "";
public string FilterPattern { get; set; } = "";
public bool FilterFullName { get; set; } = false;
public bool FilterRegex { get; set; } = false;
}
}