From a911d9ba34e76f33e79079c04912ec3eb69e87f4 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Fri, 23 Jun 2023 21:23:30 +1000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E7=89=88?= =?UTF-8?q?=E6=B2=A1=E6=9C=89userdata=E6=96=87=E4=BB=B6=E5=A4=B9=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E5=82=A8=E5=AD=98=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/MainWindow.cs | 4 +++- VPet-Simulator.Windows/MainWindow.xaml.cs | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index ab2694a..2979b99 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -74,12 +74,14 @@ namespace VPet_Simulator.Windows File.Delete(ds[0]); if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + $"\\UserData\\Save_{st}.lps")) File.Delete(AppDomain.CurrentDomain.BaseDirectory + $"\\UserData\\Save_{st}.lps"); + if (!Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\UserData")) + Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory + @"\UserData"); if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\Save.lps")) File.Move(AppDomain.CurrentDomain.BaseDirectory + @"\Save.lps", AppDomain.CurrentDomain.BaseDirectory + $"\\UserData\\Save_{st}.lps"); if (Core != null && Core.Save != null) File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + @"\Save.lps", Core.Save.ToLine().ToString()); if (CGPTClient != null) - File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + @"\ChatGPTSetting.json", CGPTClient.Save()); + File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + @"\ChatGPTSetting.json", CGPTClient.Save()); } } /// diff --git a/VPet-Simulator.Windows/MainWindow.xaml.cs b/VPet-Simulator.Windows/MainWindow.xaml.cs index 403f7e3..ac3587d 100644 --- a/VPet-Simulator.Windows/MainWindow.xaml.cs +++ b/VPet-Simulator.Windows/MainWindow.xaml.cs @@ -383,13 +383,13 @@ namespace VPet_Simulator.Windows Main.Say("欢迎使用虚拟桌宠模拟器\n这是个中期的测试版,若有bug请多多包涵\n欢迎加群虚拟主播模拟器430081239或在菜单栏-管理-反馈中提交bug或建议", GraphCore.Helper.SayType.Shining); }); } - else if (Set["SingleTips"].GetDateTime("update") <= new DateTime(2023, 6, 21)) + else if (Set["SingleTips"].GetDateTime("update") <= new DateTime(2023, 6, 23)) { - if (Set["SingleTips"].GetDateTime("update") > new DateTime(2023, 6, 19)) // 上次更新日期时间 - notifyIcon.ShowBalloonTip(10, "更新通知 06/21", //本次更新内容 - "添加喝水,口渴,睡觉,肚子饿,喂食,等动画\n新增低状态的说话文本,更新食物图片\n提高了学习收益和降低了学习消耗", ToolTipIcon.Info); + if (Set["SingleTips"].GetDateTime("update") > new DateTime(2023, 6, 21)) // 上次更新日期时间 + notifyIcon.ShowBalloonTip(10, "更新通知 06/23", //本次更新内容 + "修复空存档储存出错的bug", ToolTipIcon.Info); else// 累计更新内容 - notifyIcon.ShowBalloonTip(10, "更新通知 06/21", + notifyIcon.ShowBalloonTip(10, "更新通知 06/23", "现已支持数据计算,桌宠现在需要进行吃饭喝水等\n更新了新的状态动画文件\n新增自动备份存档功能\n数据计算数据相关优化", ToolTipIcon.Info); Set["SingleTips"].SetDateTime("update", DateTime.Now); }