TRX/tools/installer/TRX_InstallerLib/Utils/FileBrowser.cs
lahm86 365cff79c1 tools/installer: move language to external file
This moves all language used in the installer to an embedded JSON file
to allow for customisation per game.
2025-03-30 12:34:54 +01:00

21 lines
528 B
C#

using TRX_InstallerLib.Models;
namespace TRX_InstallerLib.Utils;
public class FileBrowser
{
public static string? Browse(string? initialDirectory)
{
using var dlg = new FolderBrowserDialog()
{
Description = Language.Instance.Controls!["label_select_folder"],
SelectedPath = initialDirectory,
ShowNewFolderButton = true,
};
if (dlg.ShowDialog() == DialogResult.OK)
{
return dlg.SelectedPath;
}
return null;
}
}