This commit is contained in:
gongxh
2022-05-05 09:25:58 +08:00
parent 36b3831689
commit ff80fe49e3
2 changed files with 8 additions and 2 deletions

View File

@@ -189,8 +189,8 @@ namespace CleanMachineHMI
{
if (ThemeLanguage == null || ThemeLanguage.Count == 0)
{
var appPath = System.Windows.Forms.Application.StartupPath.Split(new string[] { @"bin\Debug" }, StringSplitOptions.RemoveEmptyEntries)[0];
var filePath = appPath + $"Lang\\{GlobalHelper.LanguageCode}.json";
// var appPath = System.Windows.Forms.Application.StartupPath.Split(new string[] { @"bin\Debug" }, StringSplitOptions.RemoveEmptyEntries)[0];
var filePath = $"Lang\\{GlobalHelper.LanguageCode}.json";
var str = File.ReadAllText(filePath);
var lstLanguage = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ThemeLanguage>>(str);
var tmpThemeLanguage = new Dictionary<string, string>();