merge: card import and archive manager screens (card pool, plan, verified erase and format, server destination, tree, charts, maintenance)
Union of the Tooltips resources; sample data keeps the sync server and the simulated cards; the import test names App.Infrastructure.Formatting fully now that a test namespace of the same name exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
57 files changed
+8742
-23
No files matched your search
@@ -21,17 +21,33 @@ public sealed class RelayCommand(Action<object?> execute, Func<object?, bool>? c
|
||||
public void Execute(object? parameter) => execute(parameter);
|
||||
}
|
||||
|
||||
/// <summary>Asynchronous command that disables itself while running and reports failures through <see cref="Failed"/>.</summary>
|
||||
/// <summary>
|
||||
/// Asynchronous command that disables itself while running and reports failures through <see cref="Failed"/>. Like
|
||||
/// <see cref="RelayCommand"/>, its buttons re-query it on <see cref="CommandManager.InvalidateRequerySuggested"/>.
|
||||
/// </summary>
|
||||
public sealed class AsyncRelayCommand(Func<object?, CancellationToken, Task> execute, Func<object?, bool>? canExecute = null) : ICommand
|
||||
{
|
||||
private CancellationTokenSource? _cts;
|
||||
private EventHandler? _canExecuteChanged;
|
||||
|
||||
public AsyncRelayCommand(Func<Task> execute, Func<bool>? canExecute = null)
|
||||
: this((_, _) => execute(), canExecute is null ? null : _ => canExecute())
|
||||
{
|
||||
}
|
||||
|
||||
public event EventHandler? CanExecuteChanged;
|
||||
public event EventHandler? CanExecuteChanged
|
||||
{
|
||||
add
|
||||
{
|
||||
_canExecuteChanged += value;
|
||||
CommandManager.RequerySuggested += value;
|
||||
}
|
||||
remove
|
||||
{
|
||||
_canExecuteChanged -= value;
|
||||
CommandManager.RequerySuggested -= value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Raised on the UI thread when the command throws (other than cancellation).</summary>
|
||||
public static event Action<Exception>? Failed;
|
||||
@@ -66,5 +82,5 @@ public sealed class AsyncRelayCommand(Func<object?, CancellationToken, Task> exe
|
||||
|
||||
public void Cancel() => _cts?.Cancel();
|
||||
|
||||
public void RaiseCanExecuteChanged() => CanExecuteChanged?.Invoke(this, EventArgs.Empty);
|
||||
public void RaiseCanExecuteChanged() => _canExecuteChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
Reference in new issue
Block a user