Altered CancelCommand.

This commit is contained in:
alphafetus committed 2023-10-18 13:12:36 -04:00
1 parent ba7e12e51b
commit 37a6d24049
1 file changed
+8 -6
@@ -1,8 +1,5 @@
using System;
using System.Reactive;
using System.Windows.Input;
using System.Xml;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using System.Reactive;
using PcgsInvUi.Views;
using ReactiveUI;
namespace PcgsInvUi.ViewModels;
@@ -10,5 +7,10 @@ namespace PcgsInvUi.ViewModels;
public class DeleteWindowViewModel : ViewModelBase
{
public ReactiveCommand<Unit, object> OkCommand { get; } = ReactiveCommand.Create(() => (object)true);
public ReactiveCommand<Unit, object> CancelCommand { get; } = ReactiveCommand.Create(() => (object)false);
public ReactiveCommand<DeleteWindow, Unit> CancelCommand { get; }
public DeleteWindowViewModel()
{
CancelCommand = ReactiveCommand.Create<DeleteWindow>(window => window.Close());
}
}