Allowed ErrorWindow to close properly.

This commit is contained in:
alphafetus committed 2023-11-23 18:19:47 -05:00
1 parent f98ff942bb
commit 71673206db
7 files changed
+16 -293

No files matched your search

+2 -5
View File
@@ -1,6 +1,4 @@
using System.Reactive;
using System.Security.Principal;
using PcgsInvUi.Views;
using ReactiveUI;
namespace PcgsInvUi.ViewModels;
@@ -11,16 +9,15 @@ public class ErrorWindowViewModel : ViewModelBase {
get => _message;
set => this.RaiseAndSetIfChanged(ref _message, value);
}
private string _message;
public ReactiveCommand<ErrorWindow, Unit> CloseCommand { get; }
public ReactiveCommand<Unit, object> CloseCommand { get; }
public ErrorWindowViewModel(string message)
{
_message = message;
CloseCommand = ReactiveCommand.Create<ErrorWindow>(window => window.Close());
CloseCommand = ReactiveCommand.Create(() => (object)false);
}
}