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

@@ -21,7 +21,6 @@
<PackageReference Include="MaterialDesignColors" Version="2.1.4" />
<PackageReference Include="MaterialDesignThemes" Version="4.9.0" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.77" />
<PackageReference Include="Ookii.Dialogs.Wpf" Version="5.0.1" />
<PackageReference Include="Onova" Version="2.6.10" />
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0" PrivateAssets="all" />
<PackageReference Include="Stylet" Version="1.3.6" />

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()