From 646d7398ef561b34d6e60f87c6a2459a3557c1a3 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Wed, 26 Jul 2023 09:32:31 +1000 Subject: [PATCH] =?UTF-8?q?MOD=E6=9C=AA=E5=8A=A0=E8=BD=BD=E6=97=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/Function/CoreMOD.cs | 13 +++++++++++++ .../WinDesign/winGameSetting.xaml | 9 ++++++--- .../WinDesign/winGameSetting.xaml.cs | 4 ++-- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/VPet-Simulator.Windows/Function/CoreMOD.cs b/VPet-Simulator.Windows/Function/CoreMOD.cs index 8e89b5b..d42e3d1 100644 --- a/VPet-Simulator.Windows/Function/CoreMOD.cs +++ b/VPet-Simulator.Windows/Function/CoreMOD.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; +using System.Windows; using VPet_Simulator.Core; using VPet_Simulator.Windows.Interface; @@ -81,6 +82,18 @@ namespace VPet_Simulator.Windows else ItemID = 0; CacheDate = modlps.GetDateTime("cachedate", DateTime.MinValue); + + //MOD未加载时支持翻译 + foreach (var line in modlps.FindAllLine("lang")) + { + List ls = new List(); + foreach (var sub in line) + { + ls.Add(new Line(sub.Name, sub.info)); + } + LocalizeCore.AddCulture(line.info, ls); + } + if (!IsOnMOD(mw)) { //Content = "该模组已停用".Translate(); diff --git a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml index 4b3ecde..8453060 100644 --- a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml +++ b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml @@ -610,7 +610,10 @@ - + - -