mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
MainWindowVM.ActivePane set made private
This commit is contained in:
parent
2ab10fe1bb
commit
907a5a2da1
@ -21,7 +21,7 @@ namespace Wabbajack
|
||||
public BackNavigatingVM(MainWindowVM mainWindowVM)
|
||||
{
|
||||
BackCommand = ReactiveCommand.Create(
|
||||
execute: () => Utils.CatchAndLog(() => mainWindowVM.ActivePane = NavigateBackTarget),
|
||||
execute: () => Utils.CatchAndLog(() => mainWindowVM.NavigateTo(NavigateBackTarget)),
|
||||
canExecute: this.WhenAny(x => x.NavigateBackTarget)
|
||||
.Select(x => x != null)
|
||||
.ObserveOnGuiThread());
|
||||
|
@ -139,7 +139,7 @@ namespace Wabbajack
|
||||
BackCommand = ReactiveCommand.Create(
|
||||
execute: () =>
|
||||
{
|
||||
mainWindowVM.ActivePane = mainWindowVM.ModeSelectionVM;
|
||||
mainWindowVM.NavigateTo(mainWindowVM.ModeSelectionVM);
|
||||
StartedCompilation = false;
|
||||
Completed = null;
|
||||
},
|
||||
|
@ -182,7 +182,7 @@ namespace Wabbajack
|
||||
{
|
||||
StartedInstallation = false;
|
||||
Completed = null;
|
||||
mainWindowVM.ActivePane = mainWindowVM.ModeSelectionVM;
|
||||
mainWindowVM.NavigateTo(mainWindowVM.ModeSelectionVM);
|
||||
},
|
||||
canExecute: this.WhenAny(x => x.Installing)
|
||||
.Select(x => !x));
|
||||
|
@ -29,7 +29,7 @@ namespace Wabbajack
|
||||
public MainSettings Settings { get; }
|
||||
|
||||
[Reactive]
|
||||
public ViewModel ActivePane { get; set; }
|
||||
public ViewModel ActivePane { get; private set; }
|
||||
|
||||
public ObservableCollectionExtended<IStatusMessage> Log { get; } = new ObservableCollectionExtended<IStatusMessage>();
|
||||
|
||||
@ -101,12 +101,12 @@ namespace Wabbajack
|
||||
if (IsStartingFromModlist(out var path))
|
||||
{
|
||||
Installer.Value.ModListLocation.TargetPath = path;
|
||||
ActivePane = Installer.Value;
|
||||
NavigateTo(Installer.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Start on mode selection
|
||||
ActivePane = ModeSelectionVM;
|
||||
NavigateTo(ModeSelectionVM);
|
||||
}
|
||||
|
||||
try
|
||||
@ -144,7 +144,7 @@ namespace Wabbajack
|
||||
if (path == null) return;
|
||||
var installer = Installer.Value;
|
||||
Settings.Installer.LastInstalledListLocation = path;
|
||||
ActivePane = installer;
|
||||
NavigateTo(installer);
|
||||
installer.ModListLocation.TargetPath = path;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ namespace Wabbajack
|
||||
{
|
||||
MWVM = mainWindowVM;
|
||||
BackCommand = ReactiveCommand.Create(
|
||||
execute: () => mainWindowVM.ActivePane = mainWindowVM.ModeSelectionVM);
|
||||
execute: () => mainWindowVM.NavigateTo(mainWindowVM.ModeSelectionVM));
|
||||
RefreshCommand = ReactiveCommand.Create(() => { });
|
||||
|
||||
RefreshCommand.StartingExecution()
|
||||
|
@ -32,8 +32,8 @@ namespace Wabbajack
|
||||
_mainVM.OpenInstaller(path);
|
||||
});
|
||||
|
||||
CompileCommand = ReactiveCommand.Create(() => mainVM.ActivePane = mainVM.Compiler.Value);
|
||||
BrowseCommand = ReactiveCommand.Create(() => mainVM.ActivePane = mainVM.Gallery.Value);
|
||||
CompileCommand = ReactiveCommand.Create(() => mainVM.NavigateTo(mainVM.Compiler.Value));
|
||||
BrowseCommand = ReactiveCommand.Create(() => mainVM.NavigateTo(mainVM.Gallery.Value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,11 +29,11 @@ namespace Wabbajack
|
||||
CancellationTokenSource cancel = new CancellationTokenSource();
|
||||
var oldPane = MainWindow.ActivePane;
|
||||
var vm = await WebBrowserVM.GetNew();
|
||||
MainWindow.ActivePane = vm;
|
||||
MainWindow.NavigateTo(vm);
|
||||
vm.BackCommand = ReactiveCommand.Create(() =>
|
||||
{
|
||||
cancel.Cancel();
|
||||
MainWindow.ActivePane = oldPane;
|
||||
MainWindow.NavigateTo(oldPane);
|
||||
intervention.Cancel();
|
||||
});
|
||||
|
||||
@ -51,7 +51,7 @@ namespace Wabbajack
|
||||
intervention.Cancel();
|
||||
}
|
||||
|
||||
MainWindow.ActivePane = oldPane;
|
||||
MainWindow.NavigateTo(oldPane);
|
||||
}
|
||||
|
||||
public async Task Handle(IUserIntervention msg)
|
||||
|
Loading…
Reference in New Issue
Block a user