自动添加新控件的翻译
This commit is contained in:
@@ -335,20 +335,20 @@ namespace CleanMachineHMI
|
||||
}
|
||||
}
|
||||
|
||||
public static void LoadzhCN()
|
||||
{
|
||||
if (Utils.frmUtil.znCNLang == null || Utils.frmUtil.znCNLang.Count == 0)
|
||||
{
|
||||
var appPath = System.Windows.Forms.Application.StartupPath.Split(new string[] { @"bin\Debug" }, StringSplitOptions.RemoveEmptyEntries)[0];
|
||||
var filePath = appPath + $"Lang\\zh-CN.json";
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var str = File.ReadAllText(filePath);
|
||||
Utils.frmUtil.znCNLang = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ThemeLanguage>>(str);
|
||||
//public static void LoadzhCN()
|
||||
//{
|
||||
// if (Utils.frmUtil.znCNLang == null || Utils.frmUtil.znCNLang.Count == 0)
|
||||
// {
|
||||
// var appPath = System.Windows.Forms.Application.StartupPath.Split(new string[] { @"bin\Debug" }, StringSplitOptions.RemoveEmptyEntries)[0];
|
||||
// var filePath = appPath + $"Lang\\zh-CN.json";
|
||||
// if (!File.Exists(filePath))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// var str = File.ReadAllText(filePath);
|
||||
// Utils.frmUtil.znCNLang = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ThemeLanguage>>(str);
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user