TextBox, PropertyChangeHandler

This commit is contained in:
2023-08-11 21:51:44 +02:00
parent e989a65e81
commit 1fde0df2d6
81 changed files with 1539 additions and 390 deletions

View File

@@ -0,0 +1,28 @@
namespace GeneralInputKey;
public class GeneralKeyEventArgs
{
private readonly Action<bool>? _handledChanged;
private bool _handled;
public required Keys Key { get; init; }
public required char KeyChar { get; init; }
public required SpecialKeysStatus SpecialKeysStatus { get; init; }
public bool Handled
{
get => _handled;
set
{
if (_handled != value)
{
_handled = value;
_handledChanged?.Invoke(value);
}
}
}
public GeneralKeyEventArgs(Action<bool>? handledChanged = null)
{
_handledChanged = handledChanged;
}
}