2021-12-26 21:56:44 +00:00
|
|
|
|
using System.Reactive.Disposables;
|
|
|
|
|
using System.Reactive.Linq;
|
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
using ReactiveUI;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
|
|
|
|
|
namespace Wabbajack
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interaction logic for InstallationView.xaml
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class InstallationView : ReactiveUserControl<InstallerVM>
|
|
|
|
|
{
|
|
|
|
|
public InstallationView()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2021-12-30 23:55:41 +00:00
|
|
|
|
this.WhenActivated(disposables =>
|
2021-12-26 21:56:44 +00:00
|
|
|
|
{
|
2021-12-31 22:00:03 +00:00
|
|
|
|
//MidInstallDisplayGrid.Visibility = Visibility.Collapsed;
|
|
|
|
|
//LogView.Visibility = Visibility.Collapsed;
|
|
|
|
|
//CpuView.Visibility = Visibility.Collapsed;
|
|
|
|
|
|
|
|
|
|
ViewModel.WhenAnyValue(vm => vm.InstallState)
|
|
|
|
|
.Select(v => v != InstallState.Configuration ? Visibility.Visible : Visibility.Collapsed)
|
|
|
|
|
.BindToStrict(this, view => view.MidInstallDisplayGrid.Visibility)
|
|
|
|
|
.DisposeWith(disposables);
|
|
|
|
|
|
|
|
|
|
ViewModel.WhenAnyValue(vm => vm.InstallState)
|
|
|
|
|
.Select(v => v == InstallState.Configuration ? Visibility.Visible : Visibility.Collapsed)
|
|
|
|
|
.BindToStrict(this, view => view.BottomButtonInputGrid.Visibility)
|
|
|
|
|
.DisposeWith(disposables);
|
|
|
|
|
|
|
|
|
|
ViewModel.WhenAnyValue(vm => vm.InstallState)
|
|
|
|
|
.Select(es => es == InstallState.Success ? Visibility.Visible : Visibility.Collapsed)
|
|
|
|
|
.BindToStrict(this, view => view.InstallComplete.Visibility)
|
|
|
|
|
.DisposeWith(disposables);
|
2021-12-26 21:56:44 +00:00
|
|
|
|
|
2021-12-30 23:55:41 +00:00
|
|
|
|
//ViewModel.WhenAnyValue(vm => vm.ModList.Name)
|
|
|
|
|
// .BindToStrict(this, view => view.Name)
|
2021-12-26 21:56:44 +00:00
|
|
|
|
|
2021-12-30 23:55:41 +00:00
|
|
|
|
ViewModel.WhenAnyValue(vm => vm.BackCommand)
|
|
|
|
|
.BindToStrict(this, view => view.BackButton.Command)
|
|
|
|
|
.DisposeWith(disposables);
|
2021-12-26 21:56:44 +00:00
|
|
|
|
|
2021-12-30 23:55:41 +00:00
|
|
|
|
ViewModel.WhenAnyValue(vm => vm.OpenReadmeCommand)
|
|
|
|
|
.BindToStrict(this, view => view.OpenReadmePreInstallButton.Command)
|
|
|
|
|
.DisposeWith(disposables);
|
2021-12-26 21:56:44 +00:00
|
|
|
|
|
2021-12-30 23:55:41 +00:00
|
|
|
|
ViewModel.WhenAnyValue(vm => vm.VisitModListWebsiteCommand)
|
|
|
|
|
.BindToStrict(this, view => view.OpenWebsite.Command)
|
|
|
|
|
.DisposeWith(disposables);
|
2021-12-26 21:56:44 +00:00
|
|
|
|
|
2021-12-30 23:55:41 +00:00
|
|
|
|
ViewModel.WhenAnyValue(vm => vm.LoadingLock.IsLoading)
|
|
|
|
|
.Select(loading => loading ? Visibility.Visible : Visibility.Collapsed)
|
|
|
|
|
.BindToStrict(this, view => view.ModlistLoadingRing.Visibility)
|
|
|
|
|
.DisposeWith(disposables);
|
|
|
|
|
|
2021-12-31 00:50:38 +00:00
|
|
|
|
ViewModel.WhenAnyValue(vm => vm.BeginCommand)
|
|
|
|
|
.BindToStrict(this, view => view.InstallationConfigurationView.BeginButton.Command)
|
|
|
|
|
.DisposeWith(disposables);
|
|
|
|
|
|
2021-12-30 23:55:41 +00:00
|
|
|
|
// Slideshow
|
|
|
|
|
ViewModel.WhenAnyValue(vm => vm.SlideShowTitle)
|
|
|
|
|
.Select(f => f)
|
|
|
|
|
.BindToStrict(this, view => view.DetailImage.Title)
|
|
|
|
|
.DisposeWith(disposables);
|
|
|
|
|
ViewModel.WhenAnyValue(vm => vm.SlideShowAuthor)
|
|
|
|
|
.BindToStrict(this, view => view.DetailImage.Author)
|
|
|
|
|
.DisposeWith(disposables);
|
|
|
|
|
ViewModel.WhenAnyValue(vm => vm.SlideShowDescription)
|
|
|
|
|
.BindToStrict(this, view => view.DetailImage.Description)
|
|
|
|
|
.DisposeWith(disposables);
|
|
|
|
|
|
|
|
|
|
ViewModel.WhenAnyValue(vm => vm.SlideShowImage)
|
|
|
|
|
.BindToStrict(this, view => view.DetailImage.Image)
|
|
|
|
|
.DisposeWith(disposables);
|
2021-12-26 21:56:44 +00:00
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|