修复错误

This commit is contained in:
gongxh
2022-05-23 12:48:51 +08:00
parent 8a875860e9
commit c4027d7220
5 changed files with 177 additions and 155 deletions

View File

@@ -182,22 +182,29 @@ namespace CleanMachineHMI.Utils
public static void SetSingleControlText(this Control form, Control control)
{
#if RELEASE
try
{
var key = form.Name + "|" + control.Name;
if (!Global.ThemeLanguage.ContainsKey(key))
{
control.Text = control.Name;
}
AddzhCN(key, control.Text, "");
#endif
var key = form.Name + "|" + control.Name;
if (!Global.ThemeLanguage.ContainsKey(key))
{
control.Text = control.Name;
}
else
{
control.Text = Global.ThemeLanguage[key];
}
AddzhCN(key, control.Text, "");
#if RELEASE
}
catch (Exception ex)
{
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
}
#endif
}
/// <summary>