diff --git a/PKHeX.Core/Editing/Saves/BoxManipulator.cs b/PKHeX.Core/Editing/Saves/BoxManipulator.cs
index 879577eb5..ccce64aaa 100644
--- a/PKHeX.Core/Editing/Saves/BoxManipulator.cs
+++ b/PKHeX.Core/Editing/Saves/BoxManipulator.cs
@@ -39,6 +39,20 @@ public bool Execute(IBoxManip manip, int box, bool allBoxes, bool reverse = fals
return true;
}
+ ///
+ /// Executes the provided with the provided parameters.
+ ///
+ /// Manipulation to perform on the box data.
+ /// Single box to modify; if is set, this param is ignored.
+ /// Indicates if all boxes are to be manipulated, or just one box.
+ /// Manipulation action should be inverted (criteria) or reversed (sort).
+ /// True if operation succeeded, false if no changes made.
+ public bool Execute(BoxManipType type, int box, bool allBoxes, bool reverse = false)
+ {
+ var manip = type.GetManip();
+ return Execute(manip, box, allBoxes, reverse);
+ }
+
///
/// Sanity check for modifying the box data.
///
diff --git a/PKHeX.WinForms/Controls/SAV Editor/BoxMenuStrip.cs b/PKHeX.WinForms/Controls/SAV Editor/BoxMenuStrip.cs
index 5b81c5858..289069839 100644
--- a/PKHeX.WinForms/Controls/SAV Editor/BoxMenuStrip.cs
+++ b/PKHeX.WinForms/Controls/SAV Editor/BoxMenuStrip.cs
@@ -106,8 +106,8 @@ public void ToggleVisibility()
Resources.wand,
};
- public void Clear() => ((ToolStripMenuItem)Items[0]).DropDownItems[0].PerformClick();
- public void Sort() => ((ToolStripMenuItem)Items[1]).DropDownItems[0].PerformClick();
+ public void Clear() => Manipulator.Execute(BoxManipType.DeleteAll, sav.SAV.CurrentBox, All);
+ public void Sort() => Manipulator.Execute(BoxManipType.SortSpecies, sav.SAV.CurrentBox, All);
private static bool All => (ModifierKeys & Keys.Shift) != 0;
private static bool Reverse => (ModifierKeys & Keys.Control) != 0;