Renaming fix

This commit is contained in:
Justin Swanson 2019-12-02 23:40:59 -06:00
parent 0dc0c11e9f
commit 4d7c9a3733
4 changed files with 14 additions and 14 deletions

View File

@ -33,7 +33,7 @@ namespace Wabbajack
private readonly ObservableAsPropertyHelper<ModListVM> _modList;
public ModListVM ModList => _modList.Value;
public FilePickerVM ModListPath { get; }
public FilePickerVM ModListLocation { get; }
private readonly ObservableAsPropertyHelper<ISubInstallerVM> _installer;
public ISubInstallerVM Installer => _installer.Value;
@ -98,7 +98,7 @@ namespace Wabbajack
MWVM = mainWindowVM;
ModListPath = new FilePickerVM()
ModListLocation = new FilePickerVM()
{
ExistCheckOption = FilePickerVM.ExistCheckOptions.On,
PathType = FilePickerVM.PathTypeOptions.File,
@ -134,11 +134,11 @@ namespace Wabbajack
MWVM.Settings.SaveSignal
.Subscribe(_ =>
{
MWVM.Settings.Installer.LastInstalledListLocation = ModListPath.TargetPath;
MWVM.Settings.Installer.LastInstalledListLocation = ModListLocation.TargetPath;
})
.DisposeWith(CompositeDisposable);
_modList = this.WhenAny(x => x.ModListPath.TargetPath)
_modList = this.WhenAny(x => x.ModListLocation.TargetPath)
.ObserveOn(RxApp.TaskpoolScheduler)
.Select(modListPath =>
{
@ -161,7 +161,7 @@ namespace Wabbajack
.ToProperty(this, nameof(TargetManager));
// Add additional error check on modlist
ModListPath.AdditionalError = this.WhenAny(x => x.ModList)
ModListLocation.AdditionalError = this.WhenAny(x => x.ModList)
.Select<ModListVM, IErrorResponse>(modList =>
{
if (modList == null) return ErrorResponse.Fail("Modlist path resulted in a null object.");
@ -303,7 +303,7 @@ namespace Wabbajack
private void OpenReadmeWindow()
{
if (string.IsNullOrEmpty(ModList.Readme)) return;
using (var fs = new FileStream(ModListPath.TargetPath, FileMode.Open, FileAccess.Read, FileShare.Read))
using (var fs = new FileStream(ModListLocation.TargetPath, FileMode.Open, FileAccess.Read, FileShare.Read))
using (var ar = new ZipArchive(fs, ZipArchiveMode.Read))
using (var ms = new MemoryStream())
{

View File

@ -54,7 +54,7 @@ namespace Wabbajack
canExecute: Observable.CombineLatest(
this.WhenAny(x => x.Location.InError),
this.WhenAny(x => x.DownloadLocation.InError),
installerVM.WhenAny(x => x.ModListPath.InError),
installerVM.WhenAny(x => x.ModListLocation.InError),
resultSelector: (loc, modlist, download) =>
{
return !loc && !download && !modlist;
@ -67,7 +67,7 @@ namespace Wabbajack
try
{
installer = new MO2Installer(
archive: installerVM.ModListPath.TargetPath,
archive: installerVM.ModListLocation.TargetPath,
modList: installerVM.ModList.SourceModList,
outputFolder: Location.TargetPath,
downloadFolder: DownloadLocation.TargetPath);
@ -120,7 +120,7 @@ namespace Wabbajack
.DisposeWith(CompositeDisposable);
// Load settings
_CurrentSettings = installerVM.WhenAny(x => x.ModListPath.TargetPath)
_CurrentSettings = installerVM.WhenAny(x => x.ModListLocation.TargetPath)
.Select(path => path == null ? null : installerVM.MWVM.Settings.Installer.Mo2ModlistSettings.TryCreate(path))
.ToProperty(this, nameof(CurrentSettings));
this.WhenAny(x => x.CurrentSettings)
@ -145,7 +145,7 @@ namespace Wabbajack
private void SaveSettings(Mo2ModlistInstallationSettings settings)
{
_installerVM.MWVM.Settings.Installer.LastInstalledListLocation = _installerVM.ModListPath.TargetPath;
_installerVM.MWVM.Settings.Installer.LastInstalledListLocation = _installerVM.ModListLocation.TargetPath;
if (settings == null) return;
settings.InstallationLocation = Location.TargetPath;
settings.DownloadLocation = DownloadLocation.TargetPath;

View File

@ -36,7 +36,7 @@ namespace Wabbajack
canExecute: Observable.CombineLatest(
this.WhenAny(x => x.TargetGame)
.Select(game => VortexCompiler.IsActiveVortexGame(game)),
installerVM.WhenAny(x => x.ModListPath.InError),
installerVM.WhenAny(x => x.ModListLocation.InError),
resultSelector: (isVortexGame, modListErr) => isVortexGame && !modListErr),
execute: async () =>
{
@ -47,7 +47,7 @@ namespace Wabbajack
var download = VortexCompiler.RetrieveDownloadLocation(TargetGame);
var staging = VortexCompiler.RetrieveStagingLocation(TargetGame);
installer = new VortexInstaller(
archive: installerVM.ModListPath.TargetPath,
archive: installerVM.ModListLocation.TargetPath,
modList: installerVM.ModList.SourceModList,
outputFolder: staging,
downloadFolder: download);

View File

@ -54,7 +54,7 @@ namespace Wabbajack
if (IsStartingFromModlist(out var path))
{
Installer.Value.ModListPath.TargetPath = path;
Installer.Value.ModListLocation.TargetPath = path;
ActivePane = Installer.Value;
}
else
@ -83,7 +83,7 @@ namespace Wabbajack
var installer = Installer.Value;
Settings.Installer.LastInstalledListLocation = path;
ActivePane = installer;
installer.ModListPath.TargetPath = path;
installer.ModListLocation.TargetPath = path;
}
}
}