Use native OpenFolderDialog in GUI

This commit is contained in:
Tyrrrz
2023-11-14 23:44:17 +02:00
parent 6f5f747632
commit 5846129cc6
2 changed files with 2 additions and 5 deletions

View File

@@ -4,7 +4,6 @@ using System.Threading;
using System.Threading.Tasks;
using MaterialDesignThemes.Wpf;
using Microsoft.Win32;
using Ookii.Dialogs.Wpf;
using Stylet;
namespace DiscordChatExporter.Gui.ViewModels.Framework;
@@ -68,9 +67,8 @@ public class DialogManager : IDisposable
public string? PromptDirectoryPath(string defaultDirPath = "")
{
var dialog = new VistaFolderBrowserDialog { SelectedPath = defaultDirPath };
return dialog.ShowDialog() == true ? dialog.SelectedPath : null;
var dialog = new OpenFolderDialog { InitialDirectory = defaultDirPath };
return dialog.ShowDialog() == true ? dialog.FolderName : null;
}
public void Dispose()