wabbajack/Wabbajack.App/Views/ModeSelectionView.axaml.cs

38 lines
1.3 KiB
C#
Raw Normal View History

2021-09-27 12:42:46 +00:00
using System;
using System.Reactive.Disposables;
using ReactiveUI;
using Wabbajack.App.Messages;
using Wabbajack.App.Screens;
using Wabbajack.App.ViewModels;
2021-10-23 16:51:17 +00:00
namespace Wabbajack.App.Views;
public partial class ModeSelectionView : ScreenBase<ModeSelectionViewModel>
2021-09-27 12:42:46 +00:00
{
2021-11-04 13:01:48 +00:00
public ModeSelectionView(IServiceProvider provider) : base("")
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
InstallButton.Button.Command = ReactiveCommand.Create(() =>
{
MessageBus.Current.SendMessage(new NavigateTo(typeof(InstallConfigurationViewModel)));
2021-10-23 16:51:17 +00:00
}).DisposeWith(disposables);
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
BrowseButton.Button.Command = ReactiveCommand.Create(() =>
2021-09-27 12:42:46 +00:00
{
MessageBus.Current.SendMessage(new NavigateTo(typeof(BrowseViewModel)));
2021-10-23 16:51:17 +00:00
}).DisposeWith(disposables);
2021-10-23 16:51:17 +00:00
CompileButton.Button.Command = ReactiveCommand.Create(() =>
{
MessageBus.Current.SendMessage(new NavigateTo(typeof(CompilerConfigurationViewModel)));
2021-10-23 16:51:17 +00:00
}).DisposeWith(disposables);
2021-10-22 04:28:52 +00:00
2021-10-23 16:51:17 +00:00
LaunchButton.Button.Command = ReactiveCommand.Create(() =>
{
MessageBus.Current.SendMessage(new NavigateTo(typeof(PlaySelectViewModel)));
2021-09-27 12:42:46 +00:00
});
2021-10-23 16:51:17 +00:00
});
2021-09-27 12:42:46 +00:00
}
}