public async ValueTask <string> ShowTextWindowAsync() { return(await _applicationDispatcher.InvokeAsync(async() => { var window = new TextWindow(); await window.ShowDialog(_mainWindowProvider.GetMainWindow()); return window.ViewModel?.GetResult() ?? string.Empty; })); }
public async ValueTask <string> ShowMultiLineTextInputWindowAsync() { return(await _applicationDispatcher.InvokeAsync(async() => { var window = new MultiLineTextInputWindow(); var serviceProvider = Bootstrapper.Instance.GetServiceProvider(); var viewModel = serviceProvider.GetRequiredService <MultiLineTextInputWindowViewModel>(); await viewModel.InitializeAsync(); window.ViewModel = viewModel; await window.ShowDialog(_mainWindowProvider.GetMainWindow()); return window.GetResult() ?? string.Empty; })); }