From 74c16f96cb140b58c3944bb4be8db9be2475af6c Mon Sep 17 00:00:00 2001 From: Tongg Date: Fri, 10 Jan 2025 16:30:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=9A=E8=AF=AD=E8=A8=80MessageBox?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=B0=83=E6=95=B4=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Language/en_US.xaml | 2 +- Model/Helper/MultilingualHelper.cs | 13 ++++++++++++- Views/Dialog/MessageBox.xaml | 6 +++--- Views/Dialog/MessageBox.xaml.cs | 12 ++++++++++++ 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/Language/en_US.xaml b/Language/en_US.xaml index df45989..f04442b 100644 --- a/Language/en_US.xaml +++ b/Language/en_US.xaml @@ -149,7 +149,7 @@ Select Path - Starshine Diamond Detection System + Spark Diamond Detection System Account Password Remember Password diff --git a/Model/Helper/MultilingualHelper.cs b/Model/Helper/MultilingualHelper.cs index d785119..bc33184 100644 --- a/Model/Helper/MultilingualHelper.cs +++ b/Model/Helper/MultilingualHelper.cs @@ -15,7 +15,7 @@ public class MultilingualHelper /// 文字 /// public static string getString(string key) - { + { var result = Application.Current.TryFindResource(key); if (result == null) { @@ -23,6 +23,17 @@ public class MultilingualHelper } return (string)result; } + + /// + /// 获取多语言字符 + /// + /// KEY + /// 文字 + /// + public static string getLangType() + { + return ConfigHelper.Instance.Lang.ToString(); + } /// /// 设置语言 diff --git a/Views/Dialog/MessageBox.xaml b/Views/Dialog/MessageBox.xaml index d2a6179..66a2815 100644 --- a/Views/Dialog/MessageBox.xaml +++ b/Views/Dialog/MessageBox.xaml @@ -37,7 +37,7 @@ - - -