This commit is contained in:
ZouJin 2023-08-15 04:30:36 +10:00
parent 81ae011800
commit 8c82b014a6
2 changed files with 10 additions and 2 deletions

View File

@ -26,6 +26,7 @@ using System.Windows.Interop;
using static VPet_Simulator.Windows.PerformanceDesktopTransparentWindow;
using Line = LinePutScript.Line;
using static VPet_Simulator.Core.GraphInfo;
using System.Globalization;
namespace VPet_Simulator.Windows
{
@ -40,7 +41,8 @@ namespace VPet_Simulator.Windows
public MainWindow()
{
LocalizeCore.StoreTranslation = true;
CultureInfo.CurrentCulture = new CultureInfo(CultureInfo.CurrentCulture.Name);
CultureInfo.CurrentCulture.NumberFormat = new CultureInfo("en-US").NumberFormat;
//判断是不是Steam用户,因为本软件会发布到Steam
//在 https://store.steampowered.com/app/1920960/VPet
try
@ -250,7 +252,7 @@ namespace VPet_Simulator.Windows
}
}
else//新玩家,默认设置为
Set["CGPT"][(gstr)"type"] = "LB";
Set["CGPT"][(gstr)"type"] = "OFF";
if (Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\UserData") && !Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\BackUP"))
{

View File

@ -789,6 +789,8 @@ namespace VPet_Simulator.Windows
{
mw.Core.Save.Name = petloader.PetName.Translate();
TextBoxPetName.Text = mw.Core.Save.Name;
if(mw.IsSteamUser)
SteamFriends.SetRichPresence("username", mw.Core.Save.Name);
}
}
@ -797,6 +799,8 @@ namespace VPet_Simulator.Windows
if (!AllowChange)
return;
mw.Core.Save.Name = TextBoxPetName.Text;
if (mw.IsSteamUser)
SteamFriends.SetRichPresence("username", mw.Core.Save.Name);
}
private void DIY_ADD_Click(object sender, RoutedEventArgs e)
@ -1076,6 +1080,8 @@ namespace VPet_Simulator.Windows
{
mw.Core.Save.Name = petloader.PetName.Translate();
TextBoxPetName.Text = mw.Core.Save.Name;
if (mw.IsSteamUser)
SteamFriends.SetRichPresence("username", mw.Core.Save.Name);
}
}