mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-23 15:17:11 +02:00
misc: Swap the context menu actions to Commands
This commit is contained in:
parent
9233fe86b0
commit
960421a7c1
4 changed files with 695 additions and 323 deletions
|
@ -9,12 +9,12 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
{
|
||||
public static RelayCommand Create(Action action)
|
||||
=> new(action);
|
||||
public static RelayCommand CreateConditional(Action action, Func<bool> canExecute)
|
||||
public static RelayCommand CreateConditional(Func<bool> canExecute, Action action)
|
||||
=> new(action, canExecute);
|
||||
|
||||
public static RelayCommand<T> Create<T>(Action<T?> action)
|
||||
=> new(action);
|
||||
public static RelayCommand<T> CreateConditional<T>(Action<T?> action, Predicate<T?> canExecute)
|
||||
public static RelayCommand<T> CreateConditional<T>(Predicate<T?> canExecute, Action<T?> action)
|
||||
=> new(action, canExecute);
|
||||
|
||||
public static AsyncRelayCommand Create(Func<Task> action)
|
||||
|
@ -31,18 +31,18 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
public static AsyncRelayCommand<T> CreateSilentFail<T>(Func<T?, Task> action)
|
||||
=> new(action, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
|
||||
|
||||
public static AsyncRelayCommand CreateConditional(Func<Task> action, Func<bool> canExecute)
|
||||
public static AsyncRelayCommand CreateConditional(Func<bool> canExecute, Func<Task> action)
|
||||
=> new(action, canExecute, AsyncRelayCommandOptions.None);
|
||||
public static AsyncRelayCommand CreateConcurrentConditional(Func<Task> action, Func<bool> canExecute)
|
||||
public static AsyncRelayCommand CreateConcurrentConditional(Func<bool> canExecute, Func<Task> action)
|
||||
=> new(action, canExecute, AsyncRelayCommandOptions.AllowConcurrentExecutions);
|
||||
public static AsyncRelayCommand CreateSilentFailConditional(Func<Task> action, Func<bool> canExecute)
|
||||
public static AsyncRelayCommand CreateSilentFailConditional(Func<bool> canExecute, Func<Task> action)
|
||||
=> new(action, canExecute, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
|
||||
|
||||
public static AsyncRelayCommand<T> CreateConditional<T>(Func<T?, Task> action, Predicate<T?> canExecute)
|
||||
public static AsyncRelayCommand<T> CreateConditional<T>(Predicate<T?> canExecute, Func<T?, Task> action)
|
||||
=> new(action, canExecute, AsyncRelayCommandOptions.None);
|
||||
public static AsyncRelayCommand<T> CreateConcurrentConditional<T>(Func<T?, Task> action, Predicate<T?> canExecute)
|
||||
public static AsyncRelayCommand<T> CreateConcurrentConditional<T>(Predicate<T?> canExecute, Func<T?, Task> action)
|
||||
=> new(action, canExecute, AsyncRelayCommandOptions.AllowConcurrentExecutions);
|
||||
public static AsyncRelayCommand<T> CreateSilentFailConditional<T>(Func<T?, Task> action, Predicate<T?> canExecute)
|
||||
public static AsyncRelayCommand<T> CreateSilentFailConditional<T>(Predicate<T?> canExecute, Func<T?, Task> action)
|
||||
=> new(action, canExecute, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue