2021-12-26 21:56:44 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
2022-01-03 22:46:28 +00:00
|
|
|
|
using System.Threading;
|
2021-12-26 21:56:44 +00:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Input;
|
|
|
|
|
using ReactiveUI;
|
|
|
|
|
using Wabbajack.Common;
|
2022-01-03 22:46:28 +00:00
|
|
|
|
using Wabbajack.DTOs.Interventions;
|
2021-12-30 00:15:37 +00:00
|
|
|
|
using Wabbajack.Interventions;
|
2021-12-26 21:56:44 +00:00
|
|
|
|
|
2021-12-30 00:15:37 +00:00
|
|
|
|
namespace Wabbajack
|
2021-12-26 21:56:44 +00:00
|
|
|
|
{
|
|
|
|
|
public abstract class AUserIntervention : ReactiveObject, IUserIntervention
|
|
|
|
|
{
|
|
|
|
|
public DateTime Timestamp { get; } = DateTime.Now;
|
|
|
|
|
public abstract string ShortDescription { get; }
|
|
|
|
|
public abstract string ExtendedDescription { get; }
|
|
|
|
|
|
|
|
|
|
private bool _handled;
|
|
|
|
|
public bool Handled { get => _handled; set => this.RaiseAndSetIfChanged(ref _handled, value); }
|
2022-01-03 22:46:28 +00:00
|
|
|
|
public CancellationToken Token { get; }
|
|
|
|
|
public void SetException(Exception exception)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-26 21:56:44 +00:00
|
|
|
|
public abstract void Cancel();
|
|
|
|
|
public ICommand CancelCommand { get; }
|
|
|
|
|
|
|
|
|
|
public AUserIntervention()
|
|
|
|
|
{
|
|
|
|
|
CancelCommand = ReactiveCommand.Create(() => Cancel());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|