ActionCommand: Small fixes to avoid warnings
This commit is contained in:
@ -4,18 +4,18 @@ using System.Windows.Input;
|
|||||||
namespace Elwig.Helpers {
|
namespace Elwig.Helpers {
|
||||||
public class ActionCommand : ICommand {
|
public class ActionCommand : ICommand {
|
||||||
|
|
||||||
public event EventHandler CanExecuteChanged;
|
public event EventHandler? CanExecuteChanged;
|
||||||
private readonly Action Action;
|
private readonly Action Action;
|
||||||
|
|
||||||
public ActionCommand(Action action) {
|
public ActionCommand(Action action) {
|
||||||
Action = action;
|
Action = action;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Execute(object parameter) {
|
public void Execute(object? parameter) {
|
||||||
Action();
|
Action();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanExecute(object parameter) {
|
public bool CanExecute(object? parameter) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user