2020-02-28 16:27:37 +00:00
|
|
|
|
using System.Reactive.Disposables;
|
2020-01-20 22:26:45 +00:00
|
|
|
|
using System.Reactive.Linq;
|
|
|
|
|
using ReactiveUI;
|
2019-12-14 03:47:09 +00:00
|
|
|
|
|
|
|
|
|
namespace Wabbajack
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interaction logic for CompilationCompleteView.xaml
|
|
|
|
|
/// </summary>
|
2020-02-28 16:27:37 +00:00
|
|
|
|
public partial class CompilationCompleteView
|
2019-12-14 03:47:09 +00:00
|
|
|
|
{
|
|
|
|
|
public CompilationCompleteView()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2020-01-20 22:26:45 +00:00
|
|
|
|
this.WhenActivated(dispose =>
|
|
|
|
|
{
|
|
|
|
|
this.WhenAny(x => x.ViewModel.Completed)
|
|
|
|
|
.Select(x => x?.Failed ?? false)
|
|
|
|
|
.BindToStrict(this, x => x.AttentionBorder.Failure)
|
|
|
|
|
.DisposeWith(dispose);
|
|
|
|
|
this.WhenAny(x => x.ViewModel.Completed)
|
|
|
|
|
.Select(x => x?.Failed ?? false)
|
2020-02-28 16:27:37 +00:00
|
|
|
|
.Select(failed => $"Compilation {(failed ? "Failed" : "Complete")}")
|
2020-01-20 22:26:45 +00:00
|
|
|
|
.BindToStrict(this, x => x.TitleText.Text)
|
|
|
|
|
.DisposeWith(dispose);
|
2020-02-28 16:27:37 +00:00
|
|
|
|
this.WhenAny(x => x.ViewModel.Completed)
|
|
|
|
|
.Select(x => x?.Failed ?? false)
|
|
|
|
|
.Select(failed => failed ? "Open Logs Folder" : "Go to Modlist")
|
|
|
|
|
.BindToStrict(this, x => x.ActionText.Text)
|
|
|
|
|
.DisposeWith(dispose);
|
2020-01-20 22:26:45 +00:00
|
|
|
|
this.WhenAny(x => x.ViewModel.BackCommand)
|
|
|
|
|
.BindToStrict(this, x => x.BackButton.Command)
|
|
|
|
|
.DisposeWith(dispose);
|
2020-02-28 16:27:37 +00:00
|
|
|
|
this.WhenAny(x => x.ViewModel.GoToCommand)
|
2020-01-20 22:26:45 +00:00
|
|
|
|
.BindToStrict(this, x => x.GoToModlistButton.Command)
|
|
|
|
|
.DisposeWith(dispose);
|
|
|
|
|
this.WhenAny(x => x.ViewModel.CloseWhenCompleteCommand)
|
|
|
|
|
.BindToStrict(this, x => x.CloseWhenCompletedButton.Command)
|
|
|
|
|
.DisposeWith(dispose);
|
|
|
|
|
});
|
2019-12-14 03:47:09 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|