解决工具提供清理缓存功能

This commit is contained in:
ZouJin 2024-02-22 22:55:15 +08:00
parent 9062c3cb50
commit ee33edfcdb
6 changed files with 20 additions and 4 deletions

View File

@ -4,3 +4,4 @@
检测到经验值超过 9,223,372,036 导致算数溢出\n已经自动回正#Detected experience value exceeding 9,223,372,036 causing arithmetic overflow\nAutomatically corrected:| 检测到经验值超过 9,223,372,036 导致算数溢出\n已经自动回正#Detected experience value exceeding 9,223,372,036 causing arithmetic overflow\nAutomatically corrected:|
检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正#Detected money exceeding 9,223,372,036 causing arithmetic overflow\nAutomatically corrected:| 检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正#Detected money exceeding 9,223,372,036 causing arithmetic overflow\nAutomatically corrected:|
数据溢出警告#Data Overflow Warning:| 数据溢出警告#Data Overflow Warning:|
缓存清理完成#Cache cleared:|

View File

@ -4,3 +4,4 @@
检测到经验值超过 9,223,372,036 导致算数溢出\n已经自动回正#检测到经验值超过 9,223,372,036 导致算数溢出\n已经自动回正:| 检测到经验值超过 9,223,372,036 导致算数溢出\n已经自动回正#检测到经验值超过 9,223,372,036 导致算数溢出\n已经自动回正:|
检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正#检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正:| 检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正#检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正:|
数据溢出警告#数据溢出警告:| 数据溢出警告#数据溢出警告:|
缓存清理完成#缓存清理完成:|

View File

@ -4,3 +4,4 @@
检测到经验值超过 9,223,372,036 导致算数溢出\n已经自动回正#偵測到經驗值超過 9,223,372,036 導致算術溢位\n已經自動修正:| 检测到经验值超过 9,223,372,036 导致算数溢出\n已经自动回正#偵測到經驗值超過 9,223,372,036 導致算術溢位\n已經自動修正:|
检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正#偵測到金錢超過 9,223,372,036 導致算術溢位\n已經自動修正:| 检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正#偵測到金錢超過 9,223,372,036 導致算術溢位\n已經自動修正:|
数据溢出警告#數據溢出警告:| 数据溢出警告#數據溢出警告:|
缓存清理完成#快取清理完成:|

View File

@ -30,6 +30,7 @@ public class MainWindowVM : ObservableClass<MainWindowVM>
FirstStartFailedCommand.ExecuteCommand += FirstStartFailedCommand_ExecuteCommand; FirstStartFailedCommand.ExecuteCommand += FirstStartFailedCommand_ExecuteCommand;
OpenLocalTextCommand.ExecuteCommand += OpenLocalTextCommand_ExecuteCommand; OpenLocalTextCommand.ExecuteCommand += OpenLocalTextCommand_ExecuteCommand;
} }
private void OpenLocalTextCommand_ExecuteCommand() private void OpenLocalTextCommand_ExecuteCommand()
@ -43,10 +44,10 @@ public class MainWindowVM : ObservableClass<MainWindowVM>
private void FirstStartFailedCommand_ExecuteCommand() private void FirstStartFailedCommand_ExecuteCommand()
{ {
if (LocalizeCore.CurrentCulture == "zh-Hans") if (LocalizeCore.CurrentCulture == "zh-Hans")
HKWUtils.OpenLink("https://www.bilibili.com/read/cv26510496/"); HKWUtils.OpenLink("https://www.bilibili.com/read/cv31370459/");
else else
HKWUtils.OpenLink( HKWUtils.OpenLink(
"https://steamcommunity.com/games/1920960/announcements/detail/3681184905256253203" "https://store.steampowered.com/news/app/1920960/view/7950611950256749982"
); );
} }

View File

@ -32,6 +32,8 @@
Content="{ll:Str 打开设置编辑器}" FontSize="16" Style="{DynamicResource Button_BaseStyle}" /> Content="{ll:Str 打开设置编辑器}" FontSize="16" Style="{DynamicResource Button_BaseStyle}" />
<Button MinWidth="150" x:Name="Button_OpenSaveViewer" Click="Button_OpenSaveViewer_Click" <Button MinWidth="150" x:Name="Button_OpenSaveViewer" Click="Button_OpenSaveViewer_Click"
Content="{ll:Str 打开存档查看器}" FontSize="16" Style="{DynamicResource Button_BaseStyle}" /> Content="{ll:Str 打开存档查看器}" FontSize="16" Style="{DynamicResource Button_BaseStyle}" />
<Button MinWidth="150" x:Name="Button_CleanCache" Click="Button_CleanCache_Click"
Content="{ll:Str 清理缓存}" FontSize="16" Style="{DynamicResource Button_BaseStyle}" />
</StackPanel> </StackPanel>
<Button Grid.Row="1" Command="{Binding FirstStartFailedCommand}" Content="{ll:Str '第一次启动桌宠打不开?'}" <Button Grid.Row="1" Command="{Binding FirstStartFailedCommand}" Content="{ll:Str '第一次启动桌宠打不开?'}"
FontSize="16" Style="{DynamicResource LinkButtonStyle}" /> FontSize="16" Style="{DynamicResource LinkButtonStyle}" />

View File

@ -9,6 +9,7 @@ using VPet.Solution.Models.SettingEditor;
using VPet.Solution.ViewModels; using VPet.Solution.ViewModels;
using VPet.Solution.Views.SaveViewer; using VPet.Solution.Views.SaveViewer;
using VPet.Solution.Views.SettingEditor; using VPet.Solution.Views.SettingEditor;
using VPet_Simulator.Core;
using VPet_Simulator.Windows.Interface; using VPet_Simulator.Windows.Interface;
namespace VPet.Solution.Views; namespace VPet.Solution.Views;
@ -50,4 +51,13 @@ public partial class MainWindow : WindowX
{ {
SaveWindow.ShowOrActivate(); SaveWindow.ShowOrActivate();
} }
private void Button_CleanCache_Click(object sender, RoutedEventArgs e)
{
if(Directory.Exists(GraphCore.CachePath))
{
Directory.Delete(GraphCore.CachePath, true);
}
MessageBox.Show("缓存清理完成".Translate());
}
} }