Merge pull request #962 from erri120/filepicker-filters

Added FilePicker Filters for Compilation and Installation
This commit is contained in:
erri120 2020-07-15 15:57:24 +02:00 committed by GitHub
commit 4bff2a3336
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,7 @@
### Changelog
#### Version - next
* Filters from the FilePicker are now being used
* Wabbajack will continue working even if the build server is down
* Fixed an issue where the main window does not appear after the splash screen

View File

@ -7,6 +7,7 @@ using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Threading.Tasks;
using DynamicData;
using Wabbajack.Common;
using Wabbajack.Lib;
@ -42,12 +43,14 @@ namespace Wabbajack
public MO2CompilerVM(CompilerVM parent)
{
Parent = parent;
ModListLocation = new FilePickerVM()
ModListLocation = new FilePickerVM
{
ExistCheckOption = FilePickerVM.CheckOptions.On,
PathType = FilePickerVM.PathTypeOptions.File,
PromptTitle = "Select a ModList"
PromptTitle = "Select a Modlist"
};
ModListLocation.Filters.Add(new CommonFileDialogFilter("MO2 Profile (modlist.txt)", ".txt"));
DownloadLocation = new FilePickerVM()
{
ExistCheckOption = FilePickerVM.CheckOptions.On,

View File

@ -20,6 +20,7 @@ using Wabbajack.Common.StatusFeed;
using System.Reactive;
using System.Collections.Generic;
using System.Windows.Input;
using Microsoft.WindowsAPICodePack.Dialogs;
using Wabbajack.Common.IO;
namespace Wabbajack
@ -110,12 +111,13 @@ namespace Wabbajack
MWVM = mainWindowVM;
ModListLocation = new FilePickerVM()
ModListLocation = new FilePickerVM
{
ExistCheckOption = FilePickerVM.CheckOptions.On,
PathType = FilePickerVM.PathTypeOptions.File,
PromptTitle = "Select a ModList to install"
};
ModListLocation.Filters.Add(new CommonFileDialogFilter("Wabbajack Modlist", ".wabbajack"));
// Swap to proper sub VM based on selected type
_installer = this.WhenAny(x => x.TargetManager)