Add SAV6 ChecksumsValid property

This commit is contained in:
Kaphotics 2016-02-09 15:30:10 -08:00
parent 091f5c10d2
commit 97b766eadb
2 changed files with 5 additions and 6 deletions

View file

@ -261,6 +261,8 @@ namespace PKHeX
BitConverter.GetBytes(ccitt16(array)).CopyTo(Data, BlockInfoOffset + 6 + i * 8);
}
}
public bool ChecksumsValid => verifyG6SAV(Data);
public string ChecksumInfo => verifyG6CHK(Data);
public byte[] Write()
{
setChecksums();

View file

@ -2431,12 +2431,9 @@ namespace PKHeX
{
if (SAV.Edited) { Util.Alert("Save has been edited. Cannot integrity check."); return; }
if (PKX.verifyG6SAV(SAV.Data))
{ Util.Alert("Checksums are correct."); return; }
if (DialogResult.Yes != Util.Prompt(MessageBoxButtons.YesNoCancel, "Export Checksum Info to Clipboard?"))
return;
Clipboard.SetText(PKX.verifyG6CHK(SAV.Data));
if (SAV.ChecksumsValid) { Util.Alert("Checksums are valid."); return; }
if (DialogResult.Yes == Util.Prompt(MessageBoxButtons.YesNo, "Export Checksum Info to Clipboard?"))
Clipboard.SetText(SAV.ChecksumInfo);
}
private void clickExportSAVBAK(object sender, EventArgs e)
{