2019-12-09 00:19:36 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Input;
|
|
|
|
|
using ReactiveUI;
|
|
|
|
|
|
|
|
|
|
namespace Wabbajack.Common
|
|
|
|
|
{
|
|
|
|
|
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); }
|
|
|
|
|
|
2019-12-13 00:40:21 +00:00
|
|
|
|
public int CpuID { get; } = WorkQueue.AsyncLocalCurrentQueue.Value?.CpuId ?? WorkQueue.UnassignedCpuId;
|
2019-12-09 00:19:36 +00:00
|
|
|
|
|
|
|
|
|
public abstract void Cancel();
|
|
|
|
|
public ICommand CancelCommand { get; }
|
|
|
|
|
|
|
|
|
|
public AUserIntervention()
|
|
|
|
|
{
|
|
|
|
|
CancelCommand = ReactiveCommand.Create(() => Cancel());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|