This repository has been archived on 2024-06-04. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
thesis-src/Implementation/GUI/Model/Command.cs
T
2024-01-08 16:23:24 +01:00

34 lines
513 B
C#

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
/// <inheritdoc />
public bool CanExecute(object? parameter)
{
return true;
}
/// <inheritdoc />
public void Execute(object? parameter)
{
Action?.Invoke();
}
/// <inheritdoc />
public event EventHandler? CanExecuteChanged;
#endregion
}