mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00

This moves all language used in the installer to an embedded JSON file to allow for customisation per game.
21 lines
528 B
C#
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;
|
|
}
|
|
}
|