Console base WIP

This commit is contained in:
2023-08-07 14:55:18 +02:00
parent 2107d4f92a
commit b9adbc8272
18 changed files with 454 additions and 5 deletions

View File

@@ -0,0 +1,18 @@
using FileTime.App.Core.Models;
using FileTime.App.Core.Services;
using Terminal.Gui;
namespace FileTime.ConsoleUI.App.Extensions;
public static class KeyEventArgsExtensions
{
public static GeneralKeyEventArgs? ToGeneralKeyEventArgs(this KeyEvent args, IAppKeyService<Key> appKeyService)
{
var maybeKey = appKeyService.MapKey(args.Key);
if (maybeKey is not { } key1) return null;
return new GeneralKeyEventArgs
{
Key = key1
};
}
}