mirror of
https://github.com/WowUp/WowUp.git
synced 2026-04-23 15:27:03 -04:00
25 lines
551 B
C#
25 lines
551 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace WowUp.WPF.Utilities
|
|
{
|
|
public static class DialogUtilities
|
|
{
|
|
public static string SelectFolder()
|
|
{
|
|
using var dialog = new FolderBrowserDialog
|
|
{
|
|
RootFolder = Environment.SpecialFolder.MyComputer
|
|
};
|
|
|
|
DialogResult result = dialog.ShowDialog();
|
|
if (result != DialogResult.OK)
|
|
{
|
|
return string.Empty;
|
|
}
|
|
|
|
return dialog.SelectedPath;
|
|
}
|
|
}
|
|
}
|