mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
VPet.Solution 更新
This commit is contained in:
parent
04b150ebd9
commit
71e5816a80
@ -168,13 +168,16 @@ public class SaveModel : ObservableClass<SaveModel>
|
||||
#endregion
|
||||
|
||||
|
||||
#region HashCode
|
||||
private long _hashCode;
|
||||
#region HashChecked
|
||||
private bool _hashChecked;
|
||||
|
||||
public long HashCode
|
||||
/// <summary>
|
||||
/// Hash已检查
|
||||
/// </summary>
|
||||
public bool HashChecked
|
||||
{
|
||||
get => _hashCode;
|
||||
set => SetProperty(ref _hashCode, value);
|
||||
get => _hashChecked;
|
||||
set => SetProperty(ref _hashChecked, value);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -202,6 +205,7 @@ public class SaveModel : ObservableClass<SaveModel>
|
||||
LoadSave(save.GameSave);
|
||||
if (save.Statistics.Data.TryGetValue("stat_total_time", out var time))
|
||||
TotalTime = time.GetInteger64();
|
||||
HashChecked = save.HashCheck;
|
||||
foreach (var data in save.Statistics.Data)
|
||||
{
|
||||
Statistics.Add(
|
||||
|
@ -106,9 +106,8 @@ public class SaveWindowVM : ObservableClass<SaveWindowVM>
|
||||
foreach (var file in Directory.EnumerateFiles(saveDirectory).Where(s => s.EndsWith(".lps")))
|
||||
{
|
||||
var lps = new LPS(File.ReadAllText(file));
|
||||
var hashCode = lps.FindLine("hash")?.InfoToInt64 is long hash ? hash : 0;
|
||||
var save = new GameSave_v2(lps);
|
||||
var saveModel = new SaveModel(file, save) { HashCode = hashCode };
|
||||
var saveModel = new SaveModel(file, save);
|
||||
_saves.Add(saveModel);
|
||||
}
|
||||
}
|
||||
|
@ -90,9 +90,9 @@
|
||||
<DockPanel>
|
||||
<Label
|
||||
h:ElementHelper.UniformMinWidthGroup="A"
|
||||
Content="{ll:Str 哈希值}"
|
||||
Content="{ll:Str 哈希检查}"
|
||||
Style="{DynamicResource Label_BaseStyle}" />
|
||||
<TextBlock Style="{DynamicResource TextBlock_LeftCenter}" Text="{Binding Save.HashCode}" />
|
||||
<TextBlock Style="{DynamicResource TextBlock_LeftCenter}" Text="{Binding Save.HashChecked}" />
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
@ -68,7 +68,7 @@
|
||||
Header="{ll:Str 名称}"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding DateSaved}"
|
||||
Binding="{Binding DateSaved, StringFormat='yyyy/MM/dd HH:mm:ss'}"
|
||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||
Header="{ll:Str 保存时间}"
|
||||
IsReadOnly="True" />
|
||||
|
Loading…
Reference in New Issue
Block a user