Update NuGet packages

This commit is contained in:
Tyrrrz 2021-04-18 19:32:59 +03:00
parent ed35a36eaa
commit d01ed13041
6 changed files with 15 additions and 16 deletions

View file

@ -17,7 +17,7 @@ namespace DiscordChatExporter.Gui.ViewModels.Framework
_viewManager = viewManager;
}
public async ValueTask<T> ShowDialogAsync<T>(DialogScreen<T> dialogScreen)
public async ValueTask<T?> ShowDialogAsync<T>(DialogScreen<T> dialogScreen)
{
var view = _viewManager.CreateAndBindViewForModelIfNecessary(dialogScreen);

View file

@ -5,14 +5,13 @@ namespace DiscordChatExporter.Gui.ViewModels.Framework
{
public abstract class DialogScreen<T> : PropertyChangedBase
{
// ReSharper disable once RedundantDefaultMemberInitializer
public T DialogResult { get; private set; } = default!;
public T? DialogResult { get; private set; }
public event EventHandler? Closed;
public void Close(T dialogResult = default!)
public void Close(T dialogResult)
{
DialogResult = dialogResult!;
DialogResult = dialogResult;
Closed?.Invoke(this, EventArgs.Empty);
}
}