mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
加载备份时存档损坏提示
This commit is contained in:
@ -1042,12 +1042,19 @@ namespace VPet_Simulator.Windows
|
|||||||
string path = AppDomain.CurrentDomain.BaseDirectory + @"\BackUP\" + txt + ".lps";
|
string path = AppDomain.CurrentDomain.BaseDirectory + @"\BackUP\" + txt + ".lps";
|
||||||
if (File.Exists(path))
|
if (File.Exists(path))
|
||||||
{
|
{
|
||||||
var l = new Line(File.ReadAllText(path));
|
try
|
||||||
GameSave gs = GameSave.Load(l);
|
|
||||||
if (MessageBoxX.Show("存档名称:{0}\n存档等级:{1}\n存档金钱:{2}\n是否加载该备份存档? 当前游戏数据会丢失"
|
|
||||||
.Translate(gs.Name, gs.Level, gs.Money), "是否加载该备份存档? 当前游戏数据会丢失".Translate(), MessageBoxButton.YesNo, MessageBoxIcon.Info) == MessageBoxResult.Yes)
|
|
||||||
{
|
{
|
||||||
mw.GameLoad(l);
|
var l = new Line(File.ReadAllText(path));
|
||||||
|
GameSave gs = GameSave.Load(l);
|
||||||
|
if (MessageBoxX.Show("存档名称:{0}\n存档等级:{1}\n存档金钱:{2}\n是否加载该备份存档? 当前游戏数据会丢失"
|
||||||
|
.Translate(gs.Name, gs.Level, gs.Money), "是否加载该备份存档? 当前游戏数据会丢失".Translate(), MessageBoxButton.YesNo, MessageBoxIcon.Info) == MessageBoxResult.Yes)
|
||||||
|
{
|
||||||
|
mw.GameLoad(l);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception exp)
|
||||||
|
{
|
||||||
|
MessageBoxX.Show("存档损毁,无法加载该备份\n请更换备份重试".Translate() + '\n' + exp.ToString(), "存档损毁".Translate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1190,8 +1197,8 @@ namespace VPet_Simulator.Windows
|
|||||||
mw.Set.Statistics = new Statistics();
|
mw.Set.Statistics = new Statistics();
|
||||||
CBSaveReLoad.IsEnabled = false;
|
CBSaveReLoad.IsEnabled = false;
|
||||||
BtnSaveReload.IsEnabled = false;
|
BtnSaveReload.IsEnabled = false;
|
||||||
MessageBoxX.Show("重置成功".Translate());
|
MessageBoxX.Show("重置成功".Translate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,4 +34,5 @@ MOD加载错误,是MOD({0})导致的\n如有可能请发送 错误信息截图
|
|||||||
游戏或者MOD#Game or Mod:|
|
游戏或者MOD#Game or Mod:|
|
||||||
导致的\n如有可能请发送 错误信息截图和引发错误之前的操作 给开发者:service@exlb.net\n感谢您对游戏开发的支持\n#If possible, Please send a screenshot of the error message and the action you took before triggering the error to developer: service@exlb.net\nThanks for your support of the game development\n:|
|
导致的\n如有可能请发送 错误信息截图和引发错误之前的操作 给开发者:service@exlb.net\n感谢您对游戏开发的支持\n#If possible, Please send a screenshot of the error message and the action you took before triggering the error to developer: service@exlb.net\nThanks for your support of the game development\n:|
|
||||||
清理指令已下达,下次启动桌宠时生效#The cleanup command has been issued and will take effect the next time the table pet is started:|
|
清理指令已下达,下次启动桌宠时生效#The cleanup command has been issued and will take effect the next time the table pet is started:|
|
||||||
服务器超载,请稍后重试#Server overload, please try again later:|
|
服务器超载,请稍后重试#Server overload, please try again later:|
|
||||||
|
存档损毁,无法加载该备份\n请更换备份重试#Archive damage, unable to load the backup\nPlease replace the backup and try again:|
|
@ -34,4 +34,5 @@ MOD加载错误,是MOD({0})导致的\n如有可能请发送 错误信息截图
|
|||||||
游戏或者MOD#游戏或者MOD:|
|
游戏或者MOD#游戏或者MOD:|
|
||||||
导致的\n如有可能请发送 错误信息截图和引发错误之前的操作 给开发者:service@exlb.net\n感谢您对游戏开发的支持\n#导致的\n如有可能请发送 错误信息截图和引发错误之前的操作 给开发者:service@exlb.net\n感谢您对游戏开发的支持\n:|
|
导致的\n如有可能请发送 错误信息截图和引发错误之前的操作 给开发者:service@exlb.net\n感谢您对游戏开发的支持\n#导致的\n如有可能请发送 错误信息截图和引发错误之前的操作 给开发者:service@exlb.net\n感谢您对游戏开发的支持\n:|
|
||||||
清理指令已下达,下次启动桌宠时生效#清理指令已下达,下次启动桌宠时生效:|
|
清理指令已下达,下次启动桌宠时生效#清理指令已下达,下次启动桌宠时生效:|
|
||||||
服务器超载,请稍后重试#服务器超载,请稍后重试:|
|
服务器超载,请稍后重试#服务器超载,请稍后重试:|
|
||||||
|
存档损毁,无法加载该备份\n请更换备份重试#存档损毁,无法加载该备份\n请更换备份重试:|
|
@ -34,4 +34,5 @@ MOD加载错误,是MOD({0})导致的\n如有可能请发送 错误信息截图
|
|||||||
游戏或者MOD#遊戲或者MOD:|
|
游戏或者MOD#遊戲或者MOD:|
|
||||||
导致的\n如有可能请发送 错误信息截图和引发错误之前的操作 给开发者:service@exlb.net\n感谢您对游戏开发的支持\n#導致的\n如有可能請發送 錯誤資訊截圖和引發錯誤之前的操作 給開發者:service@exlb.net\n感謝您對遊戲開發的支持\n:|
|
导致的\n如有可能请发送 错误信息截图和引发错误之前的操作 给开发者:service@exlb.net\n感谢您对游戏开发的支持\n#導致的\n如有可能請發送 錯誤資訊截圖和引發錯誤之前的操作 給開發者:service@exlb.net\n感謝您對遊戲開發的支持\n:|
|
||||||
清理指令已下达,下次启动桌宠时生效#清理指令已下達,下次啟動桌寵時生效:|
|
清理指令已下达,下次启动桌宠时生效#清理指令已下達,下次啟動桌寵時生效:|
|
||||||
服务器超载,请稍后重试#伺服器超載,請稍後重試:|
|
服务器超载,请稍后重试#伺服器超載,請稍後重試:|
|
||||||
|
存档损毁,无法加载该备份\n请更换备份重试#存檔損毀,無法加載該備份\n請更換備份重試:|
|
Reference in New Issue
Block a user