2021-09-27 12:42:46 +00:00
|
|
|
using System.Reactive.Disposables;
|
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using CefNet.Avalonia;
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
using ReactiveUI;
|
|
|
|
using ReactiveUI.Fody.Helpers;
|
|
|
|
using Wabbajack.App.Messages;
|
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
namespace Wabbajack.App.ViewModels;
|
|
|
|
|
|
|
|
public abstract class GuidedWebViewModel : ViewModelBase, IReceiverMarker
|
2021-09-27 12:42:46 +00:00
|
|
|
{
|
2021-10-23 16:51:17 +00:00
|
|
|
protected ILogger _logger;
|
|
|
|
|
|
|
|
public GuidedWebViewModel(ILogger logger)
|
2021-09-27 12:42:46 +00:00
|
|
|
{
|
2021-10-23 16:51:17 +00:00
|
|
|
_logger = logger;
|
|
|
|
Activator = new ViewModelActivator();
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
this.WhenActivated(disposables => { Disposable.Empty.DisposeWith(disposables); });
|
|
|
|
}
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
[Reactive] public string Instructions { get; set; }
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
public WebView Browser { get; set; }
|
|
|
|
|
|
|
|
public abstract Task Run(CancellationToken token);
|
2021-09-27 12:42:46 +00:00
|
|
|
}
|