PKHeX/PKHeX.WinForms/Controls/SAV Editor/SlotChangeInfo.cs
Kurt 11b2dc35d7 Refactor main form into smaller pieces
pkm editor, sav editor, menus, and a manager to glue the storage slots
together
decouples the pkm/sav editors from a static savefile reference.

improves dragdrop/click view/set/delete indication, hides unavailable
contextmenuitems, and fixes a few incorrect references. Box Subviewer
slots now have all the indication/events that the main save editor slots
have.

pls report behavior bugs 👍
2017-05-22 21:55:12 -07:00

34 lines
909 B
C#

using PKHeX.Core;
namespace PKHeX.WinForms
{
public class SlotChangeInfo
{
public bool LeftMouseIsDown;
public bool RightMouseIsDown;
public bool DragDropInProgress;
public object Cursor;
public string CurrentPath;
public SlotChange Source;
public SlotChange Destination;
public readonly byte[] BlankData;
public SlotChangeInfo(SaveFile sav)
{
BlankData = sav.BlankPKM.EncryptedPartyData;
Reset();
}
public bool SameSlot => Source.Slot == Destination.Slot && Source.Box == Destination.Box;
public void Reset()
{
LeftMouseIsDown = RightMouseIsDown = DragDropInProgress = false;
Source = new SlotChange {OriginalData = BlankData};
Destination = new SlotChange();
Cursor = CurrentPath = null;
}
}
}