Focus next/previous input element with Tab

This commit is contained in:
2023-08-14 14:05:28 +02:00
parent 1f4b938358
commit 2a595b2548
13 changed files with 197 additions and 20 deletions

View File

@@ -1,4 +1,5 @@
using System.Diagnostics;
using Microsoft.Extensions.DependencyInjection;
using Serilog.Core;
using Serilog.Events;
@@ -6,6 +7,13 @@ namespace FileTime.ConsoleUI.App.Services;
public class CustomLoggerSink : ILogEventSink
{
private readonly Lazy<IDialogService> _dialogService;
public CustomLoggerSink(IServiceProvider serviceProvider)
{
_dialogService = new Lazy<IDialogService>(() => serviceProvider.GetRequiredService<IDialogService>());
}
public void Emit(LogEvent logEvent)
{
if (logEvent.Level >= LogEventLevel.Error)
@@ -14,6 +22,7 @@ public class CustomLoggerSink : ILogEventSink
if (logEvent.Exception is not null)
message += $" {logEvent.Exception.Message}";
Debug.WriteLine(message);
_dialogService.Value.ShowToastMessage(message);
}
}
}