2021-09-30 04:03:43 +00:00
|
|
|
using System.Reactive.Disposables;
|
|
|
|
using Avalonia;
|
|
|
|
using Avalonia.Controls;
|
|
|
|
using Avalonia.Markup.Xaml;
|
|
|
|
using ReactiveUI;
|
|
|
|
using Wabbajack.App.Views;
|
|
|
|
|
|
|
|
namespace Wabbajack.App.Screens
|
|
|
|
{
|
2021-09-30 12:23:43 +00:00
|
|
|
public partial class LauncherView : ScreenBase<LauncherViewModel>
|
2021-09-30 04:03:43 +00:00
|
|
|
{
|
2021-09-30 12:23:43 +00:00
|
|
|
public LauncherView()
|
2021-09-30 04:03:43 +00:00
|
|
|
{
|
|
|
|
InitializeComponent();
|
|
|
|
this.WhenActivated(disposables =>
|
|
|
|
{
|
2021-09-30 22:15:31 +00:00
|
|
|
this.OneWayBind(ViewModel, vm => vm.Image, view => view.ModListImage.Source)
|
2021-09-30 04:03:43 +00:00
|
|
|
.DisposeWith(disposables);
|
2021-09-30 22:15:31 +00:00
|
|
|
|
2021-09-30 22:18:58 +00:00
|
|
|
this.OneWayBind(ViewModel, vm => vm.Title, view => view.ModList.Text)
|
|
|
|
.DisposeWith(disposables);
|
|
|
|
|
|
|
|
this.OneWayBind(ViewModel, vm => vm.InstallFolder, view => view.InstallPath.Text,
|
|
|
|
v => v.ToString())
|
|
|
|
.DisposeWith(disposables);
|
|
|
|
|
2021-09-30 22:15:31 +00:00
|
|
|
this.BindCommand(ViewModel, vm => vm.PlayButton, view => view.PlayGame.Button)
|
2021-09-30 12:23:43 +00:00
|
|
|
.DisposeWith(disposables);
|
2021-09-30 04:03:43 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|