using System; using System.Windows.Input; namespace Ocr.Gui.Model; public class Command : ICommand { public Action Action { get; set; } public Command(Action action) { Action = action; } #region Implementation of ICommand /// public bool CanExecute(object? parameter) { return true; } /// public void Execute(object? parameter) { Action?.Invoke(); } /// public event EventHandler? CanExecuteChanged; #endregion }