Files
elwig/Elwig/Helpers/ActionCommand.cs
Lorenz Stechauner f09753ccc2
All checks were successful
Test / Run tests (push) Successful in 2m4s
Remove byte order marks
2024-07-26 19:44:41 +02:00

23 lines
472 B
C#

using System;
using System.Windows.Input;
namespace Elwig.Helpers {
public class ActionCommand : ICommand {
public event EventHandler? CanExecuteChanged;
private readonly Action Action;
public ActionCommand(Action action) {
Action = action;
}
public void Execute(object? parameter) {
Action();
}
public bool CanExecute(object? parameter) {
return true;
}
}
}