wabbajack/Wabbajack.App/Screens/StandardInstallationView.axaml.cs

40 lines
1.4 KiB
C#
Raw Normal View History

2021-09-27 12:42:46 +00:00
using System.Reactive.Disposables;
using ReactiveUI;
using Wabbajack.App.ViewModels;
2021-10-23 16:51:17 +00:00
namespace Wabbajack.App.Views;
public partial class StandardInstallationView : ScreenBase<StandardInstallationViewModel>
2021-09-27 12:42:46 +00:00
{
2021-10-23 16:51:17 +00:00
public StandardInstallationView()
2021-09-27 12:42:46 +00:00
{
2021-10-23 16:51:17 +00:00
InitializeComponent();
this.WhenActivated(disposables =>
2021-09-27 12:42:46 +00:00
{
2021-10-23 16:51:17 +00:00
this.Bind(ViewModel, vm => vm.Slide.Image, view => view.SlideImage.Source)
.DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.NextCommand, view => view.NextSlide)
.DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.PrevCommand, view => view.PrevSlide)
.DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.PauseCommand, view => view.PauseSlides)
.DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.PlayCommand, view => view.PlaySlides)
.DisposeWith(disposables);
this.OneWayBind(ViewModel, vm => vm.StatusText, view => view.StatusText.Text)
.DisposeWith(disposables);
this.OneWayBind(ViewModel, vm => vm.StepsProgress, view => view.StepsProgress.Value, p => p.Value * 1000)
.DisposeWith(disposables);
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
this.OneWayBind(ViewModel, vm => vm.StepProgress, view => view.StepProgress.Value, p => p.Value * 10000)
.DisposeWith(disposables);
});
2021-09-27 12:42:46 +00:00
}
}