ShowErrorWindow now actually shows the ErrorWindow
This commit is contained in:
1 parent
99a666afd8
commit
4fcae0b3c7
10 files changed
+104
-30
No files matched your search
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Reactive;
|
||||
using ReactiveUI;
|
||||
using PcgsInvUi.Views;
|
||||
|
||||
namespace PcgsInvUi.ViewModels;
|
||||
|
||||
public class ErrorWindowViewModel : ViewModelBase {
|
||||
|
||||
public Exception DisplayedException {
|
||||
get => _message;
|
||||
set => this.RaiseAndSetIfChanged(ref _message, value);
|
||||
}
|
||||
|
||||
private Exception _message;
|
||||
|
||||
public ReactiveCommand<ErrorWindow, Unit> CloseCommand { get; }
|
||||
|
||||
public ErrorWindowViewModel(string message) {
|
||||
CloseCommand = ReactiveCommand.Create<ErrorWindow>(window => { window.Close(); });
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user