mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-05 21:17:14 -05:00
Add bulk check to Checksums button
Hold control to have the Bulk Legality analysis spit out its results to the clipboard.
This commit is contained in:
parent
34ea56c2a7
commit
95267afb2d
|
|
@ -685,7 +685,7 @@ private void B_JPEG_Click(object sender, EventArgs e)
|
|||
WinFormsUtil.Alert(MsgSaveJPEGExportFail);
|
||||
return;
|
||||
}
|
||||
string filename = SAV.JPEGTitle + "'s picture";
|
||||
string filename = $"{SAV.JPEGTitle}'s picture";
|
||||
var sfd = new SaveFileDialog { FileName = filename, Filter = "JPEG|*.jpeg" };
|
||||
if (sfd.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
|
@ -694,9 +694,32 @@ private void B_JPEG_Click(object sender, EventArgs e)
|
|||
|
||||
private void ClickVerifyCHK(object sender, EventArgs e)
|
||||
{
|
||||
if (SAV.Edited) { WinFormsUtil.Alert(MsgSaveChecksumFailEdited); return; }
|
||||
if (ModifierKeys == Keys.Control)
|
||||
{
|
||||
var bulk = new BulkAnalysis(SAV);
|
||||
if (bulk.Parse.Count == 0)
|
||||
{
|
||||
WinFormsUtil.Alert("Clean!");
|
||||
return;
|
||||
}
|
||||
var lines = bulk.Parse.Select(z => $"{z.Judgement}: {z.Comment}");
|
||||
var msg = string.Join(Environment.NewLine, lines);
|
||||
Clipboard.SetText(msg);
|
||||
SystemSounds.Asterisk.Play();
|
||||
return;
|
||||
}
|
||||
|
||||
if (SAV.Edited)
|
||||
{
|
||||
WinFormsUtil.Alert(MsgSaveChecksumFailEdited);
|
||||
return;
|
||||
}
|
||||
if (SAV.ChecksumsValid)
|
||||
{
|
||||
WinFormsUtil.Alert(MsgSaveChecksumValid);
|
||||
return;
|
||||
}
|
||||
|
||||
if (SAV.ChecksumsValid) { WinFormsUtil.Alert(MsgSaveChecksumValid); return; }
|
||||
if (DialogResult.Yes == WinFormsUtil.Prompt(MessageBoxButtons.YesNo, MsgSaveChecksumFailExport))
|
||||
Clipboard.SetText(SAV.ChecksumInfo);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user