From 3ad0f8d1ccdbe22f4e05d54bd49039e0c94600ad Mon Sep 17 00:00:00 2001 From: erri120 Date: Wed, 15 Jul 2020 13:39:47 +0200 Subject: [PATCH 1/2] Added FilePicker Filters for Compilation and Installation --- Wabbajack/View Models/Compilers/MO2CompilerVM.cs | 7 +++++-- Wabbajack/View Models/Installers/InstallerVM.cs | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Wabbajack/View Models/Compilers/MO2CompilerVM.cs b/Wabbajack/View Models/Compilers/MO2CompilerVM.cs index b2d5276d..7d0c252d 100644 --- a/Wabbajack/View Models/Compilers/MO2CompilerVM.cs +++ b/Wabbajack/View Models/Compilers/MO2CompilerVM.cs @@ -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, diff --git a/Wabbajack/View Models/Installers/InstallerVM.cs b/Wabbajack/View Models/Installers/InstallerVM.cs index 02f38734..1974e4b5 100644 --- a/Wabbajack/View Models/Installers/InstallerVM.cs +++ b/Wabbajack/View Models/Installers/InstallerVM.cs @@ -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) From 53d695b7eac8710e8547b62577ecf2f1ea41ae71 Mon Sep 17 00:00:00 2001 From: erri120 Date: Wed, 15 Jul 2020 13:52:03 +0200 Subject: [PATCH 2/2] Updated CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 516cbf38..d235a872 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ### Changelog +#### Version - next +* Filters from the FilePicker are now being used + #### Version - 2.1.2.0 - 7/13/2020 * Can heal hand selected MEGA files * Several backend fixes