This commit is contained in:
2022-06-09 08:27:51 +02:00
parent 6d9bf7ab32
commit 94e71954ee
21 changed files with 135 additions and 52 deletions

View File

@@ -3,9 +3,8 @@ using FileTime.GuiApp.ViewModels;
namespace FileTime.GuiApp.Services;
public interface IDialogService : IInputInterface
public interface IDialogService : IUserCommunicationService
{
IObservable<ReadInputsViewModel?> ReadInput { get; }
void ReadInputs(IEnumerable<IInputElement> inputs, Action inputHandler, Action? cancelHandler = null);
void ShowToastMessage(string text);
}

View File

@@ -42,7 +42,7 @@ public static class Startup
serviceCollection.TryAddSingleton<IDialogService, DialogService>();
serviceCollection.TryAddSingleton<ISystemClipboardService, SystemClipboardService>();
serviceCollection.TryAddSingleton<ToastMessageSink>();
serviceCollection.TryAddSingleton<IInputInterface>(s => s.GetRequiredService<IDialogService>());
serviceCollection.TryAddSingleton<IUserCommunicationService>(s => s.GetRequiredService<IDialogService>());
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{