mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Experimenting to try and get the commands to bind correctly
This commit is contained in:
@ -27,13 +27,6 @@ namespace Wabbajack
|
||||
public ModeSelectionVM(Client wjClient)
|
||||
{
|
||||
_wjClient = wjClient;
|
||||
InstallCommand = ReactiveCommand.Create(() =>
|
||||
{
|
||||
LoadLastLoadedModlist.Send();
|
||||
NavigateToGlobal.Send(NavigateToGlobal.ScreenType.Installer);
|
||||
});
|
||||
CompileCommand = ReactiveCommand.Create(() => NavigateToGlobal.Send(NavigateToGlobal.ScreenType.Compiler));
|
||||
BrowseCommand = ReactiveCommand.Create(() => NavigateToGlobal.Send(NavigateToGlobal.ScreenType.ModListGallery));
|
||||
VisitModlistWizardCommand = ReactiveCommand.Create(() =>
|
||||
{
|
||||
ProcessStartInfo processStartInfo = new(Consts.WabbajackModlistWizardUri.ToString())
|
||||
@ -54,9 +47,6 @@ namespace Wabbajack
|
||||
}
|
||||
});
|
||||
}
|
||||
public ICommand BrowseCommand { get; }
|
||||
public ICommand InstallCommand { get; }
|
||||
public ICommand CompileCommand { get; }
|
||||
public ICommand VisitModlistWizardCommand { get; }
|
||||
public ReactiveCommand<Unit, Unit> UpdateCommand { get; }
|
||||
|
||||
|
@ -22,7 +22,10 @@ namespace Wabbajack
|
||||
public class NavigationVM : ViewModel
|
||||
{
|
||||
private readonly ILogger<NavigationVM> _logger;
|
||||
|
||||
public ICommand BrowseCommand { get; }
|
||||
public ICommand InstallCommand { get; }
|
||||
public ICommand CompileCommand { get; }
|
||||
public ReactiveCommand<Unit, Unit> UpdateCommand { get; }
|
||||
public NavigationVM(ILogger<NavigationVM> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
@ -34,9 +37,5 @@ namespace Wabbajack
|
||||
CompileCommand = ReactiveCommand.Create(() => NavigateToGlobal.Send(NavigateToGlobal.ScreenType.Compiler));
|
||||
BrowseCommand = ReactiveCommand.Create(() => NavigateToGlobal.Send(NavigateToGlobal.ScreenType.ModListGallery));
|
||||
}
|
||||
public ICommand BrowseCommand { get; set; }
|
||||
public ICommand InstallCommand { get; set; }
|
||||
public ICommand CompileCommand { get; set; }
|
||||
public ReactiveCommand<Unit, Unit> UpdateCommand { get; }
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ using System.Reactive.Disposables;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.Messages;
|
||||
|
||||
namespace Wabbajack
|
||||
{
|
||||
@ -19,7 +20,7 @@ namespace Wabbajack
|
||||
this.WhenActivated(dispose =>
|
||||
{
|
||||
this.WhenAny(x => x.ViewModel.BrowseCommand)
|
||||
.BindTo(this, x => x.BrowseButton.Command)
|
||||
.BindToStrict(this, x => x.BrowseButton.Command)
|
||||
.DisposeWith(dispose);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user