mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-11 15:07:11 +00:00
More UI improvements
Hold Control when right clicking a Box/Party/etc slot to get the Legality menu item to appear. Improve the SD card locked check when saving for multiple exception types.
This commit is contained in:
parent
5ae027c934
commit
340b57ee60
1 changed files with 22 additions and 2 deletions
|
@ -122,6 +122,23 @@ namespace PKHeX.WinForms
|
|||
|
||||
FLP_SAVtools.Scroll += WinFormsUtil.PanelScroll;
|
||||
|
||||
// Add Legality check to right click context menus
|
||||
// ToolStripItem can't be in multiple contextmenus, so put the item back when closing.
|
||||
var cm = new[]{mnuV, mnuVSD};
|
||||
foreach (var c in cm)
|
||||
{
|
||||
c.Opening += (sender, e) =>
|
||||
{
|
||||
if (ModifierKeys == Keys.Control)
|
||||
((ContextMenuStrip)sender).Items.Add(mnuLLegality);
|
||||
};
|
||||
c.Closing += (sender, e) =>
|
||||
{
|
||||
if (((ContextMenuStrip)sender).Items.Contains(mnuLLegality))
|
||||
mnuL.Items.Add(mnuLLegality);
|
||||
};
|
||||
}
|
||||
|
||||
// Load WC6 folder to legality
|
||||
refreshWC6DB();
|
||||
// Load WC7 folder to legality
|
||||
|
@ -3175,9 +3192,12 @@ namespace PKHeX.WinForms
|
|||
SAV.Edited = false;
|
||||
WinFormsUtil.Alert("SAV exported to:", main.FileName);
|
||||
}
|
||||
catch (UnauthorizedAccessException x)
|
||||
catch (Exception x)
|
||||
{
|
||||
WinFormsUtil.Error(x.Message, "If destination is a removable disk (SD card), please ensure the write protection switch is not set.");
|
||||
if (x is UnauthorizedAccessException || x is FileNotFoundException)
|
||||
WinFormsUtil.Error("Unable to save." + Environment.NewLine + x.Message,
|
||||
"If destination is a removable disk (SD card), please ensure the write protection switch is not set.");
|
||||
else throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue