mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 14:00:21 +00:00
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 👍
This commit is contained in:
parent
db4f9ba9e7
commit
11b2dc35d7
90 changed files with 13462 additions and 13631 deletions
|
@ -7,8 +7,11 @@ namespace PKHeX.Core
|
|||
public static class GameInfo
|
||||
{
|
||||
private static readonly string[] ptransp = { "ポケシフター", "Poké Transfer", "Poké Fret", "Pokétrasporto", "Poképorter", "Pokétransfer", "포케시프터", "宝可传送", "寶可傳送", "ポケシフター" };
|
||||
public static readonly string[] lang_val = { "ja", "en", "fr", "it", "de", "es", "ko", "zh", "zh2", "pt" };
|
||||
private static readonly string[] lang_val = { "ja", "en", "fr", "it", "de", "es", "ko", "zh", "zh2", "pt" };
|
||||
private const string DefaultLanguage = "en";
|
||||
public static string CurrentLanguage { get; set; } = DefaultLanguage;
|
||||
public static int Language(string lang = null) => Array.IndexOf(lang_val, lang ?? CurrentLanguage);
|
||||
public static string Language2Char(uint lang) => lang > lang_val.Length ? DefaultLanguage : lang_val[lang];
|
||||
private static readonly GameStrings[] Languages = new GameStrings[lang_val.Length];
|
||||
|
||||
// Lazy fetch implementation
|
||||
|
|
|
@ -1,21 +1,11 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace PKHeX.Core
|
||||
{
|
||||
public class BK4 : PKM // Big Endian 4th Generation PKM File
|
||||
public class BK4 : PK4 // Big Endian 4th Generation PKM File
|
||||
{
|
||||
public static readonly byte[] ExtraBytes =
|
||||
{
|
||||
0x42, 0x43, 0x5E, 0x63, 0x64, 0x65, 0x66, 0x67, 0x87
|
||||
};
|
||||
public sealed override int SIZE_PARTY => PKX.SIZE_4PARTY;
|
||||
public override int SIZE_STORED => PKX.SIZE_4STORED;
|
||||
public override int Format => 4;
|
||||
public override PersonalInfo PersonalInfo => PersonalTable.HGSS[Species];
|
||||
|
||||
// Note: Only overrides that are different from PK4 are included.
|
||||
public override byte[] DecryptedBoxData => EncryptedBoxData;
|
||||
|
||||
public override bool Valid => ChecksumValid || Sanity == 0 && Species <= 493;
|
||||
|
||||
public BK4(byte[] decryptedData = null, string ident = null)
|
||||
|
@ -24,7 +14,7 @@ namespace PKHeX.Core
|
|||
uint sv = ((PID & 0x3E000) >> 0xD) % 24;
|
||||
Data = PKX.shuffleArray45(Data, sv);
|
||||
Identifier = ident;
|
||||
if (Sanity != 0 && Species <= 493 && !ChecksumValid) // We can only hope
|
||||
if (Sanity != 0 && Species <= MaxSpeciesID && !ChecksumValid) // We can only hope
|
||||
RefreshChecksum();
|
||||
if (Valid && Sanity == 0)
|
||||
Sanity = 0x4000;
|
||||
|
@ -40,12 +30,6 @@ namespace PKHeX.Core
|
|||
public override byte[] Nickname_Trash { get => getData(0x48, 24); set { if (value?.Length == 24) value.CopyTo(Data, 0x48); } }
|
||||
public override byte[] OT_Trash { get => getData(0x68, 16); set { if (value?.Length == 16) value.CopyTo(Data, 0x68); } }
|
||||
|
||||
// Future Attributes
|
||||
public override uint EncryptionConstant { get => PID; set { } }
|
||||
public override int Nature { get => (int)(PID % 25); set { } }
|
||||
public override int CurrentFriendship { get => OT_Friendship; set => OT_Friendship = value; }
|
||||
public override int CurrentHandler { get => 0; set { } }
|
||||
|
||||
// Structure
|
||||
public override uint PID { get => BigEndian.ToUInt32(Data, 0x00); set => BigEndian.GetBytes(value).CopyTo(Data, 0x00); }
|
||||
public override ushort Sanity { get => BigEndian.ToUInt16(Data, 0x04); set => BigEndian.GetBytes(value).CopyTo(Data, 0x04); }
|
||||
|
@ -61,59 +45,43 @@ namespace PKHeX.Core
|
|||
get => BigEndian.ToUInt32(Data, 0x10);
|
||||
set => BigEndian.GetBytes(value).CopyTo(Data, 0x10);
|
||||
}
|
||||
public override int OT_Friendship { get => Data[0x14]; set => Data[0x14] = (byte)value; }
|
||||
public override int Ability { get => Data[0x15]; set => Data[0x15] = (byte)value; }
|
||||
public override int MarkValue { get => Data[0x16]; protected set => Data[0x16] = (byte)value; }
|
||||
public override int Language { get => Data[0x17]; set => Data[0x17] = (byte)value; }
|
||||
public override int EV_HP { get => Data[0x18]; set => Data[0x18] = (byte)value; }
|
||||
public override int EV_ATK { get => Data[0x19]; set => Data[0x19] = (byte)value; }
|
||||
public override int EV_DEF { get => Data[0x1A]; set => Data[0x1A] = (byte)value; }
|
||||
public override int EV_SPE { get => Data[0x1B]; set => Data[0x1B] = (byte)value; }
|
||||
public override int EV_SPA { get => Data[0x1C]; set => Data[0x1C] = (byte)value; }
|
||||
public override int EV_SPD { get => Data[0x1D]; set => Data[0x1D] = (byte)value; }
|
||||
public override int CNT_Cool { get => Data[0x1E]; set => Data[0x1E] = (byte)value; }
|
||||
public override int CNT_Beauty { get => Data[0x1F]; set => Data[0x1F] = (byte)value; }
|
||||
public override int CNT_Cute { get => Data[0x20]; set => Data[0x20] = (byte)value; }
|
||||
public override int CNT_Smart { get => Data[0x21]; set => Data[0x21] = (byte)value; }
|
||||
public override int CNT_Tough { get => Data[0x22]; set => Data[0x22] = (byte)value; }
|
||||
public override int CNT_Sheen { get => Data[0x23]; set => Data[0x23] = (byte)value; }
|
||||
|
||||
private byte RIB0 { get => Data[0x24]; set => Data[0x24] = value; } // Sinnoh 1
|
||||
private byte RIB1 { get => Data[0x25]; set => Data[0x25] = value; } // Sinnoh 2
|
||||
private byte RIB2 { get => Data[0x26]; set => Data[0x26] = value; } // Unova 1
|
||||
private byte RIB3 { get => Data[0x27]; set => Data[0x27] = value; } // Unova 2
|
||||
public bool RibbonChampionSinnoh { get => (RIB0 & (1 << 0)) == 1 << 0; set => RIB0 = (byte)(RIB0 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public bool RibbonAbility { get => (RIB0 & (1 << 1)) == 1 << 1; set => RIB0 = (byte)(RIB0 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public bool RibbonAbilityGreat { get => (RIB0 & (1 << 2)) == 1 << 2; set => RIB0 = (byte)(RIB0 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public bool RibbonAbilityDouble { get => (RIB0 & (1 << 3)) == 1 << 3; set => RIB0 = (byte)(RIB0 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public bool RibbonAbilityMulti { get => (RIB0 & (1 << 4)) == 1 << 4; set => RIB0 = (byte)(RIB0 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public bool RibbonAbilityPair { get => (RIB0 & (1 << 5)) == 1 << 5; set => RIB0 = (byte)(RIB0 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public bool RibbonAbilityWorld { get => (RIB0 & (1 << 6)) == 1 << 6; set => RIB0 = (byte)(RIB0 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public bool RibbonAlert { get => (RIB0 & (1 << 7)) == 1 << 7; set => RIB0 = (byte)(RIB0 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public bool RibbonShock { get => (RIB1 & (1 << 0)) == 1 << 0; set => RIB1 = (byte)(RIB1 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public bool RibbonDowncast { get => (RIB1 & (1 << 1)) == 1 << 1; set => RIB1 = (byte)(RIB1 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public bool RibbonCareless { get => (RIB1 & (1 << 2)) == 1 << 2; set => RIB1 = (byte)(RIB1 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public bool RibbonRelax { get => (RIB1 & (1 << 3)) == 1 << 3; set => RIB1 = (byte)(RIB1 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public bool RibbonSnooze { get => (RIB1 & (1 << 4)) == 1 << 4; set => RIB1 = (byte)(RIB1 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public bool RibbonSmile { get => (RIB1 & (1 << 5)) == 1 << 5; set => RIB1 = (byte)(RIB1 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public bool RibbonGorgeous { get => (RIB1 & (1 << 6)) == 1 << 6; set => RIB1 = (byte)(RIB1 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public bool RibbonRoyal { get => (RIB1 & (1 << 7)) == 1 << 7; set => RIB1 = (byte)(RIB1 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public bool RibbonGorgeousRoyal { get => (RIB2 & (1 << 0)) == 1 << 0; set => RIB2 = (byte)(RIB2 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public bool RibbonFootprint { get => (RIB2 & (1 << 1)) == 1 << 1; set => RIB2 = (byte)(RIB2 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public bool RibbonRecord { get => (RIB2 & (1 << 2)) == 1 << 2; set => RIB2 = (byte)(RIB2 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public bool RibbonEvent { get => (RIB2 & (1 << 3)) == 1 << 3; set => RIB2 = (byte)(RIB2 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public bool RibbonLegend { get => (RIB2 & (1 << 4)) == 1 << 4; set => RIB2 = (byte)(RIB2 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public bool RibbonChampionWorld { get => (RIB2 & (1 << 5)) == 1 << 5; set => RIB2 = (byte)(RIB2 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public bool RibbonBirthday { get => (RIB2 & (1 << 6)) == 1 << 6; set => RIB2 = (byte)(RIB2 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public bool RibbonSpecial { get => (RIB2 & (1 << 7)) == 1 << 7; set => RIB2 = (byte)(RIB2 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public bool RibbonSouvenir { get => (RIB3 & (1 << 0)) == 1 << 0; set => RIB3 = (byte)(RIB3 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public bool RibbonWishing { get => (RIB3 & (1 << 1)) == 1 << 1; set => RIB3 = (byte)(RIB3 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public bool RibbonClassic { get => (RIB3 & (1 << 2)) == 1 << 2; set => RIB3 = (byte)(RIB3 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public bool RibbonPremier { get => (RIB3 & (1 << 3)) == 1 << 3; set => RIB3 = (byte)(RIB3 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public bool RIB3_4 { get => (RIB3 & (1 << 4)) == 1 << 4; set => RIB3 = (byte)(RIB3 & ~(1 << 4) | (value ? 1 << 4 : 0)); } // Unused
|
||||
public bool RIB3_5 { get => (RIB3 & (1 << 5)) == 1 << 5; set => RIB3 = (byte)(RIB3 & ~(1 << 5) | (value ? 1 << 5 : 0)); } // Unused
|
||||
public bool RIB3_6 { get => (RIB3 & (1 << 6)) == 1 << 6; set => RIB3 = (byte)(RIB3 & ~(1 << 6) | (value ? 1 << 6 : 0)); } // Unused
|
||||
public bool RIB3_7 { get => (RIB3 & (1 << 7)) == 1 << 7; set => RIB3 = (byte)(RIB3 & ~(1 << 7) | (value ? 1 << 7 : 0)); } // Unused
|
||||
public new bool RibbonChampionSinnoh { get => (RIB0 & (1 << 0)) == 1 << 0; set => RIB0 = (byte)(RIB0 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public new bool RibbonAbility { get => (RIB0 & (1 << 1)) == 1 << 1; set => RIB0 = (byte)(RIB0 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public new bool RibbonAbilityGreat { get => (RIB0 & (1 << 2)) == 1 << 2; set => RIB0 = (byte)(RIB0 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public new bool RibbonAbilityDouble { get => (RIB0 & (1 << 3)) == 1 << 3; set => RIB0 = (byte)(RIB0 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public new bool RibbonAbilityMulti { get => (RIB0 & (1 << 4)) == 1 << 4; set => RIB0 = (byte)(RIB0 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public new bool RibbonAbilityPair { get => (RIB0 & (1 << 5)) == 1 << 5; set => RIB0 = (byte)(RIB0 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public new bool RibbonAbilityWorld { get => (RIB0 & (1 << 6)) == 1 << 6; set => RIB0 = (byte)(RIB0 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public new bool RibbonAlert { get => (RIB0 & (1 << 7)) == 1 << 7; set => RIB0 = (byte)(RIB0 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public new bool RibbonShock { get => (RIB1 & (1 << 0)) == 1 << 0; set => RIB1 = (byte)(RIB1 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public new bool RibbonDowncast { get => (RIB1 & (1 << 1)) == 1 << 1; set => RIB1 = (byte)(RIB1 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public new bool RibbonCareless { get => (RIB1 & (1 << 2)) == 1 << 2; set => RIB1 = (byte)(RIB1 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public new bool RibbonRelax { get => (RIB1 & (1 << 3)) == 1 << 3; set => RIB1 = (byte)(RIB1 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public new bool RibbonSnooze { get => (RIB1 & (1 << 4)) == 1 << 4; set => RIB1 = (byte)(RIB1 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public new bool RibbonSmile { get => (RIB1 & (1 << 5)) == 1 << 5; set => RIB1 = (byte)(RIB1 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public new bool RibbonGorgeous { get => (RIB1 & (1 << 6)) == 1 << 6; set => RIB1 = (byte)(RIB1 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public new bool RibbonRoyal { get => (RIB1 & (1 << 7)) == 1 << 7; set => RIB1 = (byte)(RIB1 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public new bool RibbonGorgeousRoyal { get => (RIB2 & (1 << 0)) == 1 << 0; set => RIB2 = (byte)(RIB2 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public new bool RibbonFootprint { get => (RIB2 & (1 << 1)) == 1 << 1; set => RIB2 = (byte)(RIB2 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public new bool RibbonRecord { get => (RIB2 & (1 << 2)) == 1 << 2; set => RIB2 = (byte)(RIB2 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public new bool RibbonEvent { get => (RIB2 & (1 << 3)) == 1 << 3; set => RIB2 = (byte)(RIB2 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public new bool RibbonLegend { get => (RIB2 & (1 << 4)) == 1 << 4; set => RIB2 = (byte)(RIB2 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public new bool RibbonChampionWorld { get => (RIB2 & (1 << 5)) == 1 << 5; set => RIB2 = (byte)(RIB2 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public new bool RibbonBirthday { get => (RIB2 & (1 << 6)) == 1 << 6; set => RIB2 = (byte)(RIB2 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public new bool RibbonSpecial { get => (RIB2 & (1 << 7)) == 1 << 7; set => RIB2 = (byte)(RIB2 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public new bool RibbonSouvenir { get => (RIB3 & (1 << 0)) == 1 << 0; set => RIB3 = (byte)(RIB3 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public new bool RibbonWishing { get => (RIB3 & (1 << 1)) == 1 << 1; set => RIB3 = (byte)(RIB3 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public new bool RibbonClassic { get => (RIB3 & (1 << 2)) == 1 << 2; set => RIB3 = (byte)(RIB3 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public new bool RibbonPremier { get => (RIB3 & (1 << 3)) == 1 << 3; set => RIB3 = (byte)(RIB3 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public new bool RIB3_4 { get => (RIB3 & (1 << 4)) == 1 << 4; set => RIB3 = (byte)(RIB3 & ~(1 << 4) | (value ? 1 << 4 : 0)); } // Unused
|
||||
public new bool RIB3_5 { get => (RIB3 & (1 << 5)) == 1 << 5; set => RIB3 = (byte)(RIB3 & ~(1 << 5) | (value ? 1 << 5 : 0)); } // Unused
|
||||
public new bool RIB3_6 { get => (RIB3 & (1 << 6)) == 1 << 6; set => RIB3 = (byte)(RIB3 & ~(1 << 6) | (value ? 1 << 6 : 0)); } // Unused
|
||||
public new bool RIB3_7 { get => (RIB3 & (1 << 7)) == 1 << 7; set => RIB3 = (byte)(RIB3 & ~(1 << 7) | (value ? 1 << 7 : 0)); } // Unused
|
||||
#endregion
|
||||
|
||||
#region Block B
|
||||
|
@ -121,15 +89,7 @@ namespace PKHeX.Core
|
|||
public override int Move2 { get => BigEndian.ToUInt16(Data, 0x2A); set => BigEndian.GetBytes((ushort)value).CopyTo(Data, 0x2A); }
|
||||
public override int Move3 { get => BigEndian.ToUInt16(Data, 0x2C); set => BigEndian.GetBytes((ushort)value).CopyTo(Data, 0x2C); }
|
||||
public override int Move4 { get => BigEndian.ToUInt16(Data, 0x2E); set => BigEndian.GetBytes((ushort)value).CopyTo(Data, 0x2E); }
|
||||
public override int Move1_PP { get => Data[0x30]; set => Data[0x30] = (byte)value; }
|
||||
public override int Move2_PP { get => Data[0x31]; set => Data[0x31] = (byte)value; }
|
||||
public override int Move3_PP { get => Data[0x32]; set => Data[0x32] = (byte)value; }
|
||||
public override int Move4_PP { get => Data[0x33]; set => Data[0x33] = (byte)value; }
|
||||
public override int Move1_PPUps { get => Data[0x34]; set => Data[0x34] = (byte)value; }
|
||||
public override int Move2_PPUps { get => Data[0x35]; set => Data[0x35] = (byte)value; }
|
||||
public override int Move3_PPUps { get => Data[0x36]; set => Data[0x36] = (byte)value; }
|
||||
public override int Move4_PPUps { get => Data[0x37]; set => Data[0x37] = (byte)value; }
|
||||
public uint IV32 { get => BigEndian.ToUInt32(Data, 0x38); set => BigEndian.GetBytes(value).CopyTo(Data, 0x38); }
|
||||
public new uint IV32 { get => BigEndian.ToUInt32(Data, 0x38); set => BigEndian.GetBytes(value).CopyTo(Data, 0x38); }
|
||||
public override int IV_HP { get => (int)(IV32 >> 02) & 0x1F; set => IV32 = (uint)((IV32 & ~(0x1F << 02)) | (uint)((value > 31 ? 31 : value) << 02)); }
|
||||
public override int IV_ATK { get => (int)(IV32 >> 07) & 0x1F; set => IV32 = (uint)((IV32 & ~(0x1F << 07)) | (uint)((value > 31 ? 31 : value) << 07)); }
|
||||
public override int IV_DEF { get => (int)(IV32 >> 12) & 0x1F; set => IV32 = (uint)((IV32 & ~(0x1F << 12)) | (uint)((value > 31 ? 31 : value) << 12)); }
|
||||
|
@ -143,43 +103,38 @@ namespace PKHeX.Core
|
|||
private byte RIB5 { get => Data[0x3D]; set => Data[0x3D] = value; } // Hoenn 1b
|
||||
private byte RIB6 { get => Data[0x3E]; set => Data[0x3E] = value; } // Hoenn 2a
|
||||
private byte RIB7 { get => Data[0x3F]; set => Data[0x3F] = value; } // Hoenn 2b
|
||||
public bool RibbonG3Cool { get => (RIB4 & (1 << 0)) == 1 << 0; set => RIB4 = (byte)(RIB4 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public bool RibbonG3CoolSuper { get => (RIB4 & (1 << 1)) == 1 << 1; set => RIB4 = (byte)(RIB4 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public bool RibbonG3CoolHyper { get => (RIB4 & (1 << 2)) == 1 << 2; set => RIB4 = (byte)(RIB4 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public bool RibbonG3CoolMaster { get => (RIB4 & (1 << 3)) == 1 << 3; set => RIB4 = (byte)(RIB4 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public bool RibbonG3Beauty { get => (RIB4 & (1 << 4)) == 1 << 4; set => RIB4 = (byte)(RIB4 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public bool RibbonG3BeautySuper { get => (RIB4 & (1 << 5)) == 1 << 5; set => RIB4 = (byte)(RIB4 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public bool RibbonG3BeautyHyper { get => (RIB4 & (1 << 6)) == 1 << 6; set => RIB4 = (byte)(RIB4 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public bool RibbonG3BeautyMaster { get => (RIB4 & (1 << 7)) == 1 << 7; set => RIB4 = (byte)(RIB4 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public bool RibbonG3Cute { get => (RIB5 & (1 << 0)) == 1 << 0; set => RIB5 = (byte)(RIB5 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public bool RibbonG3CuteSuper { get => (RIB5 & (1 << 1)) == 1 << 1; set => RIB5 = (byte)(RIB5 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public bool RibbonG3CuteHyper { get => (RIB5 & (1 << 2)) == 1 << 2; set => RIB5 = (byte)(RIB5 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public bool RibbonG3CuteMaster { get => (RIB5 & (1 << 3)) == 1 << 3; set => RIB5 = (byte)(RIB5 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public bool RibbonG3Smart { get => (RIB5 & (1 << 4)) == 1 << 4; set => RIB5 = (byte)(RIB5 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public bool RibbonG3SmartSuper { get => (RIB5 & (1 << 5)) == 1 << 5; set => RIB5 = (byte)(RIB5 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public bool RibbonG3SmartHyper { get => (RIB5 & (1 << 6)) == 1 << 6; set => RIB5 = (byte)(RIB5 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public bool RibbonG3SmartMaster { get => (RIB5 & (1 << 7)) == 1 << 7; set => RIB5 = (byte)(RIB5 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public bool RibbonG3Tough { get => (RIB6 & (1 << 0)) == 1 << 0; set => RIB6 = (byte)(RIB6 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public bool RibbonG3ToughSuper { get => (RIB6 & (1 << 1)) == 1 << 1; set => RIB6 = (byte)(RIB6 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public bool RibbonG3ToughHyper { get => (RIB6 & (1 << 2)) == 1 << 2; set => RIB6 = (byte)(RIB6 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public bool RibbonG3ToughMaster { get => (RIB6 & (1 << 3)) == 1 << 3; set => RIB6 = (byte)(RIB6 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public bool RibbonChampionG3Hoenn { get => (RIB6 & (1 << 4)) == 1 << 4; set => RIB6 = (byte)(RIB6 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public bool RibbonWinning { get => (RIB6 & (1 << 5)) == 1 << 5; set => RIB6 = (byte)(RIB6 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public bool RibbonVictory { get => (RIB6 & (1 << 6)) == 1 << 6; set => RIB6 = (byte)(RIB6 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public bool RibbonArtist { get => (RIB6 & (1 << 7)) == 1 << 7; set => RIB6 = (byte)(RIB6 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public bool RibbonEffort { get => (RIB7 & (1 << 0)) == 1 << 0; set => RIB7 = (byte)(RIB7 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public bool RibbonChampionBattle { get => (RIB7 & (1 << 1)) == 1 << 1; set => RIB7 = (byte)(RIB7 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public bool RibbonChampionRegional{ get => (RIB7 & (1 << 2)) == 1 << 2; set => RIB7 = (byte)(RIB7 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public bool RibbonChampionNational{ get => (RIB7 & (1 << 3)) == 1 << 3; set => RIB7 = (byte)(RIB7 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public bool RibbonCountry { get => (RIB7 & (1 << 4)) == 1 << 4; set => RIB7 = (byte)(RIB7 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public bool RibbonNational { get => (RIB7 & (1 << 5)) == 1 << 5; set => RIB7 = (byte)(RIB7 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public bool RibbonEarth { get => (RIB7 & (1 << 6)) == 1 << 6; set => RIB7 = (byte)(RIB7 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public bool RibbonWorld { get => (RIB7 & (1 << 7)) == 1 << 7; set => RIB7 = (byte)(RIB7 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
|
||||
public override bool FatefulEncounter { get => (Data[0x40] & 0x80) == 0x80; set => Data[0x40] = (byte)(Data[0x40] & ~0x80 | (value ? 0x80 : 0)); }
|
||||
public override int Gender { get => (Data[0x40] >> 5) & 0x3; set => Data[0x40] = (byte)(Data[0x40] & ~0x60 | ((value & 3) << 5)); }
|
||||
public override int AltForm { get => Data[0x40] & 0x1F; set => Data[0x40] = (byte)(Data[0x40] & ~0x1F | (value & 0x1F)); }
|
||||
// 0x43-0x47 Unused
|
||||
public new bool RibbonG3Cool { get => (RIB4 & (1 << 0)) == 1 << 0; set => RIB4 = (byte)(RIB4 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public new bool RibbonG3CoolSuper { get => (RIB4 & (1 << 1)) == 1 << 1; set => RIB4 = (byte)(RIB4 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public new bool RibbonG3CoolHyper { get => (RIB4 & (1 << 2)) == 1 << 2; set => RIB4 = (byte)(RIB4 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public new bool RibbonG3CoolMaster { get => (RIB4 & (1 << 3)) == 1 << 3; set => RIB4 = (byte)(RIB4 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public new bool RibbonG3Beauty { get => (RIB4 & (1 << 4)) == 1 << 4; set => RIB4 = (byte)(RIB4 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public new bool RibbonG3BeautySuper { get => (RIB4 & (1 << 5)) == 1 << 5; set => RIB4 = (byte)(RIB4 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public new bool RibbonG3BeautyHyper { get => (RIB4 & (1 << 6)) == 1 << 6; set => RIB4 = (byte)(RIB4 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public new bool RibbonG3BeautyMaster { get => (RIB4 & (1 << 7)) == 1 << 7; set => RIB4 = (byte)(RIB4 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public new bool RibbonG3Cute { get => (RIB5 & (1 << 0)) == 1 << 0; set => RIB5 = (byte)(RIB5 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public new bool RibbonG3CuteSuper { get => (RIB5 & (1 << 1)) == 1 << 1; set => RIB5 = (byte)(RIB5 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public new bool RibbonG3CuteHyper { get => (RIB5 & (1 << 2)) == 1 << 2; set => RIB5 = (byte)(RIB5 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public new bool RibbonG3CuteMaster { get => (RIB5 & (1 << 3)) == 1 << 3; set => RIB5 = (byte)(RIB5 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public new bool RibbonG3Smart { get => (RIB5 & (1 << 4)) == 1 << 4; set => RIB5 = (byte)(RIB5 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public new bool RibbonG3SmartSuper { get => (RIB5 & (1 << 5)) == 1 << 5; set => RIB5 = (byte)(RIB5 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public new bool RibbonG3SmartHyper { get => (RIB5 & (1 << 6)) == 1 << 6; set => RIB5 = (byte)(RIB5 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public new bool RibbonG3SmartMaster { get => (RIB5 & (1 << 7)) == 1 << 7; set => RIB5 = (byte)(RIB5 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public new bool RibbonG3Tough { get => (RIB6 & (1 << 0)) == 1 << 0; set => RIB6 = (byte)(RIB6 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public new bool RibbonG3ToughSuper { get => (RIB6 & (1 << 1)) == 1 << 1; set => RIB6 = (byte)(RIB6 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public new bool RibbonG3ToughHyper { get => (RIB6 & (1 << 2)) == 1 << 2; set => RIB6 = (byte)(RIB6 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public new bool RibbonG3ToughMaster { get => (RIB6 & (1 << 3)) == 1 << 3; set => RIB6 = (byte)(RIB6 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public new bool RibbonChampionG3Hoenn { get => (RIB6 & (1 << 4)) == 1 << 4; set => RIB6 = (byte)(RIB6 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public new bool RibbonWinning { get => (RIB6 & (1 << 5)) == 1 << 5; set => RIB6 = (byte)(RIB6 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public new bool RibbonVictory { get => (RIB6 & (1 << 6)) == 1 << 6; set => RIB6 = (byte)(RIB6 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public new bool RibbonArtist { get => (RIB6 & (1 << 7)) == 1 << 7; set => RIB6 = (byte)(RIB6 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public new bool RibbonEffort { get => (RIB7 & (1 << 0)) == 1 << 0; set => RIB7 = (byte)(RIB7 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public new bool RibbonChampionBattle { get => (RIB7 & (1 << 1)) == 1 << 1; set => RIB7 = (byte)(RIB7 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public new bool RibbonChampionRegional{ get => (RIB7 & (1 << 2)) == 1 << 2; set => RIB7 = (byte)(RIB7 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public new bool RibbonChampionNational{ get => (RIB7 & (1 << 3)) == 1 << 3; set => RIB7 = (byte)(RIB7 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public new bool RibbonCountry { get => (RIB7 & (1 << 4)) == 1 << 4; set => RIB7 = (byte)(RIB7 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public new bool RibbonNational { get => (RIB7 & (1 << 5)) == 1 << 5; set => RIB7 = (byte)(RIB7 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public new bool RibbonEarth { get => (RIB7 & (1 << 6)) == 1 << 6; set => RIB7 = (byte)(RIB7 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public new bool RibbonWorld { get => (RIB7 & (1 << 7)) == 1 << 7; set => RIB7 = (byte)(RIB7 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
#endregion
|
||||
|
||||
#region Block C
|
||||
|
@ -190,49 +145,42 @@ namespace PKHeX.Core
|
|||
private byte RIB9 { get => Data[0x61]; set => Data[0x61] = value; } // Sinnoh 4
|
||||
private byte RIBA { get => Data[0x62]; set => Data[0x62] = value; } // Sinnoh 5
|
||||
private byte RIBB { get => Data[0x63]; set => Data[0x63] = value; } // Sinnoh 6
|
||||
public bool RibbonG4Cool { get => (RIB8 & (1 << 0)) == 1 << 0; set => RIB8 = (byte)(RIB8 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public bool RibbonG4CoolGreat { get => (RIB8 & (1 << 1)) == 1 << 1; set => RIB8 = (byte)(RIB8 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public bool RibbonG4CoolUltra { get => (RIB8 & (1 << 2)) == 1 << 2; set => RIB8 = (byte)(RIB8 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public bool RibbonG4CoolMaster { get => (RIB8 & (1 << 3)) == 1 << 3; set => RIB8 = (byte)(RIB8 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public bool RibbonG4Beauty { get => (RIB8 & (1 << 4)) == 1 << 4; set => RIB8 = (byte)(RIB8 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public bool RibbonG4BeautyGreat { get => (RIB8 & (1 << 5)) == 1 << 5; set => RIB8 = (byte)(RIB8 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public bool RibbonG4BeautyUltra { get => (RIB8 & (1 << 6)) == 1 << 6; set => RIB8 = (byte)(RIB8 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public bool RibbonG4BeautyMaster { get => (RIB8 & (1 << 7)) == 1 << 7; set => RIB8 = (byte)(RIB8 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public bool RibbonG4Cute { get => (RIB9 & (1 << 0)) == 1 << 0; set => RIB9 = (byte)(RIB9 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public bool RibbonG4CuteGreat { get => (RIB9 & (1 << 1)) == 1 << 1; set => RIB9 = (byte)(RIB9 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public bool RibbonG4CuteUltra { get => (RIB9 & (1 << 2)) == 1 << 2; set => RIB9 = (byte)(RIB9 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public bool RibbonG4CuteMaster { get => (RIB9 & (1 << 3)) == 1 << 3; set => RIB9 = (byte)(RIB9 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public bool RibbonG4Smart { get => (RIB9 & (1 << 4)) == 1 << 4; set => RIB9 = (byte)(RIB9 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public bool RibbonG4SmartGreat { get => (RIB9 & (1 << 5)) == 1 << 5; set => RIB9 = (byte)(RIB9 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public bool RibbonG4SmartUltra { get => (RIB9 & (1 << 6)) == 1 << 6; set => RIB9 = (byte)(RIB9 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public bool RibbonG4SmartMaster { get => (RIB9 & (1 << 7)) == 1 << 7; set => RIB9 = (byte)(RIB9 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public bool RibbonG4Tough { get => (RIBA & (1 << 0)) == 1 << 0; set => RIBA = (byte)(RIBA & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public bool RibbonG4ToughGreat { get => (RIBA & (1 << 1)) == 1 << 1; set => RIBA = (byte)(RIBA & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public bool RibbonG4ToughUltra { get => (RIBA & (1 << 2)) == 1 << 2; set => RIBA = (byte)(RIBA & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public bool RibbonG4ToughMaster { get => (RIBA & (1 << 3)) == 1 << 3; set => RIBA = (byte)(RIBA & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public bool RIBA_4 { get => (RIBA & (1 << 4)) == 1 << 4; set => RIBA = (byte)(RIBA & ~(1 << 4) | (value ? 1 << 4 : 0)); } // Unused
|
||||
public bool RIBA_5 { get => (RIBA & (1 << 5)) == 1 << 5; set => RIBA = (byte)(RIBA & ~(1 << 5) | (value ? 1 << 5 : 0)); } // Unused
|
||||
public bool RIBA_6 { get => (RIBA & (1 << 6)) == 1 << 6; set => RIBA = (byte)(RIBA & ~(1 << 6) | (value ? 1 << 6 : 0)); } // Unused
|
||||
public bool RIBA_7 { get => (RIBA & (1 << 7)) == 1 << 7; set => RIBA = (byte)(RIBA & ~(1 << 7) | (value ? 1 << 7 : 0)); } // Unused
|
||||
public bool RIBB_0 { get => (RIBB & (1 << 0)) == 1 << 0; set => RIBB = (byte)(RIBB & ~(1 << 0) | (value ? 1 << 0 : 0)); } // Unused
|
||||
public bool RIBB_1 { get => (RIBB & (1 << 1)) == 1 << 1; set => RIBB = (byte)(RIBB & ~(1 << 1) | (value ? 1 << 1 : 0)); } // Unused
|
||||
public bool RIBB_2 { get => (RIBB & (1 << 2)) == 1 << 2; set => RIBB = (byte)(RIBB & ~(1 << 2) | (value ? 1 << 2 : 0)); } // Unused
|
||||
public bool RIBB_3 { get => (RIBB & (1 << 3)) == 1 << 3; set => RIBB = (byte)(RIBB & ~(1 << 3) | (value ? 1 << 3 : 0)); } // Unused
|
||||
public bool RIBB_4 { get => (RIBB & (1 << 4)) == 1 << 4; set => RIBB = (byte)(RIBB & ~(1 << 4) | (value ? 1 << 4 : 0)); } // Unused
|
||||
public bool RIBB_5 { get => (RIBB & (1 << 5)) == 1 << 5; set => RIBB = (byte)(RIBB & ~(1 << 5) | (value ? 1 << 5 : 0)); } // Unused
|
||||
public bool RIBB_6 { get => (RIBB & (1 << 6)) == 1 << 6; set => RIBB = (byte)(RIBB & ~(1 << 6) | (value ? 1 << 6 : 0)); } // Unused
|
||||
public bool RIBB_7 { get => (RIBB & (1 << 7)) == 1 << 7; set => RIBB = (byte)(RIBB & ~(1 << 7) | (value ? 1 << 7 : 0)); } // Unused
|
||||
// 0x64-0x67 Unused
|
||||
public new bool RibbonG4Cool { get => (RIB8 & (1 << 0)) == 1 << 0; set => RIB8 = (byte)(RIB8 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public new bool RibbonG4CoolGreat { get => (RIB8 & (1 << 1)) == 1 << 1; set => RIB8 = (byte)(RIB8 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public new bool RibbonG4CoolUltra { get => (RIB8 & (1 << 2)) == 1 << 2; set => RIB8 = (byte)(RIB8 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public new bool RibbonG4CoolMaster { get => (RIB8 & (1 << 3)) == 1 << 3; set => RIB8 = (byte)(RIB8 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public new bool RibbonG4Beauty { get => (RIB8 & (1 << 4)) == 1 << 4; set => RIB8 = (byte)(RIB8 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public new bool RibbonG4BeautyGreat { get => (RIB8 & (1 << 5)) == 1 << 5; set => RIB8 = (byte)(RIB8 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public new bool RibbonG4BeautyUltra { get => (RIB8 & (1 << 6)) == 1 << 6; set => RIB8 = (byte)(RIB8 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public new bool RibbonG4BeautyMaster { get => (RIB8 & (1 << 7)) == 1 << 7; set => RIB8 = (byte)(RIB8 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public new bool RibbonG4Cute { get => (RIB9 & (1 << 0)) == 1 << 0; set => RIB9 = (byte)(RIB9 & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public new bool RibbonG4CuteGreat { get => (RIB9 & (1 << 1)) == 1 << 1; set => RIB9 = (byte)(RIB9 & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public new bool RibbonG4CuteUltra { get => (RIB9 & (1 << 2)) == 1 << 2; set => RIB9 = (byte)(RIB9 & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public new bool RibbonG4CuteMaster { get => (RIB9 & (1 << 3)) == 1 << 3; set => RIB9 = (byte)(RIB9 & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public new bool RibbonG4Smart { get => (RIB9 & (1 << 4)) == 1 << 4; set => RIB9 = (byte)(RIB9 & ~(1 << 4) | (value ? 1 << 4 : 0)); }
|
||||
public new bool RibbonG4SmartGreat { get => (RIB9 & (1 << 5)) == 1 << 5; set => RIB9 = (byte)(RIB9 & ~(1 << 5) | (value ? 1 << 5 : 0)); }
|
||||
public new bool RibbonG4SmartUltra { get => (RIB9 & (1 << 6)) == 1 << 6; set => RIB9 = (byte)(RIB9 & ~(1 << 6) | (value ? 1 << 6 : 0)); }
|
||||
public new bool RibbonG4SmartMaster { get => (RIB9 & (1 << 7)) == 1 << 7; set => RIB9 = (byte)(RIB9 & ~(1 << 7) | (value ? 1 << 7 : 0)); }
|
||||
public new bool RibbonG4Tough { get => (RIBA & (1 << 0)) == 1 << 0; set => RIBA = (byte)(RIBA & ~(1 << 0) | (value ? 1 << 0 : 0)); }
|
||||
public new bool RibbonG4ToughGreat { get => (RIBA & (1 << 1)) == 1 << 1; set => RIBA = (byte)(RIBA & ~(1 << 1) | (value ? 1 << 1 : 0)); }
|
||||
public new bool RibbonG4ToughUltra { get => (RIBA & (1 << 2)) == 1 << 2; set => RIBA = (byte)(RIBA & ~(1 << 2) | (value ? 1 << 2 : 0)); }
|
||||
public new bool RibbonG4ToughMaster { get => (RIBA & (1 << 3)) == 1 << 3; set => RIBA = (byte)(RIBA & ~(1 << 3) | (value ? 1 << 3 : 0)); }
|
||||
public new bool RIBA_4 { get => (RIBA & (1 << 4)) == 1 << 4; set => RIBA = (byte)(RIBA & ~(1 << 4) | (value ? 1 << 4 : 0)); } // Unused
|
||||
public new bool RIBA_5 { get => (RIBA & (1 << 5)) == 1 << 5; set => RIBA = (byte)(RIBA & ~(1 << 5) | (value ? 1 << 5 : 0)); } // Unused
|
||||
public new bool RIBA_6 { get => (RIBA & (1 << 6)) == 1 << 6; set => RIBA = (byte)(RIBA & ~(1 << 6) | (value ? 1 << 6 : 0)); } // Unused
|
||||
public new bool RIBA_7 { get => (RIBA & (1 << 7)) == 1 << 7; set => RIBA = (byte)(RIBA & ~(1 << 7) | (value ? 1 << 7 : 0)); } // Unused
|
||||
public new bool RIBB_0 { get => (RIBB & (1 << 0)) == 1 << 0; set => RIBB = (byte)(RIBB & ~(1 << 0) | (value ? 1 << 0 : 0)); } // Unused
|
||||
public new bool RIBB_1 { get => (RIBB & (1 << 1)) == 1 << 1; set => RIBB = (byte)(RIBB & ~(1 << 1) | (value ? 1 << 1 : 0)); } // Unused
|
||||
public new bool RIBB_2 { get => (RIBB & (1 << 2)) == 1 << 2; set => RIBB = (byte)(RIBB & ~(1 << 2) | (value ? 1 << 2 : 0)); } // Unused
|
||||
public new bool RIBB_3 { get => (RIBB & (1 << 3)) == 1 << 3; set => RIBB = (byte)(RIBB & ~(1 << 3) | (value ? 1 << 3 : 0)); } // Unused
|
||||
public new bool RIBB_4 { get => (RIBB & (1 << 4)) == 1 << 4; set => RIBB = (byte)(RIBB & ~(1 << 4) | (value ? 1 << 4 : 0)); } // Unused
|
||||
public new bool RIBB_5 { get => (RIBB & (1 << 5)) == 1 << 5; set => RIBB = (byte)(RIBB & ~(1 << 5) | (value ? 1 << 5 : 0)); } // Unused
|
||||
public new bool RIBB_6 { get => (RIBB & (1 << 6)) == 1 << 6; set => RIBB = (byte)(RIBB & ~(1 << 6) | (value ? 1 << 6 : 0)); } // Unused
|
||||
public new bool RIBB_7 { get => (RIBB & (1 << 7)) == 1 << 7; set => RIBB = (byte)(RIBB & ~(1 << 7) | (value ? 1 << 7 : 0)); } // Unused
|
||||
#endregion
|
||||
|
||||
#region Block D
|
||||
public override string OT_Name { get => getString(0x68, 16); set => setString(value, 7).CopyTo(Data, 0x68); }
|
||||
public override int Egg_Year { get => Data[0x78]; set => Data[0x78] = (byte)value; }
|
||||
public override int Egg_Month { get => Data[0x79]; set => Data[0x79] = (byte)value; }
|
||||
public override int Egg_Day { get => Data[0x7A]; set => Data[0x7A] = (byte)value; }
|
||||
public override int Met_Year { get => Data[0x7B]; set => Data[0x7B] = (byte)value; }
|
||||
public override int Met_Month { get => Data[0x7C]; set => Data[0x7C] = (byte)value; }
|
||||
public override int Met_Day { get => Data[0x7D]; set => Data[0x7D] = (byte)value; }
|
||||
|
||||
public override int Egg_Location
|
||||
{
|
||||
|
@ -294,35 +242,6 @@ namespace PKHeX.Core
|
|||
}
|
||||
}
|
||||
}
|
||||
private byte PKRS { get => Data[0x82]; set => Data[0x82] = value; }
|
||||
public override int PKRS_Days { get => PKRS & 0xF; set => PKRS = (byte)(PKRS & ~0xF | value); }
|
||||
public override int PKRS_Strain { get => PKRS >> 4; set => PKRS = (byte)(PKRS & 0xF | (value << 4)); }
|
||||
public override int Ball
|
||||
{
|
||||
get => Math.Max(Data[0x86], Data[0x83]);
|
||||
// Pokemon obtained in HGSS have the HGSS ball set (@0x86)
|
||||
// However, this info is not set when receiving a wondercard!
|
||||
// The PGT contains a preformatted PK4 file, which is slightly modified.
|
||||
// No HGSS balls were used, and no HGSS ball info is set.
|
||||
|
||||
// Sneaky way = return the higher of the two values.
|
||||
|
||||
set
|
||||
{
|
||||
// Ball to display in DPPt
|
||||
Data[0x83] = (byte)(value <= 0x10 ? value : 4); // Cap at Cherish Ball
|
||||
|
||||
// HGSS Exclusive Balls -- If the user wants to screw things up, let them. Any legality checking could catch hax.
|
||||
if (value > 0x10 || (HGSS && !FatefulEncounter))
|
||||
Data[0x86] = (byte)(value <= 0x18 ? value : 4); // Cap at Comp Ball
|
||||
else
|
||||
Data[0x86] = 0; // Unused
|
||||
}
|
||||
}
|
||||
public override int Met_Level { get => Data[0x84] >> 1; set => Data[0x84] = (byte)((Data[0x84] & 0x1) | value << 1); }
|
||||
public override int OT_Gender { get => Data[0x84] & 1; set => Data[0x84] = (byte)((Data[0x84] & ~0x1) | value & 1); }
|
||||
public override int EncounterType { get => Data[0x85]; set => Data[0x85] = (byte)value; }
|
||||
// Unused 0x87
|
||||
#endregion
|
||||
|
||||
public override int Stat_Level { get => Data[0x8C]; set => Data[0x8C] = (byte)value; }
|
||||
|
@ -333,27 +252,6 @@ namespace PKHeX.Core
|
|||
public override int Stat_SPE { get => BigEndian.ToUInt16(Data, 0x96); set => BigEndian.GetBytes((ushort)value).CopyTo(Data, 0x96); }
|
||||
public override int Stat_SPA { get => BigEndian.ToUInt16(Data, 0x98); set => BigEndian.GetBytes((ushort)value).CopyTo(Data, 0x98); }
|
||||
public override int Stat_SPD { get => BigEndian.ToUInt16(Data, 0x9A); set => BigEndian.GetBytes((ushort)value).CopyTo(Data, 0x9A); }
|
||||
|
||||
public override int PSV => (int)((PID >> 16 ^ PID & 0xFFFF) >> 3);
|
||||
public override int TSV => (TID ^ SID) >> 3;
|
||||
public override int Characteristic
|
||||
{
|
||||
get
|
||||
{
|
||||
// Characteristic with PID%6
|
||||
int pm6 = (int)(PID % 6); // PID MOD 6
|
||||
int maxIV = IVs.Max();
|
||||
int pm6stat = 0;
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
pm6stat = (pm6 + i) % 6;
|
||||
if (IVs[pm6stat] == maxIV)
|
||||
break; // P%6 is this stat
|
||||
}
|
||||
return pm6stat * 5 + maxIV % 5;
|
||||
}
|
||||
}
|
||||
|
||||
// Methods
|
||||
protected override ushort CalculateChecksum()
|
||||
|
|
|
@ -195,5 +195,17 @@ namespace PKHeX.Core
|
|||
{
|
||||
return (byte[])Data.Clone();
|
||||
}
|
||||
|
||||
// Maximums
|
||||
public override int MaxMoveID => Legal.MaxMoveID_3;
|
||||
public override int MaxSpeciesID => Legal.MaxSpeciesID_3;
|
||||
public override int MaxAbilityID => Legal.MaxAbilityID_3;
|
||||
public override int MaxItemID => Legal.MaxItemID_3;
|
||||
public override int MaxBallID => Legal.MaxBallID_3;
|
||||
public override int MaxGameID => 5;
|
||||
public override int MaxIV => 31;
|
||||
public override int MaxEV => 252;
|
||||
public override int OTLength => 7;
|
||||
public override int NickLength => 10;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -263,6 +263,18 @@ namespace PKHeX.Core
|
|||
#endregion
|
||||
public bool CatchRateIsItem = false;
|
||||
|
||||
// Maximums
|
||||
public override int MaxMoveID => Legal.MaxMoveID_1;
|
||||
public override int MaxSpeciesID => Legal.MaxSpeciesID_1;
|
||||
public override int MaxAbilityID => Legal.MaxAbilityID_1;
|
||||
public override int MaxItemID => Legal.MaxItemID_1;
|
||||
public override int MaxBallID => -1;
|
||||
public override int MaxGameID => -1;
|
||||
public override int MaxIV => 15;
|
||||
public override int MaxEV => ushort.MaxValue;
|
||||
public override int OTLength => Japanese ? 5 : 7;
|
||||
public override int NickLength => Japanese ? 5 : 10;
|
||||
|
||||
public PK2 convertToPK2()
|
||||
{
|
||||
PK2 pk2 = new PK2(null, Identifier, Japanese) {Species = Species};
|
||||
|
|
|
@ -333,6 +333,18 @@ namespace PKHeX.Core
|
|||
public override int CNT_Sheen { get => 0; set { } }
|
||||
#endregion
|
||||
|
||||
// Maximums
|
||||
public override int MaxMoveID => Legal.MaxMoveID_2;
|
||||
public override int MaxSpeciesID => Legal.MaxSpeciesID_2;
|
||||
public override int MaxAbilityID => Legal.MaxAbilityID_2;
|
||||
public override int MaxItemID => Legal.MaxItemID_2;
|
||||
public override int MaxBallID => -1;
|
||||
public override int MaxGameID => -1;
|
||||
public override int MaxIV => 15;
|
||||
public override int MaxEV => ushort.MaxValue;
|
||||
public override int OTLength => Japanese ? 5 : 7;
|
||||
public override int NickLength => Japanese ? 5 : 10;
|
||||
|
||||
public PK1 convertToPK1()
|
||||
{
|
||||
PK1 pk1 = new PK1(null, Identifier, Japanese);
|
||||
|
|
|
@ -162,6 +162,18 @@ namespace PKHeX.Core
|
|||
public override bool WasIngameTrade => Met_Location == 254; // Trade
|
||||
public override bool WasGiftEgg => IsEgg && Met_Location == 253; // Gift Egg, indistinguible from normal eggs after hatch
|
||||
public override bool WasEventEgg => IsEgg && Met_Location == 255; // Event Egg, indistinguible from normal eggs after hatch
|
||||
|
||||
// Maximums
|
||||
public override int MaxMoveID => Legal.MaxMoveID_3;
|
||||
public override int MaxSpeciesID => Legal.MaxSpeciesID_3;
|
||||
public override int MaxAbilityID => Legal.MaxAbilityID_3;
|
||||
public override int MaxItemID => Legal.MaxItemID_3;
|
||||
public override int MaxBallID => Legal.MaxBallID_3;
|
||||
public override int MaxGameID => 5;
|
||||
public override int MaxIV => 31;
|
||||
public override int MaxEV => 252;
|
||||
public override int OTLength => 7;
|
||||
public override int NickLength => 10;
|
||||
|
||||
public override byte[] Encrypt()
|
||||
{
|
||||
|
|
|
@ -347,6 +347,19 @@ namespace PKHeX.Core
|
|||
public override bool WasEvent => Met_Location >= 3000 && Met_Location <= 3076 || FatefulEncounter;
|
||||
public override bool WasIngameTrade => Met_Location == 2001; // Trade
|
||||
public override bool WasEventEgg => WasEgg && Species == 490; // Manaphy was the only generation 4 released event egg
|
||||
|
||||
// Maximums
|
||||
public override int MaxMoveID => Legal.MaxMoveID_4;
|
||||
public override int MaxSpeciesID => Legal.MaxSpeciesID_4;
|
||||
public override int MaxAbilityID => Legal.MaxAbilityID_4;
|
||||
public override int MaxItemID => Legal.MaxItemID_4_HGSS;
|
||||
public override int MaxBallID => Legal.MaxBallID_4;
|
||||
public override int MaxGameID => 15; // Colo/XD
|
||||
public override int MaxIV => 31;
|
||||
public override int MaxEV => 252;
|
||||
public override int OTLength => 7;
|
||||
public override int NickLength => 10;
|
||||
|
||||
// Methods
|
||||
public override byte[] Encrypt()
|
||||
{
|
||||
|
|
|
@ -268,6 +268,18 @@ namespace PKHeX.Core
|
|||
|
||||
// Legality Extensions
|
||||
public override bool WasEgg => GenNumber < 5 ? base.WasEgg : Legal.EggLocations5.Contains(Egg_Location);
|
||||
|
||||
// Maximums
|
||||
public override int MaxMoveID => Legal.MaxMoveID_5;
|
||||
public override int MaxSpeciesID => Legal.MaxSpeciesID_5;
|
||||
public override int MaxAbilityID => Legal.MaxAbilityID_5;
|
||||
public override int MaxItemID => Legal.MaxItemID_5_B2W2;
|
||||
public override int MaxBallID => Legal.MaxBallID_5;
|
||||
public override int MaxGameID => Legal.MaxGameID_5; // B2
|
||||
public override int MaxIV => 31;
|
||||
public override int MaxEV => 252;
|
||||
public override int OTLength => 7;
|
||||
public override int NickLength => 10;
|
||||
|
||||
// Methods
|
||||
public override byte[] Encrypt()
|
||||
|
|
|
@ -565,6 +565,18 @@ namespace PKHeX.Core
|
|||
public override bool WasTradedEgg => Egg_Location == 30002 || GenNumber == 4 && Egg_Location == 2002;
|
||||
public override bool WasIngameTrade => Met_Location == 30001 || GenNumber == 4 && Egg_Location == 2001;
|
||||
|
||||
// Maximums
|
||||
public override int MaxMoveID => Legal.MaxMoveID_6_AO;
|
||||
public override int MaxSpeciesID => Legal.MaxSpeciesID_6;
|
||||
public override int MaxAbilityID => Legal.MaxAbilityID_6_AO;
|
||||
public override int MaxItemID => Legal.MaxItemID_6_AO;
|
||||
public override int MaxBallID => Legal.MaxBallID_6;
|
||||
public override int MaxGameID => Legal.MaxGameID_6; // OR
|
||||
public override int MaxIV => 31;
|
||||
public override int MaxEV => 252;
|
||||
public override int OTLength => 12;
|
||||
public override int NickLength => 12;
|
||||
|
||||
public PK7 convertToPK7()
|
||||
{
|
||||
PK7 pk7 = new PK7(Data)
|
||||
|
|
|
@ -599,5 +599,17 @@ namespace PKHeX.Core
|
|||
public override bool WasEventEgg => GenNumber < 5 ? base.WasEventEgg : ((Egg_Location > 40000 && Egg_Location < 50000) || (FatefulEncounter && Egg_Location == 30002)) && Met_Level == 1;
|
||||
public override bool WasTradedEgg => Egg_Location == 30002 || GenNumber == 4 && Egg_Location == 2002;
|
||||
public override bool WasIngameTrade => Met_Location == 30001 || GenNumber == 4 && Egg_Location == 2001;
|
||||
|
||||
// Maximums
|
||||
public override int MaxMoveID => Legal.MaxMoveID_7;
|
||||
public override int MaxSpeciesID => Legal.MaxSpeciesID_7;
|
||||
public override int MaxAbilityID => Legal.MaxAbilityID_7;
|
||||
public override int MaxItemID => Legal.MaxItemID_7;
|
||||
public override int MaxBallID => Legal.MaxBallID_7;
|
||||
public override int MaxGameID => Legal.MaxGameID_7;
|
||||
public override int MaxIV => 31;
|
||||
public override int MaxEV => 252;
|
||||
public override int OTLength => 12;
|
||||
public override int NickLength => 12;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -267,6 +267,18 @@ namespace PKHeX.Core
|
|||
// Exposed but not Present in all
|
||||
public abstract int CurrentHandler { get; set; }
|
||||
|
||||
// Maximums
|
||||
public abstract int MaxMoveID { get; }
|
||||
public abstract int MaxSpeciesID { get; }
|
||||
public abstract int MaxItemID { get; }
|
||||
public abstract int MaxAbilityID { get; }
|
||||
public abstract int MaxBallID { get; }
|
||||
public abstract int MaxGameID { get; }
|
||||
public abstract int MaxIV { get; }
|
||||
public abstract int MaxEV { get; }
|
||||
public abstract int OTLength { get; }
|
||||
public abstract int NickLength { get; }
|
||||
|
||||
// Derived
|
||||
public int SpecForm { get => Species + (AltForm << 11); set { Species = value & 0x7FF; AltForm = value >> 11; } }
|
||||
public virtual int SpriteItem => HeldItem;
|
||||
|
@ -789,6 +801,27 @@ namespace PKHeX.Core
|
|||
{
|
||||
do PID = Util.rnd32(); while (PKX.getUnownForm(PID) != form);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Randomizes the IVs within game constraints.
|
||||
/// </summary>
|
||||
/// <returns>Randomized IVs if desired.</returns>
|
||||
public int[] randomizeIVs()
|
||||
{
|
||||
int[] ivs = new int[6];
|
||||
for (int i = 0; i < 6; i++)
|
||||
ivs[i] = (int)(Util.rnd32() & MaxIV);
|
||||
|
||||
bool IV3 = GenNumber >= 6 && (Legal.Legends.Contains(Species) || Legal.SubLegends.Contains(Species));
|
||||
if (IV3)
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
ivs[i] = MaxIV;
|
||||
Util.Shuffle(ivs); // Randomize IV order
|
||||
}
|
||||
IVs = ivs;
|
||||
return ivs;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a <see cref="XK3"/> or <see cref="PK3"/> to <see cref="CK3"/>.
|
||||
|
|
|
@ -201,5 +201,16 @@ namespace PKHeX.Core
|
|||
{
|
||||
return (byte[])Data.Clone();
|
||||
}
|
||||
// Maximums
|
||||
public override int MaxMoveID => Legal.MaxMoveID_3;
|
||||
public override int MaxSpeciesID => Legal.MaxSpeciesID_3;
|
||||
public override int MaxAbilityID => Legal.MaxAbilityID_3;
|
||||
public override int MaxItemID => Legal.MaxItemID_3;
|
||||
public override int MaxBallID => Legal.MaxBallID_3;
|
||||
public override int MaxGameID => 5;
|
||||
public override int MaxIV => 31;
|
||||
public override int MaxEV => 252;
|
||||
public override int OTLength => 7;
|
||||
public override int NickLength => 10;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ namespace PKHeX.Core
|
|||
if (value.Any(pk => PKMType != pk.GetType()))
|
||||
throw new ArgumentException($"Not {PKMType} array.");
|
||||
if (value[0].Species == 0)
|
||||
throw new ArgumentException("Can't have an empty first slot." + value.Length);
|
||||
Console.WriteLine($"Empty first slot, received {value.Length}.");
|
||||
|
||||
PKM[] newParty = value.Where(pk => pk.Species != 0).ToArray();
|
||||
|
||||
|
@ -235,7 +235,7 @@ namespace PKHeX.Core
|
|||
|
||||
bool[] Flags = new bool[EventFlagMax];
|
||||
for (int i = 0; i < Flags.Length; i++)
|
||||
Flags[i] = (Data[EventFlag + i / 8] >> i % 8 & 0x1) == 1;
|
||||
Flags[i] = (Data[EventFlag + i >> 3] >> (i & 7) & 0x1) == 1;
|
||||
return Flags;
|
||||
}
|
||||
set
|
||||
|
@ -245,7 +245,7 @@ namespace PKHeX.Core
|
|||
if (value.Length != EventFlagMax)
|
||||
return;
|
||||
|
||||
byte[] data = new byte[value.Length / 8];
|
||||
byte[] data = new byte[value.Length>>3];
|
||||
for (int i = 0; i < value.Length; i++)
|
||||
if (value[i])
|
||||
data[i >> 3] |= (byte)(1 << (i & 7));
|
||||
|
@ -329,6 +329,7 @@ namespace PKHeX.Core
|
|||
public virtual int SecondsToFame { get; set; }
|
||||
public virtual uint Money { get; set; }
|
||||
public abstract int BoxCount { get; }
|
||||
public int SlotCount => BoxCount * BoxSlotCount;
|
||||
public virtual int PartyCount { get; protected set; }
|
||||
public virtual int MultiplayerSpriteID { get => 0; set { } }
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@ namespace PKHeX.Core
|
|||
public static bool GetValueEquals(object obj, string propertyName, object value)
|
||||
{
|
||||
PropertyInfo pi = obj.GetType().GetTypeInfo().GetDeclaredProperty(propertyName);
|
||||
if (pi == null)
|
||||
return false;
|
||||
var v = pi.GetValue(obj, null);
|
||||
var c = ConvertValue(value, pi.PropertyType);
|
||||
return v.Equals(c);
|
||||
|
@ -50,9 +52,9 @@ namespace PKHeX.Core
|
|||
{
|
||||
return type.GetTypeInfo().GetDeclaredProperty(name) != null;
|
||||
}
|
||||
public static bool HasPropertyAll(this Type type, string name)
|
||||
public static bool HasPropertyAll(this Type type, Type Base, string name)
|
||||
{
|
||||
return type.GetTypeInfo().GetDeclaredProperty(name) != null;
|
||||
return HasProperty(type, name) || HasProperty(Base, name);
|
||||
}
|
||||
|
||||
private static object ConvertValue(object value, Type type)
|
||||
|
|
86
PKHeX.WinForms/Controls/PKM Editor/ContextMenuPKM.Designer.cs
generated
Normal file
86
PKHeX.WinForms/Controls/PKM Editor/ContextMenuPKM.Designer.cs
generated
Normal file
|
@ -0,0 +1,86 @@
|
|||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
partial class ContextMenuPKM
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.mnuL = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.mnuLLegality = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuLQR = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuLSave = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuL.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// mnuL
|
||||
//
|
||||
this.mnuL.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuLLegality,
|
||||
this.mnuLQR,
|
||||
this.mnuLSave});
|
||||
this.mnuL.Name = "mnuL";
|
||||
this.mnuL.Size = new System.Drawing.Size(153, 92);
|
||||
//
|
||||
// mnuLLegality
|
||||
//
|
||||
this.mnuLLegality.Name = "mnuLLegality";
|
||||
this.mnuLLegality.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuLLegality.Text = "Legality";
|
||||
this.mnuLLegality.Click += new System.EventHandler(this.ClickShowLegality);
|
||||
//
|
||||
// mnuLQR
|
||||
//
|
||||
this.mnuLQR.Name = "mnuLQR";
|
||||
this.mnuLQR.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuLQR.Text = "QR!";
|
||||
this.mnuLQR.Click += new System.EventHandler(this.ClickShowQR);
|
||||
//
|
||||
// mnuLSave
|
||||
//
|
||||
this.mnuLSave.Name = "mnuLSave";
|
||||
this.mnuLSave.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuLSave.Text = "Save as...";
|
||||
this.mnuLSave.Click += new System.EventHandler(this.ClickSaveAs);
|
||||
//
|
||||
// ContextMenuPKM
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Name = "ContextMenuPKM";
|
||||
this.mnuL.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public System.Windows.Forms.ContextMenuStrip mnuL;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuLLegality;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuLQR;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuLSave;
|
||||
}
|
||||
}
|
20
PKHeX.WinForms/Controls/PKM Editor/ContextMenuPKM.cs
Normal file
20
PKHeX.WinForms/Controls/PKM Editor/ContextMenuPKM.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
public partial class ContextMenuPKM : UserControl
|
||||
{
|
||||
public ContextMenuPKM()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public event EventHandler RequestEditorLegality;
|
||||
public event EventHandler RequestEditorQR;
|
||||
public event EventHandler RequestEditorSaveAs;
|
||||
private void ClickShowLegality(object sender, EventArgs e) => RequestEditorLegality?.Invoke(sender, e);
|
||||
private void ClickShowQR(object sender, EventArgs e) => RequestEditorQR?.Invoke(sender, e);
|
||||
private void ClickSaveAs(object sender, EventArgs e) => RequestEditorSaveAs?.Invoke(sender, e);
|
||||
}
|
||||
}
|
123
PKHeX.WinForms/Controls/PKM Editor/ContextMenuPKM.resx
Normal file
123
PKHeX.WinForms/Controls/PKM Editor/ContextMenuPKM.resx
Normal file
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="mnuL.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -1,9 +1,9 @@
|
|||
using System;
|
||||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.WinForms
|
||||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
public partial class Main
|
||||
public partial class PKMEditor
|
||||
{
|
||||
private void populateFieldsCK3()
|
||||
{
|
|
@ -1,9 +1,9 @@
|
|||
using System;
|
||||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.WinForms
|
||||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
public partial class Main
|
||||
public partial class PKMEditor
|
||||
{
|
||||
private void populateFieldsPK1()
|
||||
{
|
|
@ -1,9 +1,9 @@
|
|||
using System;
|
||||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.WinForms
|
||||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
public partial class Main
|
||||
public partial class PKMEditor
|
||||
{
|
||||
private void populateFieldsPK2()
|
||||
{
|
|
@ -1,9 +1,9 @@
|
|||
using System;
|
||||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.WinForms
|
||||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
public partial class Main
|
||||
public partial class PKMEditor
|
||||
{
|
||||
private void populateFieldsPK3()
|
||||
{
|
244
PKHeX.WinForms/Controls/PKM Editor/EditPK4.cs
Normal file
244
PKHeX.WinForms/Controls/PKM Editor/EditPK4.cs
Normal file
|
@ -0,0 +1,244 @@
|
|||
using System;
|
||||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
public partial class PKMEditor
|
||||
{
|
||||
// Main Series
|
||||
private void populateFieldsPK4()
|
||||
{
|
||||
var pk4 = pkm;
|
||||
if (pk4?.Format != 4)
|
||||
return;
|
||||
|
||||
// Do first
|
||||
pk4.Stat_Level = PKX.getLevel(pk4.Species, pk4.EXP);
|
||||
if (pk4.Stat_Level == 100 && !HaX)
|
||||
pk4.EXP = PKX.getEXP(pk4.Stat_Level, pk4.Species);
|
||||
|
||||
CB_Species.SelectedValue = pk4.Species;
|
||||
TB_Level.Text = pk4.Stat_Level.ToString();
|
||||
TB_EXP.Text = pk4.EXP.ToString();
|
||||
|
||||
// Load rest
|
||||
CHK_Fateful.Checked = pk4.FatefulEncounter;
|
||||
CHK_IsEgg.Checked = pk4.IsEgg;
|
||||
CHK_Nicknamed.Checked = pk4.IsNicknamed;
|
||||
Label_OTGender.Text = gendersymbols[pk4.OT_Gender];
|
||||
Label_OTGender.ForeColor = getGenderColor(pk4.OT_Gender);
|
||||
TB_PID.Text = pk4.PID.ToString("X8");
|
||||
CB_HeldItem.SelectedValue = pk4.HeldItem;
|
||||
CB_Nature.SelectedValue = pk4.Nature;
|
||||
TB_TID.Text = pk4.TID.ToString("00000");
|
||||
TB_SID.Text = pk4.SID.ToString("00000");
|
||||
TB_Nickname.Text = pk4.Nickname;
|
||||
TB_OT.Text = pk4.OT_Name;
|
||||
TB_Friendship.Text = pk4.CurrentFriendship.ToString();
|
||||
GB_OT.BackgroundImage = null;
|
||||
CB_Language.SelectedValue = pk4.Language;
|
||||
CB_GameOrigin.SelectedValue = pk4.Version;
|
||||
CB_EncounterType.SelectedValue = pk4.Gen4 ? pk4.EncounterType : 0;
|
||||
CB_Ball.SelectedValue = pk4.Ball;
|
||||
|
||||
CAL_MetDate.Value = pk4.MetDate ?? new DateTime(2000, 1, 1);
|
||||
|
||||
if (pk4.Egg_Location != 0)
|
||||
{
|
||||
// Was obtained initially as an egg.
|
||||
CHK_AsEgg.Checked = true;
|
||||
GB_EggConditions.Enabled = true;
|
||||
|
||||
CB_EggLocation.SelectedValue = pk4.Egg_Location;
|
||||
CAL_EggDate.Value = pk4.EggMetDate ?? new DateTime(2000, 1, 1);
|
||||
}
|
||||
else { CAL_EggDate.Value = new DateTime(2000, 01, 01); CHK_AsEgg.Checked = GB_EggConditions.Enabled = false; CB_EggLocation.SelectedValue = 0; }
|
||||
|
||||
CB_MetLocation.SelectedValue = pk4.Met_Location;
|
||||
|
||||
TB_MetLevel.Text = pk4.Met_Level.ToString();
|
||||
|
||||
// Reset Label and ComboBox visibility, as well as non-data checked status.
|
||||
Label_PKRS.Visible = CB_PKRSStrain.Visible = CHK_Infected.Checked = pk4.PKRS_Strain != 0;
|
||||
Label_PKRSdays.Visible = CB_PKRSDays.Visible = pk4.PKRS_Days != 0;
|
||||
|
||||
// Set SelectedIndexes for PKRS
|
||||
CB_PKRSStrain.SelectedIndex = pk4.PKRS_Strain;
|
||||
CHK_Cured.Checked = pk4.PKRS_Strain > 0 && pk4.PKRS_Days == 0;
|
||||
CB_PKRSDays.SelectedIndex = Math.Min(CB_PKRSDays.Items.Count - 1, pk4.PKRS_Days); // to strip out bad hacked 'rus
|
||||
|
||||
TB_Cool.Text = pk4.CNT_Cool.ToString();
|
||||
TB_Beauty.Text = pk4.CNT_Beauty.ToString();
|
||||
TB_Cute.Text = pk4.CNT_Cute.ToString();
|
||||
TB_Smart.Text = pk4.CNT_Smart.ToString();
|
||||
TB_Tough.Text = pk4.CNT_Tough.ToString();
|
||||
TB_Sheen.Text = pk4.CNT_Sheen.ToString();
|
||||
|
||||
TB_HPIV.Text = pk4.IV_HP.ToString();
|
||||
TB_ATKIV.Text = pk4.IV_ATK.ToString();
|
||||
TB_DEFIV.Text = pk4.IV_DEF.ToString();
|
||||
TB_SPEIV.Text = pk4.IV_SPE.ToString();
|
||||
TB_SPAIV.Text = pk4.IV_SPA.ToString();
|
||||
TB_SPDIV.Text = pk4.IV_SPD.ToString();
|
||||
CB_HPType.SelectedValue = pk4.HPType;
|
||||
|
||||
TB_HPEV.Text = pk4.EV_HP.ToString();
|
||||
TB_ATKEV.Text = pk4.EV_ATK.ToString();
|
||||
TB_DEFEV.Text = pk4.EV_DEF.ToString();
|
||||
TB_SPEEV.Text = pk4.EV_SPE.ToString();
|
||||
TB_SPAEV.Text = pk4.EV_SPA.ToString();
|
||||
TB_SPDEV.Text = pk4.EV_SPD.ToString();
|
||||
|
||||
CB_Move1.SelectedValue = pk4.Move1;
|
||||
CB_Move2.SelectedValue = pk4.Move2;
|
||||
CB_Move3.SelectedValue = pk4.Move3;
|
||||
CB_Move4.SelectedValue = pk4.Move4;
|
||||
CB_PPu1.SelectedIndex = pk4.Move1_PPUps;
|
||||
CB_PPu2.SelectedIndex = pk4.Move2_PPUps;
|
||||
CB_PPu3.SelectedIndex = pk4.Move3_PPUps;
|
||||
CB_PPu4.SelectedIndex = pk4.Move4_PPUps;
|
||||
TB_PP1.Text = pk4.Move1_PP.ToString();
|
||||
TB_PP2.Text = pk4.Move2_PP.ToString();
|
||||
TB_PP3.Text = pk4.Move3_PP.ToString();
|
||||
TB_PP4.Text = pk4.Move4_PP.ToString();
|
||||
|
||||
// Set Form if count is enough, else cap.
|
||||
CB_Form.SelectedIndex = CB_Form.Items.Count > pk4.AltForm ? pk4.AltForm : CB_Form.Items.Count - 1;
|
||||
|
||||
// Load Extrabyte Value
|
||||
TB_ExtraByte.Text = pk4.Data[Convert.ToInt32(CB_ExtraBytes.Text, 16)].ToString();
|
||||
|
||||
updateStats();
|
||||
|
||||
TB_EXP.Text = pk4.EXP.ToString();
|
||||
Label_Gender.Text = gendersymbols[pk4.Gender];
|
||||
Label_Gender.ForeColor = getGenderColor(pk4.Gender);
|
||||
|
||||
if (HaX)
|
||||
DEV_Ability.SelectedValue = pk4.Ability;
|
||||
else
|
||||
{
|
||||
int[] abils = pk4.PersonalInfo.Abilities;
|
||||
int abil = Array.IndexOf(abils, pk4.Ability);
|
||||
|
||||
if (abil < 0)
|
||||
CB_Ability.SelectedIndex = 0;
|
||||
else if (abils[0] == abils[1] || abils[1] == 0)
|
||||
CB_Ability.SelectedIndex = pk4.PIDAbility;
|
||||
else
|
||||
CB_Ability.SelectedIndex = abil >= CB_Ability.Items.Count ? 0 : abil;
|
||||
}
|
||||
}
|
||||
private PKM preparePK4()
|
||||
{
|
||||
var pk4 = pkm;
|
||||
if (pk4?.Format != 4)
|
||||
return null;
|
||||
|
||||
pk4.Species = WinFormsUtil.getIndex(CB_Species);
|
||||
pk4.HeldItem = WinFormsUtil.getIndex(CB_HeldItem);
|
||||
pk4.TID = Util.ToInt32(TB_TID.Text);
|
||||
pk4.SID = Util.ToInt32(TB_SID.Text);
|
||||
pk4.EXP = Util.ToUInt32(TB_EXP.Text);
|
||||
pk4.PID = Util.getHEXval(TB_PID.Text);
|
||||
|
||||
if (CB_Ability.Text.Length >= 4)
|
||||
{
|
||||
pk4.Ability = (byte)Array.IndexOf(GameInfo.Strings.abilitylist, CB_Ability.Text.Remove(CB_Ability.Text.Length - 4));
|
||||
}
|
||||
|
||||
pk4.FatefulEncounter = CHK_Fateful.Checked;
|
||||
pk4.Gender = PKX.getGender(Label_Gender.Text);
|
||||
pk4.AltForm = (MT_Form.Enabled ? Convert.ToInt32(MT_Form.Text) : CB_Form.Enabled ? CB_Form.SelectedIndex : 0) & 0x1F;
|
||||
pk4.EV_HP = Util.ToInt32(TB_HPEV.Text);
|
||||
pk4.EV_ATK = Util.ToInt32(TB_ATKEV.Text);
|
||||
pk4.EV_DEF = Util.ToInt32(TB_DEFEV.Text);
|
||||
pk4.EV_SPE = Util.ToInt32(TB_SPEEV.Text);
|
||||
pk4.EV_SPA = Util.ToInt32(TB_SPAEV.Text);
|
||||
pk4.EV_SPD = Util.ToInt32(TB_SPDEV.Text);
|
||||
|
||||
pk4.CNT_Cool = Util.ToInt32(TB_Cool.Text);
|
||||
pk4.CNT_Beauty = Util.ToInt32(TB_Beauty.Text);
|
||||
pk4.CNT_Cute = Util.ToInt32(TB_Cute.Text);
|
||||
pk4.CNT_Smart = Util.ToInt32(TB_Smart.Text);
|
||||
pk4.CNT_Tough = Util.ToInt32(TB_Tough.Text);
|
||||
pk4.CNT_Sheen = Util.ToInt32(TB_Sheen.Text);
|
||||
|
||||
pk4.PKRS_Days = CB_PKRSDays.SelectedIndex;
|
||||
pk4.PKRS_Strain = CB_PKRSStrain.SelectedIndex;
|
||||
pk4.Nickname = TB_Nickname.Text;
|
||||
pk4.Move1 = WinFormsUtil.getIndex(CB_Move1);
|
||||
pk4.Move2 = WinFormsUtil.getIndex(CB_Move2);
|
||||
pk4.Move3 = WinFormsUtil.getIndex(CB_Move3);
|
||||
pk4.Move4 = WinFormsUtil.getIndex(CB_Move4);
|
||||
pk4.Move1_PP = WinFormsUtil.getIndex(CB_Move1) > 0 ? Util.ToInt32(TB_PP1.Text) : 0;
|
||||
pk4.Move2_PP = WinFormsUtil.getIndex(CB_Move2) > 0 ? Util.ToInt32(TB_PP2.Text) : 0;
|
||||
pk4.Move3_PP = WinFormsUtil.getIndex(CB_Move3) > 0 ? Util.ToInt32(TB_PP3.Text) : 0;
|
||||
pk4.Move4_PP = WinFormsUtil.getIndex(CB_Move4) > 0 ? Util.ToInt32(TB_PP4.Text) : 0;
|
||||
pk4.Move1_PPUps = WinFormsUtil.getIndex(CB_Move1) > 0 ? CB_PPu1.SelectedIndex : 0;
|
||||
pk4.Move2_PPUps = WinFormsUtil.getIndex(CB_Move2) > 0 ? CB_PPu2.SelectedIndex : 0;
|
||||
pk4.Move3_PPUps = WinFormsUtil.getIndex(CB_Move3) > 0 ? CB_PPu3.SelectedIndex : 0;
|
||||
pk4.Move4_PPUps = WinFormsUtil.getIndex(CB_Move4) > 0 ? CB_PPu4.SelectedIndex : 0;
|
||||
|
||||
pk4.IV_HP = Util.ToInt32(TB_HPIV.Text);
|
||||
pk4.IV_ATK = Util.ToInt32(TB_ATKIV.Text);
|
||||
pk4.IV_DEF = Util.ToInt32(TB_DEFIV.Text);
|
||||
pk4.IV_SPE = Util.ToInt32(TB_SPEIV.Text);
|
||||
pk4.IV_SPA = Util.ToInt32(TB_SPAIV.Text);
|
||||
pk4.IV_SPD = Util.ToInt32(TB_SPDIV.Text);
|
||||
pk4.IsEgg = CHK_IsEgg.Checked;
|
||||
pk4.IsNicknamed = CHK_Nicknamed.Checked;
|
||||
|
||||
pk4.OT_Name = TB_OT.Text;
|
||||
pk4.CurrentFriendship = Util.ToInt32(TB_Friendship.Text);
|
||||
|
||||
pk4.Ball = WinFormsUtil.getIndex(CB_Ball);
|
||||
pk4.Met_Level = Util.ToInt32(TB_MetLevel.Text);
|
||||
pk4.OT_Gender = PKX.getGender(Label_OTGender.Text);
|
||||
pk4.EncounterType = WinFormsUtil.getIndex(CB_EncounterType);
|
||||
pk4.Version = WinFormsUtil.getIndex(CB_GameOrigin);
|
||||
pk4.Language = WinFormsUtil.getIndex(CB_Language);
|
||||
|
||||
// Default Dates
|
||||
DateTime? egg_date = null;
|
||||
int egg_location = 0;
|
||||
if (CHK_AsEgg.Checked) // If encountered as an egg, load the Egg Met data from fields.
|
||||
{
|
||||
egg_date = CAL_EggDate.Value;
|
||||
egg_location = WinFormsUtil.getIndex(CB_EggLocation);
|
||||
}
|
||||
// Egg Met Data
|
||||
pk4.EggMetDate = egg_date;
|
||||
pk4.Egg_Location = egg_location;
|
||||
// Met Data
|
||||
pk4.MetDate = CAL_MetDate.Value;
|
||||
pk4.Met_Location = WinFormsUtil.getIndex(CB_MetLocation);
|
||||
|
||||
if (pk4.IsEgg && pk4.Met_Location == 0) // If still an egg, it has no hatch location/date. Zero it!
|
||||
pk4.MetDate = null;
|
||||
|
||||
// Toss in Party Stats
|
||||
Array.Resize(ref pk4.Data, pk4.SIZE_PARTY);
|
||||
pk4.Stat_Level = Util.ToInt32(TB_Level.Text);
|
||||
pk4.Stat_HPCurrent = Util.ToInt32(Stat_HP.Text);
|
||||
pk4.Stat_HPMax = Util.ToInt32(Stat_HP.Text);
|
||||
pk4.Stat_ATK = Util.ToInt32(Stat_ATK.Text);
|
||||
pk4.Stat_DEF = Util.ToInt32(Stat_DEF.Text);
|
||||
pk4.Stat_SPE = Util.ToInt32(Stat_SPE.Text);
|
||||
pk4.Stat_SPA = Util.ToInt32(Stat_SPA.Text);
|
||||
pk4.Stat_SPD = Util.ToInt32(Stat_SPD.Text);
|
||||
|
||||
if (HaX)
|
||||
{
|
||||
pk4.Ability = (byte)WinFormsUtil.getIndex(DEV_Ability);
|
||||
pk4.Stat_Level = (byte)Math.Min(Convert.ToInt32(MT_Level.Text), byte.MaxValue);
|
||||
}
|
||||
|
||||
// Fix Moves if a slot is empty
|
||||
pk4.FixMoves();
|
||||
|
||||
pk4.RefreshChecksum();
|
||||
return pk4;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
using System;
|
||||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.WinForms
|
||||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
public partial class Main
|
||||
public partial class PKMEditor
|
||||
{
|
||||
private void populateFieldsPK5()
|
||||
{
|
||||
|
@ -129,7 +129,7 @@ namespace PKHeX.WinForms
|
|||
CB_Ability.SelectedIndex = CB_Ability.Items.Count - 1;
|
||||
else
|
||||
{
|
||||
int[] abils = SAV.Personal.getAbilities(pk5.Species, pk5.AltForm);
|
||||
int[] abils = pkm.PersonalInfo.Abilities;
|
||||
int abil = Array.IndexOf(abils, pk5.Ability);
|
||||
|
||||
if (abil < 0)
|
|
@ -1,9 +1,9 @@
|
|||
using System;
|
||||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.WinForms
|
||||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
public partial class Main
|
||||
public partial class PKMEditor
|
||||
{
|
||||
private void populateFieldsPK6()
|
||||
{
|
||||
|
@ -322,7 +322,7 @@ namespace PKHeX.WinForms
|
|||
pk6.FixRelearn();
|
||||
|
||||
// Fix Handler (Memories & OT) -- no foreign memories for Pokemon without a foreign trainer (none for eggs)
|
||||
if (Menu_ModifyPKM.Checked)
|
||||
if (ModifyPKM)
|
||||
pk6.FixMemories();
|
||||
|
||||
// PKX is now filled
|
|
@ -1,9 +1,9 @@
|
|||
using System;
|
||||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.WinForms
|
||||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
public partial class Main
|
||||
public partial class PKMEditor
|
||||
{
|
||||
private void populateFieldsPK7()
|
||||
{
|
||||
|
@ -322,7 +322,7 @@ namespace PKHeX.WinForms
|
|||
pk7.FixRelearn();
|
||||
|
||||
// Fix Handler (Memories & OT) -- no foreign memories for Pokemon without a foreign trainer (none for eggs)
|
||||
if (Menu_ModifyPKM.Checked)
|
||||
if (ModifyPKM)
|
||||
pk7.FixMemories();
|
||||
|
||||
// PKX is now filled
|
|
@ -1,9 +1,9 @@
|
|||
using System;
|
||||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.WinForms
|
||||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
public partial class Main
|
||||
public partial class PKMEditor
|
||||
{
|
||||
private void populateFieldsXK3()
|
||||
{
|
3880
PKHeX.WinForms/Controls/PKM Editor/PKMEditor.Designer.cs
generated
Normal file
3880
PKHeX.WinForms/Controls/PKM Editor/PKMEditor.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
1976
PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs
Normal file
1976
PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs
Normal file
File diff suppressed because it is too large
Load diff
1097
PKHeX.WinForms/Controls/PKM Editor/PKMEditor.resx
Normal file
1097
PKHeX.WinForms/Controls/PKM Editor/PKMEditor.resx
Normal file
File diff suppressed because it is too large
Load diff
584
PKHeX.WinForms/Controls/SAV Editor/BoxEditor.Designer.cs
generated
Normal file
584
PKHeX.WinForms/Controls/SAV Editor/BoxEditor.Designer.cs
generated
Normal file
|
@ -0,0 +1,584 @@
|
|||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
partial class BoxEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BoxEditor));
|
||||
this.PAN_Box = new System.Windows.Forms.Panel();
|
||||
this.bpkx30 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx29 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx28 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx27 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx26 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx25 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx24 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx23 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx22 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx21 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx20 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx19 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx18 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx17 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx16 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx15 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx14 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx13 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx12 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx11 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx10 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx9 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx8 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx7 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx6 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx5 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx4 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx3 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx2 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx1 = new System.Windows.Forms.PictureBox();
|
||||
this.B_BoxRight = new System.Windows.Forms.Button();
|
||||
this.B_BoxLeft = new System.Windows.Forms.Button();
|
||||
this.CB_BoxSelect = new System.Windows.Forms.ComboBox();
|
||||
this.PAN_Box.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx30)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx29)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx28)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx27)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx26)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx25)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx24)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx23)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx22)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx21)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx20)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx19)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx18)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx17)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx16)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx15)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx14)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx13)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx12)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx11)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx10)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PAN_Box
|
||||
//
|
||||
this.PAN_Box.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("PAN_Box.BackgroundImage")));
|
||||
this.PAN_Box.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.PAN_Box.Controls.Add(this.bpkx30);
|
||||
this.PAN_Box.Controls.Add(this.bpkx29);
|
||||
this.PAN_Box.Controls.Add(this.bpkx28);
|
||||
this.PAN_Box.Controls.Add(this.bpkx27);
|
||||
this.PAN_Box.Controls.Add(this.bpkx26);
|
||||
this.PAN_Box.Controls.Add(this.bpkx25);
|
||||
this.PAN_Box.Controls.Add(this.bpkx24);
|
||||
this.PAN_Box.Controls.Add(this.bpkx23);
|
||||
this.PAN_Box.Controls.Add(this.bpkx22);
|
||||
this.PAN_Box.Controls.Add(this.bpkx21);
|
||||
this.PAN_Box.Controls.Add(this.bpkx20);
|
||||
this.PAN_Box.Controls.Add(this.bpkx19);
|
||||
this.PAN_Box.Controls.Add(this.bpkx18);
|
||||
this.PAN_Box.Controls.Add(this.bpkx17);
|
||||
this.PAN_Box.Controls.Add(this.bpkx16);
|
||||
this.PAN_Box.Controls.Add(this.bpkx15);
|
||||
this.PAN_Box.Controls.Add(this.bpkx14);
|
||||
this.PAN_Box.Controls.Add(this.bpkx13);
|
||||
this.PAN_Box.Controls.Add(this.bpkx12);
|
||||
this.PAN_Box.Controls.Add(this.bpkx11);
|
||||
this.PAN_Box.Controls.Add(this.bpkx10);
|
||||
this.PAN_Box.Controls.Add(this.bpkx9);
|
||||
this.PAN_Box.Controls.Add(this.bpkx8);
|
||||
this.PAN_Box.Controls.Add(this.bpkx7);
|
||||
this.PAN_Box.Controls.Add(this.bpkx6);
|
||||
this.PAN_Box.Controls.Add(this.bpkx5);
|
||||
this.PAN_Box.Controls.Add(this.bpkx4);
|
||||
this.PAN_Box.Controls.Add(this.bpkx3);
|
||||
this.PAN_Box.Controls.Add(this.bpkx2);
|
||||
this.PAN_Box.Controls.Add(this.bpkx1);
|
||||
this.PAN_Box.Location = new System.Drawing.Point(0, 25);
|
||||
this.PAN_Box.Name = "PAN_Box";
|
||||
this.PAN_Box.Size = new System.Drawing.Size(251, 160);
|
||||
this.PAN_Box.TabIndex = 66;
|
||||
//
|
||||
// bpkx30
|
||||
//
|
||||
this.bpkx30.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx30.Location = new System.Drawing.Point(207, 126);
|
||||
this.bpkx30.Name = "bpkx30";
|
||||
this.bpkx30.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx30.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx30.TabIndex = 59;
|
||||
this.bpkx30.TabStop = false;
|
||||
//
|
||||
// bpkx29
|
||||
//
|
||||
this.bpkx29.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx29.Location = new System.Drawing.Point(166, 126);
|
||||
this.bpkx29.Name = "bpkx29";
|
||||
this.bpkx29.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx29.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx29.TabIndex = 58;
|
||||
this.bpkx29.TabStop = false;
|
||||
//
|
||||
// bpkx28
|
||||
//
|
||||
this.bpkx28.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx28.Location = new System.Drawing.Point(125, 126);
|
||||
this.bpkx28.Name = "bpkx28";
|
||||
this.bpkx28.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx28.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx28.TabIndex = 57;
|
||||
this.bpkx28.TabStop = false;
|
||||
//
|
||||
// bpkx27
|
||||
//
|
||||
this.bpkx27.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx27.Location = new System.Drawing.Point(84, 126);
|
||||
this.bpkx27.Name = "bpkx27";
|
||||
this.bpkx27.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx27.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx27.TabIndex = 56;
|
||||
this.bpkx27.TabStop = false;
|
||||
//
|
||||
// bpkx26
|
||||
//
|
||||
this.bpkx26.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx26.Location = new System.Drawing.Point(43, 126);
|
||||
this.bpkx26.Name = "bpkx26";
|
||||
this.bpkx26.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx26.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx26.TabIndex = 55;
|
||||
this.bpkx26.TabStop = false;
|
||||
//
|
||||
// bpkx25
|
||||
//
|
||||
this.bpkx25.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx25.Location = new System.Drawing.Point(2, 126);
|
||||
this.bpkx25.Name = "bpkx25";
|
||||
this.bpkx25.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx25.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx25.TabIndex = 54;
|
||||
this.bpkx25.TabStop = false;
|
||||
//
|
||||
// bpkx24
|
||||
//
|
||||
this.bpkx24.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx24.Location = new System.Drawing.Point(207, 95);
|
||||
this.bpkx24.Name = "bpkx24";
|
||||
this.bpkx24.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx24.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx24.TabIndex = 53;
|
||||
this.bpkx24.TabStop = false;
|
||||
//
|
||||
// bpkx23
|
||||
//
|
||||
this.bpkx23.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx23.Location = new System.Drawing.Point(166, 95);
|
||||
this.bpkx23.Name = "bpkx23";
|
||||
this.bpkx23.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx23.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx23.TabIndex = 52;
|
||||
this.bpkx23.TabStop = false;
|
||||
//
|
||||
// bpkx22
|
||||
//
|
||||
this.bpkx22.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx22.Location = new System.Drawing.Point(125, 95);
|
||||
this.bpkx22.Name = "bpkx22";
|
||||
this.bpkx22.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx22.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx22.TabIndex = 51;
|
||||
this.bpkx22.TabStop = false;
|
||||
//
|
||||
// bpkx21
|
||||
//
|
||||
this.bpkx21.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx21.Location = new System.Drawing.Point(84, 95);
|
||||
this.bpkx21.Name = "bpkx21";
|
||||
this.bpkx21.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx21.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx21.TabIndex = 50;
|
||||
this.bpkx21.TabStop = false;
|
||||
//
|
||||
// bpkx20
|
||||
//
|
||||
this.bpkx20.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx20.Location = new System.Drawing.Point(43, 95);
|
||||
this.bpkx20.Name = "bpkx20";
|
||||
this.bpkx20.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx20.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx20.TabIndex = 49;
|
||||
this.bpkx20.TabStop = false;
|
||||
//
|
||||
// bpkx19
|
||||
//
|
||||
this.bpkx19.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx19.Location = new System.Drawing.Point(2, 95);
|
||||
this.bpkx19.Name = "bpkx19";
|
||||
this.bpkx19.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx19.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx19.TabIndex = 48;
|
||||
this.bpkx19.TabStop = false;
|
||||
//
|
||||
// bpkx18
|
||||
//
|
||||
this.bpkx18.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx18.Location = new System.Drawing.Point(207, 64);
|
||||
this.bpkx18.Name = "bpkx18";
|
||||
this.bpkx18.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx18.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx18.TabIndex = 47;
|
||||
this.bpkx18.TabStop = false;
|
||||
//
|
||||
// bpkx17
|
||||
//
|
||||
this.bpkx17.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx17.Location = new System.Drawing.Point(166, 64);
|
||||
this.bpkx17.Name = "bpkx17";
|
||||
this.bpkx17.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx17.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx17.TabIndex = 46;
|
||||
this.bpkx17.TabStop = false;
|
||||
//
|
||||
// bpkx16
|
||||
//
|
||||
this.bpkx16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx16.Location = new System.Drawing.Point(125, 64);
|
||||
this.bpkx16.Name = "bpkx16";
|
||||
this.bpkx16.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx16.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx16.TabIndex = 45;
|
||||
this.bpkx16.TabStop = false;
|
||||
//
|
||||
// bpkx15
|
||||
//
|
||||
this.bpkx15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx15.Location = new System.Drawing.Point(84, 64);
|
||||
this.bpkx15.Name = "bpkx15";
|
||||
this.bpkx15.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx15.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx15.TabIndex = 44;
|
||||
this.bpkx15.TabStop = false;
|
||||
//
|
||||
// bpkx14
|
||||
//
|
||||
this.bpkx14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx14.Location = new System.Drawing.Point(43, 64);
|
||||
this.bpkx14.Name = "bpkx14";
|
||||
this.bpkx14.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx14.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx14.TabIndex = 43;
|
||||
this.bpkx14.TabStop = false;
|
||||
//
|
||||
// bpkx13
|
||||
//
|
||||
this.bpkx13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx13.Location = new System.Drawing.Point(2, 64);
|
||||
this.bpkx13.Name = "bpkx13";
|
||||
this.bpkx13.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx13.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx13.TabIndex = 42;
|
||||
this.bpkx13.TabStop = false;
|
||||
//
|
||||
// bpkx12
|
||||
//
|
||||
this.bpkx12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx12.Location = new System.Drawing.Point(207, 33);
|
||||
this.bpkx12.Name = "bpkx12";
|
||||
this.bpkx12.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx12.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx12.TabIndex = 41;
|
||||
this.bpkx12.TabStop = false;
|
||||
//
|
||||
// bpkx11
|
||||
//
|
||||
this.bpkx11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx11.Location = new System.Drawing.Point(166, 33);
|
||||
this.bpkx11.Name = "bpkx11";
|
||||
this.bpkx11.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx11.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx11.TabIndex = 40;
|
||||
this.bpkx11.TabStop = false;
|
||||
//
|
||||
// bpkx10
|
||||
//
|
||||
this.bpkx10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx10.Location = new System.Drawing.Point(125, 33);
|
||||
this.bpkx10.Name = "bpkx10";
|
||||
this.bpkx10.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx10.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx10.TabIndex = 39;
|
||||
this.bpkx10.TabStop = false;
|
||||
//
|
||||
// bpkx9
|
||||
//
|
||||
this.bpkx9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx9.Location = new System.Drawing.Point(84, 33);
|
||||
this.bpkx9.Name = "bpkx9";
|
||||
this.bpkx9.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx9.TabIndex = 38;
|
||||
this.bpkx9.TabStop = false;
|
||||
//
|
||||
// bpkx8
|
||||
//
|
||||
this.bpkx8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx8.Location = new System.Drawing.Point(43, 33);
|
||||
this.bpkx8.Name = "bpkx8";
|
||||
this.bpkx8.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx8.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx8.TabIndex = 37;
|
||||
this.bpkx8.TabStop = false;
|
||||
//
|
||||
// bpkx7
|
||||
//
|
||||
this.bpkx7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx7.Location = new System.Drawing.Point(2, 33);
|
||||
this.bpkx7.Name = "bpkx7";
|
||||
this.bpkx7.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx7.TabIndex = 36;
|
||||
this.bpkx7.TabStop = false;
|
||||
//
|
||||
// bpkx6
|
||||
//
|
||||
this.bpkx6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx6.Location = new System.Drawing.Point(207, 2);
|
||||
this.bpkx6.Name = "bpkx6";
|
||||
this.bpkx6.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx6.TabIndex = 35;
|
||||
this.bpkx6.TabStop = false;
|
||||
//
|
||||
// bpkx5
|
||||
//
|
||||
this.bpkx5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx5.Location = new System.Drawing.Point(166, 2);
|
||||
this.bpkx5.Name = "bpkx5";
|
||||
this.bpkx5.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx5.TabIndex = 34;
|
||||
this.bpkx5.TabStop = false;
|
||||
//
|
||||
// bpkx4
|
||||
//
|
||||
this.bpkx4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx4.Location = new System.Drawing.Point(125, 2);
|
||||
this.bpkx4.Name = "bpkx4";
|
||||
this.bpkx4.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx4.TabIndex = 33;
|
||||
this.bpkx4.TabStop = false;
|
||||
//
|
||||
// bpkx3
|
||||
//
|
||||
this.bpkx3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx3.Location = new System.Drawing.Point(84, 2);
|
||||
this.bpkx3.Name = "bpkx3";
|
||||
this.bpkx3.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx3.TabIndex = 32;
|
||||
this.bpkx3.TabStop = false;
|
||||
//
|
||||
// bpkx2
|
||||
//
|
||||
this.bpkx2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx2.Location = new System.Drawing.Point(43, 2);
|
||||
this.bpkx2.Name = "bpkx2";
|
||||
this.bpkx2.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx2.TabIndex = 31;
|
||||
this.bpkx2.TabStop = false;
|
||||
//
|
||||
// bpkx1
|
||||
//
|
||||
this.bpkx1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx1.Location = new System.Drawing.Point(2, 2);
|
||||
this.bpkx1.Name = "bpkx1";
|
||||
this.bpkx1.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx1.TabIndex = 30;
|
||||
this.bpkx1.TabStop = false;
|
||||
//
|
||||
// B_BoxRight
|
||||
//
|
||||
this.B_BoxRight.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.B_BoxRight.Location = new System.Drawing.Point(193, -1);
|
||||
this.B_BoxRight.Name = "B_BoxRight";
|
||||
this.B_BoxRight.Size = new System.Drawing.Size(27, 23);
|
||||
this.B_BoxRight.TabIndex = 65;
|
||||
this.B_BoxRight.Text = ">>";
|
||||
this.B_BoxRight.UseVisualStyleBackColor = true;
|
||||
this.B_BoxRight.Click += new System.EventHandler(this.clickBoxRight);
|
||||
//
|
||||
// B_BoxLeft
|
||||
//
|
||||
this.B_BoxLeft.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.B_BoxLeft.Location = new System.Drawing.Point(31, -1);
|
||||
this.B_BoxLeft.Name = "B_BoxLeft";
|
||||
this.B_BoxLeft.Size = new System.Drawing.Size(27, 23);
|
||||
this.B_BoxLeft.TabIndex = 64;
|
||||
this.B_BoxLeft.Text = "<<";
|
||||
this.B_BoxLeft.UseVisualStyleBackColor = true;
|
||||
this.B_BoxLeft.Click += new System.EventHandler(this.clickBoxLeft);
|
||||
//
|
||||
// CB_BoxSelect
|
||||
//
|
||||
this.CB_BoxSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CB_BoxSelect.FormattingEnabled = true;
|
||||
this.CB_BoxSelect.Items.AddRange(new object[] {
|
||||
"Box 1",
|
||||
"Box 2",
|
||||
"Box 3",
|
||||
"Box 4",
|
||||
"Box 5",
|
||||
"Box 6",
|
||||
"Box 7",
|
||||
"Box 8",
|
||||
"Box 9",
|
||||
"Box 10",
|
||||
"Box 11",
|
||||
"Box 12",
|
||||
"Box 13",
|
||||
"Box 14",
|
||||
"Box 15",
|
||||
"Box 16",
|
||||
"Box 17",
|
||||
"Box 18",
|
||||
"Box 19",
|
||||
"Box 20",
|
||||
"Box 21",
|
||||
"Box 22",
|
||||
"Box 23",
|
||||
"Box 24",
|
||||
"Box 25",
|
||||
"Box 26",
|
||||
"Box 27",
|
||||
"Box 28",
|
||||
"Box 29",
|
||||
"Box 30",
|
||||
"Box 31"});
|
||||
this.CB_BoxSelect.Location = new System.Drawing.Point(62, 0);
|
||||
this.CB_BoxSelect.Name = "CB_BoxSelect";
|
||||
this.CB_BoxSelect.Size = new System.Drawing.Size(127, 21);
|
||||
this.CB_BoxSelect.TabIndex = 63;
|
||||
this.CB_BoxSelect.SelectedIndexChanged += new System.EventHandler(this.getBox);
|
||||
//
|
||||
// BoxEditor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.PAN_Box);
|
||||
this.Controls.Add(this.B_BoxRight);
|
||||
this.Controls.Add(this.B_BoxLeft);
|
||||
this.Controls.Add(this.CB_BoxSelect);
|
||||
this.Name = "BoxEditor";
|
||||
this.Size = new System.Drawing.Size(251, 185);
|
||||
this.PAN_Box.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx30)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx29)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx28)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx27)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx26)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx25)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx24)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx23)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx22)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx21)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx20)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx19)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx18)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx17)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx16)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx15)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx14)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx13)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx12)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx11)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx10)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel PAN_Box;
|
||||
private System.Windows.Forms.PictureBox bpkx30;
|
||||
private System.Windows.Forms.PictureBox bpkx29;
|
||||
private System.Windows.Forms.PictureBox bpkx28;
|
||||
private System.Windows.Forms.PictureBox bpkx27;
|
||||
private System.Windows.Forms.PictureBox bpkx26;
|
||||
private System.Windows.Forms.PictureBox bpkx25;
|
||||
private System.Windows.Forms.PictureBox bpkx24;
|
||||
private System.Windows.Forms.PictureBox bpkx23;
|
||||
private System.Windows.Forms.PictureBox bpkx22;
|
||||
private System.Windows.Forms.PictureBox bpkx21;
|
||||
private System.Windows.Forms.PictureBox bpkx20;
|
||||
private System.Windows.Forms.PictureBox bpkx19;
|
||||
private System.Windows.Forms.PictureBox bpkx18;
|
||||
private System.Windows.Forms.PictureBox bpkx17;
|
||||
private System.Windows.Forms.PictureBox bpkx16;
|
||||
private System.Windows.Forms.PictureBox bpkx15;
|
||||
private System.Windows.Forms.PictureBox bpkx14;
|
||||
private System.Windows.Forms.PictureBox bpkx13;
|
||||
private System.Windows.Forms.PictureBox bpkx12;
|
||||
private System.Windows.Forms.PictureBox bpkx11;
|
||||
private System.Windows.Forms.PictureBox bpkx10;
|
||||
private System.Windows.Forms.PictureBox bpkx9;
|
||||
private System.Windows.Forms.PictureBox bpkx8;
|
||||
private System.Windows.Forms.PictureBox bpkx7;
|
||||
private System.Windows.Forms.PictureBox bpkx6;
|
||||
private System.Windows.Forms.PictureBox bpkx5;
|
||||
private System.Windows.Forms.PictureBox bpkx4;
|
||||
private System.Windows.Forms.PictureBox bpkx3;
|
||||
private System.Windows.Forms.PictureBox bpkx2;
|
||||
private System.Windows.Forms.PictureBox bpkx1;
|
||||
private System.Windows.Forms.Button B_BoxRight;
|
||||
private System.Windows.Forms.Button B_BoxLeft;
|
||||
private System.Windows.Forms.ComboBox CB_BoxSelect;
|
||||
}
|
||||
}
|
234
PKHeX.WinForms/Controls/SAV Editor/BoxEditor.cs
Normal file
234
PKHeX.WinForms/Controls/SAV Editor/BoxEditor.cs
Normal file
|
@ -0,0 +1,234 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Media;
|
||||
using System.Windows.Forms;
|
||||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
public partial class BoxEditor : UserControl
|
||||
{
|
||||
public readonly List<PictureBox> SlotPictureBoxes;
|
||||
public readonly int BoxSlotCount;
|
||||
public SlotChangeManager M;
|
||||
private SaveFile SAV => M?.SE.SAV;
|
||||
public bool FlagIllegal;
|
||||
|
||||
public BoxEditor()
|
||||
{
|
||||
InitializeComponent();
|
||||
SlotPictureBoxes = new List<PictureBox>();
|
||||
SlotPictureBoxes.AddRange(new[]
|
||||
{
|
||||
bpkx1, bpkx2, bpkx3, bpkx4, bpkx5, bpkx6,
|
||||
bpkx7, bpkx8, bpkx9, bpkx10,bpkx11,bpkx12,
|
||||
bpkx13,bpkx14,bpkx15,bpkx16,bpkx17,bpkx18,
|
||||
bpkx19,bpkx20,bpkx21,bpkx22,bpkx23,bpkx24,
|
||||
bpkx25,bpkx26,bpkx27,bpkx28,bpkx29,bpkx30,
|
||||
});
|
||||
BoxSlotCount = SlotPictureBoxes.Count;
|
||||
foreach (var pb in SlotPictureBoxes)
|
||||
{
|
||||
pb.MouseEnter += pbBoxSlot_MouseEnter;
|
||||
pb.MouseLeave += pbBoxSlot_MouseLeave;
|
||||
pb.MouseClick += pbBoxSlot_MouseClick;
|
||||
pb.MouseMove += pbBoxSlot_MouseMove;
|
||||
pb.MouseDown += pbBoxSlot_MouseDown;
|
||||
pb.MouseUp += pbBoxSlot_MouseUp;
|
||||
|
||||
pb.DragEnter += pbBoxSlot_DragEnter;
|
||||
pb.DragDrop += pbBoxSlot_DragDrop;
|
||||
pb.QueryContinueDrag += pbBoxSlot_QueryContinueDrag;
|
||||
pb.GiveFeedback += (sender, e) => { e.UseDefaultCursors = false; };
|
||||
pb.AllowDrop = true;
|
||||
}
|
||||
}
|
||||
|
||||
public int CurrentBox
|
||||
{
|
||||
get => CB_BoxSelect.SelectedIndex;
|
||||
set => CB_BoxSelect.SelectedIndex = value;
|
||||
}
|
||||
public string CurrentBoxName => CB_BoxSelect.Text;
|
||||
public int getOffset(int slot, int box)
|
||||
{
|
||||
if (box < 0)
|
||||
box = CurrentBox;
|
||||
return SAV.getBoxOffset(box) + slot * SAV.SIZE_STORED;
|
||||
}
|
||||
public void Setup(SlotChangeManager m)
|
||||
{
|
||||
M = m;
|
||||
M.Boxes.Add(this);
|
||||
FlagIllegal = M.SE.FlagIllegal;
|
||||
Reset();
|
||||
}
|
||||
public void setSlotFiller(PKM p, int box = -1, int slot = -1, PictureBox pb = null)
|
||||
{
|
||||
if (pb == null)
|
||||
pb = SlotPictureBoxes[slot];
|
||||
if (!p.Valid) // Invalid
|
||||
{
|
||||
// Bad Egg present in slot.
|
||||
pb.Image = null;
|
||||
pb.BackColor = Color.Red;
|
||||
pb.Visible = true;
|
||||
return;
|
||||
}
|
||||
|
||||
pb.Image = p.Sprite(SAV, box, slot, FlagIllegal);
|
||||
pb.BackColor = Color.Transparent;
|
||||
pb.Visible = true;
|
||||
|
||||
if (M != null && M.colorizedbox == box && M.colorizedslot == slot)
|
||||
pb.BackgroundImage = M.colorizedcolor;
|
||||
}
|
||||
|
||||
public void ResetBoxNames()
|
||||
{
|
||||
if (!SAV.HasBox)
|
||||
return;
|
||||
// Build ComboBox Dropdown Items
|
||||
try
|
||||
{
|
||||
CB_BoxSelect.Items.Clear();
|
||||
for (int i = 0; i < SAV.BoxCount; i++)
|
||||
CB_BoxSelect.Items.Add(SAV.getBoxName(i));
|
||||
}
|
||||
catch
|
||||
{
|
||||
CB_BoxSelect.Items.Clear();
|
||||
for (int i = 1; i <= SAV.BoxCount; i++)
|
||||
CB_BoxSelect.Items.Add($"BOX {i}");
|
||||
}
|
||||
if (SAV.CurrentBox < CB_BoxSelect.Items.Count)
|
||||
CurrentBox = SAV.CurrentBox; // restore selected box
|
||||
}
|
||||
public void ResetSlots()
|
||||
{
|
||||
int box = CurrentBox;
|
||||
int boxoffset = SAV.getBoxOffset(box);
|
||||
int boxbgval = SAV.getBoxWallpaper(box);
|
||||
PAN_Box.BackgroundImage = SAV.WallpaperImage(boxbgval);
|
||||
|
||||
int slot = M?.colorizedbox == box ? M.colorizedslot : -1;
|
||||
|
||||
for (int i = 0; i < BoxSlotCount; i++)
|
||||
{
|
||||
var pb = SlotPictureBoxes[i];
|
||||
if (i < SAV.BoxSlotCount)
|
||||
getSlotFiller(boxoffset + SAV.SIZE_STORED * i, pb, box, i);
|
||||
else
|
||||
pb.Visible = false;
|
||||
pb.BackgroundImage = slot == i ? M?.colorizedcolor : null;
|
||||
}
|
||||
}
|
||||
public bool SaveBoxBinary()
|
||||
{
|
||||
DialogResult dr = WinFormsUtil.Prompt(MessageBoxButtons.YesNoCancel,
|
||||
"Yes: Export All Boxes" + Environment.NewLine +
|
||||
$"No: Export {CurrentBoxName} (Box {CurrentBox + 1})" + Environment.NewLine +
|
||||
"Cancel: Abort");
|
||||
|
||||
if (dr == DialogResult.Yes)
|
||||
{
|
||||
SaveFileDialog sfd = new SaveFileDialog { Filter = "Box Data|*.bin", FileName = "pcdata.bin" };
|
||||
if (sfd.ShowDialog() != DialogResult.OK)
|
||||
return false;
|
||||
File.WriteAllBytes(sfd.FileName, SAV.getPCBin());
|
||||
return true;
|
||||
}
|
||||
if (dr == DialogResult.No)
|
||||
{
|
||||
SaveFileDialog sfd = new SaveFileDialog { Filter = "Box Data|*.bin", FileName = $"boxdata {CurrentBoxName}.bin" };
|
||||
if (sfd.ShowDialog() != DialogResult.OK)
|
||||
return false;
|
||||
File.WriteAllBytes(sfd.FileName, SAV.getBoxBin(CurrentBox));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getSlot(object sender) => SlotPictureBoxes.IndexOf(WinFormsUtil.GetUnderlyingControl(sender) as PictureBox);
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
ResetBoxNames();
|
||||
ResetSlots();
|
||||
}
|
||||
private void getBox(object sender, EventArgs e)
|
||||
{
|
||||
if (SAV.CurrentBox != CurrentBox)
|
||||
SAV.CurrentBox = CurrentBox;
|
||||
ResetSlots();
|
||||
}
|
||||
private void clickBoxRight(object sender, EventArgs e) => CurrentBox = (CurrentBox + 1) % SAV.BoxCount;
|
||||
private void clickBoxLeft(object sender, EventArgs e) => CurrentBox = (CurrentBox + SAV.BoxCount - 1) % SAV.BoxCount;
|
||||
private void getSlotFiller(int offset, PictureBox pb, int box = -1, int slot = -1)
|
||||
{
|
||||
if (SAV.getData(offset, SAV.SIZE_STORED).SequenceEqual(new byte[SAV.SIZE_STORED]))
|
||||
{
|
||||
// 00s present in slot.
|
||||
pb.Image = null;
|
||||
pb.BackColor = Color.Transparent;
|
||||
pb.Visible = true;
|
||||
return;
|
||||
}
|
||||
PKM p = SAV.getStoredSlot(offset);
|
||||
setSlotFiller(p, box, slot, pb);
|
||||
}
|
||||
|
||||
// Drag & Drop Handling
|
||||
private void pbBoxSlot_MouseEnter(object sender, EventArgs e) => M?.MouseEnter(sender, e);
|
||||
private void pbBoxSlot_MouseLeave(object sender, EventArgs e) => M?.MouseLeave(sender, e);
|
||||
private void pbBoxSlot_MouseClick(object sender, MouseEventArgs e) => M?.MouseClick(sender, e);
|
||||
private void pbBoxSlot_MouseUp(object sender, MouseEventArgs e) => M?.MouseUp(sender, e);
|
||||
private void pbBoxSlot_MouseDown(object sender, MouseEventArgs e) => M?.MouseDown(sender, e);
|
||||
private void pbBoxSlot_DragEnter(object sender, DragEventArgs e) => M?.DragEnter(sender, e);
|
||||
private void pbBoxSlot_QueryContinueDrag(object sender, QueryContinueDragEventArgs e) => M?.QueryContinueDrag(sender, e);
|
||||
private void pbBoxSlot_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (M == null || M.DragActive)
|
||||
return;
|
||||
|
||||
// Abort if there is no Pokemon in the given slot.
|
||||
PictureBox pb = (PictureBox)sender;
|
||||
if (pb.Image == null)
|
||||
return;
|
||||
int slot = getSlot(pb);
|
||||
int box = slot >= 30 ? -1 : CurrentBox;
|
||||
if (SAV.getIsSlotLocked(box, slot))
|
||||
return;
|
||||
|
||||
bool encrypt = ModifierKeys == Keys.Control;
|
||||
M.HandleMovePKM(pb, slot, box, encrypt);
|
||||
}
|
||||
private void pbBoxSlot_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
if (M == null)
|
||||
return;
|
||||
|
||||
// Abort if there is no Pokemon in the given slot.
|
||||
PictureBox pb = (PictureBox)sender;
|
||||
int slot = getSlot(pb);
|
||||
int box = slot >= 30 ? -1 : CurrentBox;
|
||||
if (SAV.getIsSlotLocked(box, slot) || slot >= 36)
|
||||
{
|
||||
SystemSounds.Asterisk.Play();
|
||||
e.Effect = DragDropEffects.Copy;
|
||||
M.DragInfo.Reset();
|
||||
return;
|
||||
}
|
||||
|
||||
bool overwrite = ModifierKeys == Keys.Alt;
|
||||
bool clone = ModifierKeys == Keys.Control;
|
||||
M.DragInfo.Destination.Parent = FindForm();
|
||||
M.DragInfo.Destination.Slot = getSlot(sender);
|
||||
M.DragInfo.Destination.Box = M.DragInfo.Destination.IsParty ? -1 : CurrentBox;
|
||||
M.HandleDropPKM(sender, e, overwrite, clone);
|
||||
}
|
||||
}
|
||||
}
|
291
PKHeX.WinForms/Controls/SAV Editor/BoxEditor.resx
Normal file
291
PKHeX.WinForms/Controls/SAV Editor/BoxEditor.resx
Normal file
|
@ -0,0 +1,291 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="PAN_Box.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAANwAAADSCAMAAAAWjl7DAAAABGdBTUEAALGPC/xhBQAAAwBQTFRFtays
|
||||
uK+vu7KyvbW1v7a2vb21wrm5w7u7xby8xb29x7+/w8O7x8e/y8O7zcW9z8e/yMDAy8PDzcXFz8fH08vD
|
||||
1s3F18/H0srK08vL1c3N18/P3NPL2tLS3NPT3dXV3NzT3t7W4NfP4NfX5NzT49ra5Nzc5t3d5t7e4ODX
|
||||
4+Pa5OTc5ubd5ube6ODX6eHZ7OTc6ODg6eHh7OTk7ubm6Ojg6enh7Ozk8Ojg9Ozk8Ojo8+vr9Ozs9u7u
|
||||
8PDo+PDo+PDwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAs5hT+gAAAAlwSFlzAAAO
|
||||
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
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="bpkx30.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx29.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx28.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx27.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx26.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx25.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx24.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx23.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx22.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx21.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx20.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx19.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx18.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx17.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx16.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx15.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx14.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx13.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx12.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx11.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx10.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx9.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx8.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx7.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx6.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bpkx1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
98
PKHeX.WinForms/Controls/SAV Editor/ContextMenuSAV.Designer.cs
generated
Normal file
98
PKHeX.WinForms/Controls/SAV Editor/ContextMenuSAV.Designer.cs
generated
Normal file
|
@ -0,0 +1,98 @@
|
|||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
partial class ContextMenuSAV
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.mnuVSD = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.mnuView = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuSet = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuDelete = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuLegality = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuVSD.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// mnuVSD
|
||||
//
|
||||
this.mnuVSD.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuView,
|
||||
this.mnuSet,
|
||||
this.mnuDelete,
|
||||
this.mnuLegality});
|
||||
this.mnuVSD.Name = "mnuVSD";
|
||||
this.mnuVSD.Size = new System.Drawing.Size(116, 92);
|
||||
this.mnuVSD.Opening += new System.ComponentModel.CancelEventHandler(this.MenuOpening);
|
||||
//
|
||||
// mnuView
|
||||
//
|
||||
this.mnuView.Name = "mnuView";
|
||||
this.mnuView.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuView.Text = "View";
|
||||
this.mnuView.Click += new System.EventHandler(this.ClickView);
|
||||
//
|
||||
// mnuSet
|
||||
//
|
||||
this.mnuSet.Name = "mnuSet";
|
||||
this.mnuSet.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuSet.Text = "Set";
|
||||
this.mnuSet.Click += new System.EventHandler(this.ClickSet);
|
||||
//
|
||||
// mnuDelete
|
||||
//
|
||||
this.mnuDelete.Name = "mnuDelete";
|
||||
this.mnuDelete.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuDelete.Text = "Delete";
|
||||
this.mnuDelete.Click += new System.EventHandler(this.ClickDelete);
|
||||
//
|
||||
// mnuLegality
|
||||
//
|
||||
this.mnuLegality.Name = "mnuLegality";
|
||||
this.mnuLegality.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuLegality.Text = "Legality";
|
||||
this.mnuLegality.Click += new System.EventHandler(this.ClickShowLegality);
|
||||
//
|
||||
// ContextMenuSAV
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSize = true;
|
||||
this.Name = "ContextMenuSAV";
|
||||
this.mnuVSD.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public System.Windows.Forms.ContextMenuStrip mnuVSD;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuView;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuSet;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuDelete;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuLegality;
|
||||
}
|
||||
}
|
202
PKHeX.WinForms/Controls/SAV Editor/ContextMenuSAV.cs
Normal file
202
PKHeX.WinForms/Controls/SAV Editor/ContextMenuSAV.cs
Normal file
|
@ -0,0 +1,202 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using PKHeX.Core;
|
||||
using PKHeX.WinForms.Properties;
|
||||
|
||||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
public partial class ContextMenuSAV : UserControl
|
||||
{
|
||||
public ContextMenuSAV()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void OmniClick(object sender, EventArgs e, Keys z)
|
||||
{
|
||||
switch (z)
|
||||
{
|
||||
case Keys.Control: ClickView(sender, e); break;
|
||||
case Keys.Shift: ClickSet(sender, e); break;
|
||||
case Keys.Alt: ClickDelete(sender, e); break;
|
||||
}
|
||||
}
|
||||
private void ClickView(object sender, EventArgs e)
|
||||
{
|
||||
SlotChangeManager m = GetSenderInfo(ref sender, out SlotChange info);
|
||||
if (m == null)
|
||||
return;
|
||||
if ((sender as PictureBox)?.Image == null)
|
||||
{ System.Media.SystemSounds.Asterisk.Play(); return; }
|
||||
|
||||
m.SE.PKME_Tabs.populateFields(m.GetPKM(info), false);
|
||||
m.SetColor(info.Box, info.Slot, Resources.slotView);
|
||||
}
|
||||
private void ClickSet(object sender, EventArgs e)
|
||||
{
|
||||
SlotChangeManager m = GetSenderInfo(ref sender, out SlotChange info);
|
||||
if (m == null)
|
||||
return;
|
||||
|
||||
var editor = m.SE.PKME_Tabs;
|
||||
var sav = m.SE.SAV;
|
||||
if (info.Slot == 30 && editor.IsEmptyOrEgg)
|
||||
{ WinFormsUtil.Alert("Can't have empty/egg first info.Slot."); return; }
|
||||
if (m.SE.SAV.getIsSlotLocked(info.Box, info.Slot))
|
||||
{ WinFormsUtil.Alert("Can't set to locked info.Slot."); return; }
|
||||
|
||||
PKM pk = editor.preparePKM();
|
||||
|
||||
string[] errata = sav.IsPKMCompatible(pk);
|
||||
if (errata.Length > 0 && DialogResult.Yes != WinFormsUtil.Prompt(MessageBoxButtons.YesNo, string.Join(Environment.NewLine, errata), "Continue?"))
|
||||
return;
|
||||
|
||||
if (info.Slot >= 30)
|
||||
info.Box = -1;
|
||||
if (info.Slot >= 30 && info.Slot < 36) // Party
|
||||
{
|
||||
// If info.Slot isn't overwriting existing PKM, make it write to the lowest empty PKM info.Slot
|
||||
if (sav.PartyCount < info.Slot + 1 - 30)
|
||||
{
|
||||
info.Slot = sav.PartyCount + 30;
|
||||
info.Offset = m.SE.getPKXOffset(info.Slot);
|
||||
}
|
||||
m.SetPKM(pk, info, true, Resources.slotSet);
|
||||
}
|
||||
else if (info.Slot < 30 || m.SE.HaX)
|
||||
{
|
||||
if (info.Slot < 30)
|
||||
{
|
||||
m.SE.UndoStack.Push(new SlotChange
|
||||
{
|
||||
Box = info.Box,
|
||||
Slot = info.Slot,
|
||||
Offset = info.Offset,
|
||||
PKM = sav.getStoredSlot(info.Offset)
|
||||
});
|
||||
m.SE.Menu_Undo.Enabled = true;
|
||||
}
|
||||
|
||||
m.SetPKM(pk, info, true, Resources.slotSet);
|
||||
}
|
||||
|
||||
editor.lastData = pk.Data;
|
||||
m.SE.RedoStack.Clear(); m.SE.Menu_Redo.Enabled = false;
|
||||
}
|
||||
private void ClickDelete(object sender, EventArgs e)
|
||||
{
|
||||
SlotChangeManager m = GetSenderInfo(ref sender, out SlotChange info);
|
||||
if (m == null)
|
||||
return;
|
||||
|
||||
if ((sender as PictureBox)?.Image == null)
|
||||
{ System.Media.SystemSounds.Asterisk.Play(); return; }
|
||||
|
||||
var sav = m.SE.SAV;
|
||||
if (info.Slot == 30 && sav.PartyCount == 1 && !m.SE.HaX)
|
||||
{ WinFormsUtil.Alert("Can't delete first slot."); return; }
|
||||
if (sav.getIsSlotLocked(info.Box, info.Slot))
|
||||
{ WinFormsUtil.Alert("Can't delete locked slot."); return; }
|
||||
|
||||
if (info.Slot >= 30 && info.Slot < 36) // Party
|
||||
{
|
||||
m.SetPKM(sav.BlankPKM, info, true, Resources.slotDel);
|
||||
return;
|
||||
}
|
||||
if (info.Slot < 30 || m.SE.HaX)
|
||||
{
|
||||
if (info.Slot < 30)
|
||||
{
|
||||
m.SE.UndoStack.Push(new SlotChange
|
||||
{
|
||||
Box = info.Box,
|
||||
Slot = info.Slot,
|
||||
Offset = info.Offset,
|
||||
PKM = sav.getStoredSlot(info.Offset)
|
||||
});
|
||||
m.SE.Menu_Undo.Enabled = true;
|
||||
}
|
||||
m.SetPKM(sav.BlankPKM, info, true, Resources.slotDel);
|
||||
}
|
||||
else return;
|
||||
|
||||
m.SE.RedoStack.Clear(); m.SE.Menu_Redo.Enabled = false;
|
||||
}
|
||||
private void ClickShowLegality(object sender, EventArgs e)
|
||||
{
|
||||
SlotChangeManager m = GetSenderInfo(ref sender, out SlotChange info);
|
||||
if (m == null)
|
||||
return;
|
||||
|
||||
bool verbose = ModifierKeys == Keys.Control;
|
||||
var pk = m.GetPKM(info);
|
||||
LegalityAnalysis la = new LegalityAnalysis(pk);
|
||||
var report = la.Report(verbose);
|
||||
if (verbose)
|
||||
{
|
||||
var dr = WinFormsUtil.Prompt(MessageBoxButtons.YesNo, report, "Copy report to Clipboard?");
|
||||
if (dr == DialogResult.Yes)
|
||||
Clipboard.SetText(report);
|
||||
}
|
||||
else
|
||||
WinFormsUtil.Alert(report);
|
||||
}
|
||||
private void MenuOpening(object sender, CancelEventArgs e)
|
||||
{
|
||||
var items = ((ContextMenuStrip)sender).Items;
|
||||
|
||||
object ctrl = ((ContextMenuStrip)sender).SourceControl;
|
||||
GetSenderInfo(ref ctrl, out SlotChange info);
|
||||
bool SlotFull = (ctrl as PictureBox)?.Image != null;
|
||||
bool Editable = info.Slot < 36;
|
||||
bool legality = ModifierKeys == Keys.Control;
|
||||
ToggleItem(items, mnuSet, Editable);
|
||||
ToggleItem(items, mnuDelete, Editable && SlotFull);
|
||||
ToggleItem(items, mnuLegality, legality && SlotFull);
|
||||
ToggleItem(items, mnuView, SlotFull || items.Count <= 1, true);
|
||||
|
||||
if (items.Count == 0)
|
||||
e.Cancel = true;
|
||||
}
|
||||
|
||||
private static SlotChangeManager GetSenderInfo(ref object sender, out SlotChange loc)
|
||||
{
|
||||
loc = new SlotChange();
|
||||
var ctrl = WinFormsUtil.GetUnderlyingControl(sender);
|
||||
var obj = ctrl.Parent.Parent;
|
||||
if (obj is BoxEditor b)
|
||||
{
|
||||
loc.Box = b.CurrentBox;
|
||||
loc.Slot = b.getSlot(sender);
|
||||
loc.Offset = b.getOffset(loc.Slot, loc.Box);
|
||||
loc.Parent = b.FindForm();
|
||||
sender = ctrl;
|
||||
return b.M;
|
||||
}
|
||||
obj = obj.Parent.Parent;
|
||||
if (obj is SAVEditor z)
|
||||
{
|
||||
loc.Box = z.Box.CurrentBox;
|
||||
loc.Slot = z.getSlot(sender);
|
||||
loc.Offset = z.getPKXOffset(loc.Slot, loc.Box);
|
||||
loc.Parent = z.FindForm();
|
||||
sender = ctrl;
|
||||
return z.M;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private static void ToggleItem(ToolStripItemCollection items, ToolStripItem item, bool visible, bool first = false)
|
||||
{
|
||||
if (visible)
|
||||
{
|
||||
if (first)
|
||||
items.Insert(0, item);
|
||||
else
|
||||
items.Add(item);
|
||||
}
|
||||
else if (items.Contains(item))
|
||||
items.Remove(item);
|
||||
}
|
||||
}
|
||||
}
|
123
PKHeX.WinForms/Controls/SAV Editor/ContextMenuSAV.resx
Normal file
123
PKHeX.WinForms/Controls/SAV Editor/ContextMenuSAV.resx
Normal file
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="mnuVSD.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
1144
PKHeX.WinForms/Controls/SAV Editor/SAVEditor.Designer.cs
generated
Normal file
1144
PKHeX.WinForms/Controls/SAV Editor/SAVEditor.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
1067
PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs
Normal file
1067
PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs
Normal file
File diff suppressed because it is too large
Load diff
655
PKHeX.WinForms/Controls/SAV Editor/SAVEditor.resx
Normal file
655
PKHeX.WinForms/Controls/SAV Editor/SAVEditor.resx
Normal file
|
@ -0,0 +1,655 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="tabBoxMulti.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Tab_Box.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Box.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Tab_PartyBattle.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PAN_BattleBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_ReadOnlyPBB.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_BattleBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_Party.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PAN_Party.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Tab_Other.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_Daycare.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_GTS.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_Fused.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_ReadOnlyOther.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_SUBE.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Tab_SAV.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_SaveSlot.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_SaveSlot.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_Secure2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_Secure2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_Secure1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_Secure1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_JPEG.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_GameSync.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_GameSync.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_SaveBoxBin.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_VerifyCHK.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Box.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PAN_BattleBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="PAN_BattleBox.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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
|
||||
RU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_Locked.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_Locked.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="bbpkx1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bbpkx2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bbpkx3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bbpkx4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bbpkx5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bbpkx6.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_ReadOnlyPBB.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_BattleBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_Party.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PAN_Party.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ppkx1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ppkx2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ppkx3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ppkx4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ppkx5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ppkx6.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PAN_Party.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAG8AAACgCAYAAAACezIBAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAJ00lEQVR4Xu2d
|
||||
zWtUyRqH+1/of6E3d+GyFwrZCuLChVwISHYucxlQhjEgbkJE/CAQrwjBiwGVu5IR4gwqtCCDyFWMXLwx
|
||||
0Uy6M8mYZCbEr/gVYRY19avbv7a6Ujd6o+lTb+pdPIbuPuf0e97nVHW9darbkjGmVKvVWvwQcPXq1RYj
|
||||
IyNruHTpkvIFxHLq88/vv3f8w24L/n7unAPe2uQ9/uWXNp48eVJej/HxceULieXVozTRaDherq6ulff6
|
||||
jz9KN376qTTz22+lmcVFUG5SsTtXPXb+S9kUkNsAP+8VK68M/vPzz05imzwn7r/ynLS/9vT0WcZ27Njx
|
||||
wmLIX5RNwc9xAPI/9s133/VZeRUrzwmc/f33j91mvf4clG/fvl3t6emp7dq1yxw8eNAcO3bMDA0NOU6e
|
||||
PKl0iMHBQcfAwIDp6+sz3d3doGa7zer49HR5am6pTV7ZUoE4izl79qzDl0aJyuZDeQTP9fb2mmpXV83K
|
||||
q1h55TZ5e/fuPw5xp06dasm7ePGi49atW447d+4oHeDmzZtmeHi4BaVaeeZv3357vD4/3yavYuU1IM6X
|
||||
B2FTU1Pm/fv3jnfv3ikdYHFx0UGJlGfFQWDDyqu05GFUgw9Ido9sbS9evDBv375dA2WmRCxOqbx586YF
|
||||
BFIeGtT27dvN1NxcdY08bACBkIcWFzswiCWvaGJxSsWXBw/w8dny0OpiByWx5BVNLM6tAHq/a9eutckb
|
||||
r9c3Jg8He/bsWXLEYt0qfEreTn7m+fLYdF++fGkajYZ58OCBa8YpwtiWl5fN6upqK/YwERIJ5f378ezO
|
||||
z5K3tLRk7t275+RBog8TVCR+PE+fPjUTExNmbm6u9XqYCIlA3pEjRz4tD7MqvjxfGhNCVlZWCieMCS0P
|
||||
AnHR4XGYCIlsSB4SIE0eukwIRNx4HCZCIhuSh88QSIslLXXQ+iAyTIRERkdHTX9///8nD4MAyfLCJEhF
|
||||
5QlG5QlmQ/LGxsbMq1evoslJFQ5c8HkdJkEqGxqwqLw0UHmCUXmCUXmCUXmCUXmCUXmCUXmCUXmCUXmC
|
||||
UXmCUXlNeLPWB5PvRcI4EBsIV8ZlK4+PuSoAdxtCsG2R+LFg/Q1Ww6m8ZmtDQpiY9fZJAVxkjJUtMVt5
|
||||
6I6QDHZL6+2TCmHM2crDXywJ5POxfVIDcbIFZi2PqwGkyQPZy8NfyfJwDiqv+Xxsn9RgrF8kT3qXQ3lS
|
||||
Yic8B16AG5K3Fa7abOVhlCZ5pJa1PLQ6dJ1IhiR5mElB/FnLA/hiO65iFIw8KMFgpmgwlCYsbjE7ofKa
|
||||
MCm4ogFaIuCvFhQJRHH6KxQHspdHcEBIo8QUoDxOJfkTuohZ5TXhQVPC7zZV3jryiJ+gVIjFhscqL8BP
|
||||
UCrEYsNjlRfgJygVYrHhscrzSP13WFReUx4PgmIdIzsU7DhgijA2jjpB9vJQGkj8HRaVZw/gS+NBSeyN
|
||||
O00YEycUEH/W8liQS5KHFucLzFYedoa02BukCk8cn4FZy+PN2NgbpEp44iov8gapovJUXqF8FXlbYQES
|
||||
Bi4YxMS2TRWeAwddKi+ybaqoPJW3NeSh7ottmyqIHzU2L7xs5bFg55wnX08ZxoxlHphgz1Ye4BoXJMVP
|
||||
UoqwxSFm3h3JWh5YWFgwDx8+dM9zPSoJFzV1GsaB2FCecWJd5QWgbvXFgdnZ2UJhHIgNQJzKC8RJReUJ
|
||||
RuUJRuUJJlt5fEwwEEDJ4MOBQlEwDg5UfHEg65aHx1wVgBoqBNsWiR8LyoTwP53MWh6LdPxdb58U4AXm
|
||||
t8Rs5SEJfjLW2ycVGHP28vAXBTCfj+2TGogTLZAzLdnK42oAafL0rkKz5UmUB1RervKkdjk8ccqTEnvI
|
||||
o0ePzIcPHzYmT/pVm7U83qqQJo8f9lnLQ6tD14lkSJKHYTbiz1oewJ1eXMUoHJEEHwxmioZxAha3qI/4
|
||||
XNby/KTgigZoiSC8nV8EEMXpr1AcyF4ehqsASYA0SkwBysMF5sdMVJ4nLzX8OGNkL08yKk8wKk8wKs8j
|
||||
xd9hCUsGn+zloVjHyA4FO5KRIogNs0HhqBOvZSsPpYG032HxBWYtz5cWJi72hp0mjIkTCtnLY0EuSR7q
|
||||
URTtmH3JWh5OHNJiB04ViMJFh9izlsebsbEDpwpbIGJXeSqvMFRervIkLkAilIeRJwYxsW1ShRcgY1d5
|
||||
kW1SReUJl4cRs8qzCUDhHtsmVSCPN5qzlIcPe5wDZ1zwF4lgl5QyjJlf9cpWHsAVTIGxZKUEu0vEzPiz
|
||||
lgdS/h0WiOIF5vcSjD17eQR1aygv9tsonYTyKI0wZpUnGJUnGJUnGJUnGJXXJDbaKxoOnDCYAhywZPfD
|
||||
cSSUx1JhcnLS1Ov1pED5QjAzhJGnymuKYw0lrUjPXh6nmlhDxRKWGowZXWqW8qRPTOtdhaY8JCC2Taqw
|
||||
BSJ2nIPKi2yTKiovd3lIAOoOHiz2RqnBWoknLnEBEvON2DcsDzurvM7zVeSx8pcmj0sIspaHRKDrxLBV
|
||||
kjx8qwnxZy0PoFBEFxSbncBgpmj8ePzZCQxSspcHWPGjOwJIEvAnV4sCcTAuwJkUldeEycABw2SlAGLi
|
||||
CXM+EKi8QF7qqLxAniRUnsorFJWn8uSh8lReoag8lScPlafyCkXlqTx5qDyVVygqT+XJxZeHG7RMSCxZ
|
||||
qcFYuZRjdHTU9Pf3q7xYslJD5TW7TqnycI8ye3lYQMXPPUnycJMZqwJwLp8tD2wFeT7+t4Tw2yYhsbUx
|
||||
nYQ3uwFixFfR8JU0xo8By9DQUEveeL2ejzxAgTMzM475+fkWsbUxnQSxMT7giwMReVVfXhXysMFWlUdw
|
||||
ZTNZJFwT02kYB7vJEJW3Dvw8LIpYTAT/b0Qo7/Hs7Fp57DavXLli7HPRgymbD0bHAN3n3bt3zZkzZ1ps
|
||||
27bNTM3N/W95FBj2vUpn8OXBw6fkVay8xqFDh1zzJNgR5nEQ8Pr1a6UDQNz9+/dd/k+fPt3ygSmy7u7u
|
||||
Rn3+WcWXVz5w4MDxffv2tcnDjgAHATdu3FA6wIULFxzMP31Ycaa3t/e4lVduyWssLJQtlT179tTsi27H
|
||||
o0ePmsHBQceJEyccAwMDyibCPGOixG9EKNB3795t9u7fX6s/f16ZWFxsk+cEWmlVCLTAsDsQBfrwTZSv
|
||||
h59fSoPEw4cPO3GW2rnLl6tWXtnKc97cP78uLzvwAsxaw32WsWpXl2mjWlU2BeT2I1021x5jtuX1LS0t
|
||||
VZp+Sraw/yjv8o8/Uh4FOonj09PVNsbHwU7lazNNbH6nq9M21x4VK64Mmn5Kw8PDH+Vdv37dsbSy4mh2
|
||||
oyU7JAVl8qheVzYZL98u/3aU75icnCyNjIyUzp8/72jJU2QSfVKRQfRJRQKm9Ceir+5STvbNogAAAABJ
|
||||
RU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="ppkx1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ppkx2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ppkx3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ppkx4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ppkx5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ppkx6.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_Daycare.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_XP2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_XP1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_Daycare2XP.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_Daycare1XP.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_DC2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_DC1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_DaycareSeed.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_RNGSeed.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dcpkx2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dcpkx1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="DayCare_HasEgg.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_XP2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_XP1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_Daycare2XP.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_Daycare1XP.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_DC2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_DC1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_DaycareSeed.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_RNGSeed.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dcpkx2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dcpkx1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="DayCare_HasEgg.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_GTS.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="gtspkx.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="gtspkx.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_Fused.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="fusedpkx.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="fusedpkx.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="L_ReadOnlyOther.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_SUBE.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="subepkx1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="subepkx2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="subepkx3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="subepkx1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="subepkx2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="subepkx3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_SAVtools.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="FLP_SAVtools.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="FLP_SAVtools.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenTrainerInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenItemPouch.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenBoxLayout.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenWondercards.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenOPowers.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenEventFlags.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenPokedex.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenLinkInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenBerryField.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenPokeblocks.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenSecretBase.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenPokepuffs.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenSuperTraining.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenHallofFame.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OUTPasserby.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_CGearSkin.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenPokeBeans.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenZygardeCells.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenMiscEditor.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenHoneyTreeEditor.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenFriendSafari.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenRTCEditor.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenTrainerInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenItemPouch.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenBoxLayout.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenWondercards.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenOPowers.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenEventFlags.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenPokedex.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenLinkInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenBerryField.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenPokeblocks.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenSecretBase.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenPokepuffs.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenSuperTraining.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenHallofFame.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OUTPasserby.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_CGearSkin.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenPokeBeans.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenZygardeCells.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenMiscEditor.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenHoneyTreeEditor.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenFriendSafari.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenRTCEditor.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
18
PKHeX.WinForms/Controls/SAV Editor/SlotChange.cs
Normal file
18
PKHeX.WinForms/Controls/SAV Editor/SlotChange.cs
Normal file
|
@ -0,0 +1,18 @@
|
|||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.WinForms
|
||||
{
|
||||
public class SlotChange
|
||||
{
|
||||
public object Parent;
|
||||
|
||||
public byte[] OriginalData;
|
||||
public int Offset = -1;
|
||||
public int Slot = -1;
|
||||
public int Box = -1;
|
||||
public PKM PKM;
|
||||
|
||||
public bool IsParty => 30 <= Slot && Slot < 36;
|
||||
public bool IsValid => Slot > -1 && (Box > -1 || IsParty);
|
||||
}
|
||||
}
|
34
PKHeX.WinForms/Controls/SAV Editor/SlotChangeInfo.cs
Normal file
34
PKHeX.WinForms/Controls/SAV Editor/SlotChangeInfo.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
367
PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs
Normal file
367
PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs
Normal file
|
@ -0,0 +1,367 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using PKHeX.Core;
|
||||
using PKHeX.WinForms.Properties;
|
||||
|
||||
namespace PKHeX.WinForms.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Manager class for moving slots.
|
||||
/// </summary>
|
||||
public class SlotChangeManager
|
||||
{
|
||||
public readonly SAVEditor SE;
|
||||
private SaveFile SAV => SE.SAV;
|
||||
private Image OriginalBackground;
|
||||
private Image CurrentBackground;
|
||||
public SlotChangeInfo DragInfo;
|
||||
public readonly List<BoxEditor> Boxes = new List<BoxEditor>();
|
||||
public int colorizedbox = -1;
|
||||
public int colorizedslot = -1;
|
||||
public Image colorizedcolor;
|
||||
|
||||
public SlotChangeManager(SAVEditor se)
|
||||
{
|
||||
SE = se;
|
||||
Reset();
|
||||
}
|
||||
public void Reset() { DragInfo = new SlotChangeInfo(SAV); colorizedbox = colorizedslot = -1; }
|
||||
public bool DragActive => DragInfo.DragDropInProgress || !DragInfo.LeftMouseIsDown;
|
||||
public void SetCursor(Cursor z, object sender)
|
||||
{
|
||||
if (SE != null)
|
||||
DragInfo.Cursor = (sender as Control).FindForm().Cursor = z;
|
||||
}
|
||||
public void MouseEnter(object sender, EventArgs e)
|
||||
{
|
||||
var pb = (PictureBox)sender;
|
||||
if (pb.Image == null)
|
||||
return;
|
||||
OriginalBackground = pb.BackgroundImage;
|
||||
pb.BackgroundImage = CurrentBackground = Resources.slotHover;
|
||||
if (!DragActive)
|
||||
SetCursor(Cursors.Hand, sender);
|
||||
}
|
||||
public void MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
var pb = (PictureBox)sender;
|
||||
if (pb.BackgroundImage != CurrentBackground)
|
||||
return;
|
||||
pb.BackgroundImage = OriginalBackground;
|
||||
if (!DragActive)
|
||||
SetCursor(Cursors.Default, sender);
|
||||
}
|
||||
public void MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (!DragInfo.DragDropInProgress)
|
||||
SE.clickSlot(sender, e);
|
||||
}
|
||||
public void MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
DragInfo.LeftMouseIsDown = false;
|
||||
if (e.Button == MouseButtons.Right)
|
||||
DragInfo.RightMouseIsDown = false;
|
||||
}
|
||||
public void MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
DragInfo.LeftMouseIsDown = true;
|
||||
if (e.Button == MouseButtons.Right)
|
||||
DragInfo.RightMouseIsDown = true;
|
||||
}
|
||||
public void QueryContinueDrag(object sender, QueryContinueDragEventArgs e)
|
||||
{
|
||||
if (e.Action != DragAction.Cancel && e.Action != DragAction.Drop)
|
||||
return;
|
||||
DragInfo.LeftMouseIsDown = false;
|
||||
DragInfo.RightMouseIsDown = false;
|
||||
DragInfo.DragDropInProgress = false;
|
||||
}
|
||||
public void DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.AllowedEffect == (DragDropEffects.Copy | DragDropEffects.Link)) // external file
|
||||
e.Effect = DragDropEffects.Copy;
|
||||
else if (e.Data != null) // within
|
||||
e.Effect = DragDropEffects.Move;
|
||||
|
||||
if (DragInfo.DragDropInProgress)
|
||||
SetCursor((Cursor)DragInfo.Cursor, sender);
|
||||
}
|
||||
|
||||
public void HandleMovePKM(PictureBox pb, int slot, int box, bool encrypt)
|
||||
{
|
||||
// Create a temporary PKM file to perform a drag drop operation.
|
||||
|
||||
// Set flag to prevent re-entering.
|
||||
DragInfo.DragDropInProgress = true;
|
||||
|
||||
DragInfo.Source.Parent = pb.Parent;
|
||||
DragInfo.Source.Slot = slot;
|
||||
DragInfo.Source.Box = box;
|
||||
DragInfo.Source.Offset = SE.getPKXOffset(DragInfo.Source.Slot, DragInfo.Source.Box);
|
||||
|
||||
// Prepare Data
|
||||
DragInfo.Source.OriginalData = SAV.getData(DragInfo.Source.Offset, SAV.SIZE_STORED);
|
||||
|
||||
// Make a new file name based off the PID
|
||||
string newfile = CreateDragDropPKM(pb, box, encrypt, out bool external);
|
||||
DragInfo.Reset();
|
||||
SetCursor(SE.GetDefaultCursor, pb);
|
||||
|
||||
// Browser apps need time to load data since the file isn't moved to a location on the user's local storage.
|
||||
// Tested 10ms -> too quick, 100ms was fine. 500ms should be safe?
|
||||
if (!external)
|
||||
{
|
||||
if (File.Exists(newfile) && DragInfo.CurrentPath == null)
|
||||
File.Delete(newfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
Thread.Sleep(500);
|
||||
if (File.Exists(newfile) && DragInfo.CurrentPath == null)
|
||||
File.Delete(newfile);
|
||||
}).Start();
|
||||
}
|
||||
if (DragInfo.Source.IsParty || DragInfo.Destination.IsParty)
|
||||
SE.setParty();
|
||||
}
|
||||
private string CreateDragDropPKM(PictureBox pb, int box, bool encrypt, out bool external)
|
||||
{
|
||||
byte[] dragdata = SAV.decryptPKM(DragInfo.Source.OriginalData);
|
||||
Array.Resize(ref dragdata, SAV.SIZE_STORED);
|
||||
PKM pkx = SAV.getPKM(dragdata);
|
||||
string fn = pkx.FileName; fn = fn.Substring(0, fn.LastIndexOf('.'));
|
||||
string filename = $"{fn}{(encrypt ? ".ek" + pkx.Format : "." + pkx.Extension)}";
|
||||
|
||||
// Make File
|
||||
string newfile = Path.Combine(Path.GetTempPath(), Util.CleanFileName(filename));
|
||||
try
|
||||
{
|
||||
TryMakeDragDropPKM(pb, encrypt, pkx, newfile, out external);
|
||||
}
|
||||
catch (Exception x)
|
||||
{
|
||||
WinFormsUtil.Error("Drag & Drop Error", x);
|
||||
external = false;
|
||||
}
|
||||
|
||||
return newfile;
|
||||
}
|
||||
private void TryMakeDragDropPKM(PictureBox pb, bool encrypt, PKM pkx, string newfile, out bool external)
|
||||
{
|
||||
File.WriteAllBytes(newfile, encrypt ? pkx.EncryptedBoxData : pkx.DecryptedBoxData);
|
||||
var img = (Bitmap)pb.Image;
|
||||
SetCursor(new Cursor(img.GetHicon()), pb);
|
||||
pb.Image = null;
|
||||
pb.BackgroundImage = Resources.slotDrag;
|
||||
// Thread Blocks on DoDragDrop
|
||||
DragInfo.CurrentPath = newfile;
|
||||
DragDropEffects result = pb.DoDragDrop(new DataObject(DataFormats.FileDrop, new[] { newfile }), DragDropEffects.Move);
|
||||
external = !DragInfo.Source.IsValid || result != DragDropEffects.Link;
|
||||
if (external || DragInfo.SameSlot || result != DragDropEffects.Link) // not dropped to another box slot, restore img
|
||||
{
|
||||
pb.Image = img;
|
||||
pb.BackgroundImage = OriginalBackground;
|
||||
}
|
||||
|
||||
if (result == DragDropEffects.Copy) // viewed in tabs or cloned
|
||||
{
|
||||
if (!DragInfo.Destination.IsValid) // apply 'view' highlight
|
||||
SetColor(DragInfo.Source.Box, DragInfo.Source.Slot, Resources.slotView);
|
||||
external = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetSlotSprite(SlotChange loc, PKM pk, BoxEditor x = null) => (x ?? SE.Box).setSlotFiller(pk, loc.Box, loc.Slot);
|
||||
|
||||
public void HandleDropPKM(object sender, DragEventArgs e, bool overwrite, bool clone)
|
||||
{
|
||||
DragInfo.Destination.Offset = SE.getPKXOffset(DragInfo.Destination.Slot, DragInfo.Destination.Box);
|
||||
// Check for In-Dropped files (PKX,SAV,ETC)
|
||||
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
if (Directory.Exists(files[0])) { SE.LoadBoxes(out string _, files[0]); return; }
|
||||
if (DragInfo.SameSlot)
|
||||
{
|
||||
e.Effect = DragDropEffects.Link;
|
||||
return;
|
||||
}
|
||||
if (SAV.getIsSlotLocked(DragInfo.Destination.Box, DragInfo.Destination.Slot))
|
||||
{
|
||||
DragInfo.Destination.Slot = -1; // Invalidate
|
||||
WinFormsUtil.Alert("Unable to set to locked slot.");
|
||||
return;
|
||||
}
|
||||
if (DragInfo.Source.Offset < 0 && TryLoadFiles(files)) // file
|
||||
return;
|
||||
|
||||
TrySetPKMDestination(sender, e, overwrite, clone);
|
||||
|
||||
if (DragInfo.Source.Parent == null) // internal file
|
||||
DragInfo.Reset();
|
||||
}
|
||||
private bool TryLoadFiles(string[] files)
|
||||
{
|
||||
if (files.Length <= 0)
|
||||
return true;
|
||||
string file = files[0];
|
||||
FileInfo fi = new FileInfo(file);
|
||||
if (!PKX.getIsPKM(fi.Length) && !MysteryGift.getIsMysteryGift(fi.Length))
|
||||
{
|
||||
SE.ParentForm.DoDragDrop(new DataObject(DataFormats.FileDrop, new[] { file }), DragDropEffects.Move);
|
||||
return true;
|
||||
}
|
||||
|
||||
byte[] data = File.ReadAllBytes(file);
|
||||
MysteryGift mg = MysteryGift.getMysteryGift(data, fi.Extension);
|
||||
PKM temp = mg?.convertToPKM(SAV) ?? PKMConverter.getPKMfromBytes(data,
|
||||
prefer: fi.Extension.Length > 0 ? (fi.Extension.Last() - 0x30) & 7 : SAV.Generation);
|
||||
|
||||
PKM pk = PKMConverter.convertToFormat(temp, SAV.PKMType, out string c);
|
||||
if (pk == null)
|
||||
{
|
||||
WinFormsUtil.Error(c);
|
||||
Console.WriteLine(c);
|
||||
return true;
|
||||
}
|
||||
|
||||
string[] errata = SAV.IsPKMCompatible(pk);
|
||||
if (errata.Length > 0)
|
||||
{
|
||||
string concat = string.Join(Environment.NewLine, errata);
|
||||
if (DialogResult.Yes != WinFormsUtil.Prompt(MessageBoxButtons.YesNo, concat, "Continue?"))
|
||||
{
|
||||
Console.WriteLine(c);
|
||||
Console.WriteLine(concat);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
SetPKM(pk, false, Resources.slotSet);
|
||||
Console.WriteLine(c);
|
||||
return false;
|
||||
}
|
||||
private void TrySetPKMDestination(object sender, DragEventArgs e, bool overwrite, bool clone)
|
||||
{
|
||||
PKM pkz = GetPKM(true);
|
||||
if (DragInfo.Source.IsValid)
|
||||
TrySetPKMSource(sender, overwrite, clone);
|
||||
|
||||
// Copy from temp to destination slot.
|
||||
SetPKM(pkz, false, null);
|
||||
|
||||
e.Effect = clone ? DragDropEffects.Copy : DragDropEffects.Link;
|
||||
SetCursor(SE.GetDefaultCursor, sender);
|
||||
}
|
||||
private void TrySetPKMSource(object sender, bool overwrite, bool clone)
|
||||
{
|
||||
if (overwrite && DragInfo.Destination.IsValid) // overwrite delete old slot
|
||||
{
|
||||
// Clear from slot
|
||||
SetPKM(SAV.BlankPKM, true, null);
|
||||
}
|
||||
else if (!clone && DragInfo.Destination.IsValid)
|
||||
{
|
||||
// Load data from destination
|
||||
PKM pk = ((PictureBox)sender).Image != null
|
||||
? GetPKM(false)
|
||||
: SAV.BlankPKM;
|
||||
|
||||
// Set destination pokemon data to source slot
|
||||
SetPKM(pk, true, null);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetColor(int box, int slot, Image img)
|
||||
{
|
||||
// Update SubViews
|
||||
foreach (var boxview in Boxes)
|
||||
{
|
||||
if (boxview.CurrentBox != box && boxview.SlotPictureBoxes.Count == boxview.BoxSlotCount) continue;
|
||||
var slots = boxview.SlotPictureBoxes;
|
||||
for (int i = 0; i < slots.Count; i++)
|
||||
slots[i].BackgroundImage = slot == i ? img : null;
|
||||
}
|
||||
colorizedbox = box;
|
||||
colorizedslot = slot;
|
||||
colorizedcolor = img;
|
||||
}
|
||||
|
||||
// PKM Get Set
|
||||
public PKM GetPKM(bool src) => GetPKM(src ? DragInfo.Source : DragInfo.Destination);
|
||||
public PKM GetPKM(SlotChange slot)
|
||||
{
|
||||
int o = slot.Offset;
|
||||
if (o < 0)
|
||||
return slot.PKM;
|
||||
return slot.IsParty ? SAV.getPartySlot(o) : SAV.getStoredSlot(o);
|
||||
}
|
||||
public void SetPKM(PKM pk, bool src, Image img) => SetPKM(pk, src ? DragInfo.Source : DragInfo.Destination, src, img);
|
||||
public void SetPKM(PKM pk, SlotChange slot, bool src, Image img)
|
||||
{
|
||||
if (slot.IsParty)
|
||||
{
|
||||
SetPKMParty(pk, src, slot);
|
||||
if (img == Resources.slotDel)
|
||||
slot.Slot = 30 + SAV.PartyCount;
|
||||
SetColor(slot.Box, slot.Slot, img ?? Resources.slotSet);
|
||||
return;
|
||||
}
|
||||
|
||||
int o = slot.Offset;
|
||||
SAV.setStoredSlot(pk, o);
|
||||
if (slot.Slot >= 30)
|
||||
{
|
||||
SetSlotSprite(slot, pk);
|
||||
return;
|
||||
}
|
||||
|
||||
// Update SubViews
|
||||
foreach (var boxview in Boxes)
|
||||
{
|
||||
if (boxview.CurrentBox == slot.Box)
|
||||
{
|
||||
Console.WriteLine($"Setting to {boxview.Parent.Name}'s [{boxview.CurrentBox+1:d2}]|{boxview.CurrentBoxName} at Slot {slot.Slot+1}.");
|
||||
SetSlotSprite(slot, pk, boxview);
|
||||
}
|
||||
}
|
||||
SetColor(slot.Box, slot.Slot, img ?? Resources.slotSet);
|
||||
}
|
||||
private void SetPKMParty(PKM pk, bool src, SlotChange slot)
|
||||
{
|
||||
int o = slot.Offset;
|
||||
if (src)
|
||||
{
|
||||
if (pk.Species == 0) // Empty Slot
|
||||
{
|
||||
SAV.deletePartySlot(slot.Slot - 30);
|
||||
SE.setParty();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (30 + SAV.PartyCount < slot.Slot)
|
||||
{
|
||||
o = SAV.getPartyOffset(SAV.PartyCount);
|
||||
slot.Slot = 30 + SAV.PartyCount;
|
||||
}
|
||||
}
|
||||
|
||||
if (pk.Stat_HPMax == 0) // Without Stats (Box)
|
||||
{
|
||||
pk.setStats(pk.getStats(SAV.Personal.getFormeEntry(pk.Species, pk.AltForm)));
|
||||
pk.Stat_Level = pk.CurrentLevel;
|
||||
}
|
||||
SAV.setPartySlot(pk, o);
|
||||
SE.setParty();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.WinForms
|
||||
{
|
||||
public class DragDropManager
|
||||
{
|
||||
private readonly SaveFile SAV;
|
||||
|
||||
public bool LeftMouseIsDown;
|
||||
public bool RightMouseIsDown;
|
||||
public bool DragDropInProgress;
|
||||
|
||||
public object Cursor;
|
||||
public string CurrentPath;
|
||||
|
||||
public DragLocation Source = new DragLocation();
|
||||
public DragLocation Destination = new DragLocation();
|
||||
|
||||
public DragDropManager(SaveFile sav)
|
||||
{
|
||||
SAV = sav;
|
||||
Source.Data = SAV.BlankPKM.EncryptedPartyData;
|
||||
}
|
||||
|
||||
public class DragLocation
|
||||
{
|
||||
public object Parent;
|
||||
public byte[] Data;
|
||||
public int Offset = -1;
|
||||
public int Slot = -1;
|
||||
public int Box = -1;
|
||||
|
||||
public bool IsParty => 30 <= Slot && Slot < 36;
|
||||
public bool IsValid => Slot > -1 && (Box > -1 || IsParty);
|
||||
}
|
||||
|
||||
public bool SameBox => Source.Box > -1 && Source.Box == Destination.Box;
|
||||
public bool SameSlot => Source.Slot == Destination.Slot && Source.Box == Destination.Box;
|
||||
|
||||
// PKM Get Set
|
||||
public PKM GetPKM(bool src)
|
||||
{
|
||||
var slot = src ? Source : Destination;
|
||||
int o = slot.Offset;
|
||||
return slot.IsParty ? SAV.getPartySlot(o) : SAV.getStoredSlot(o);
|
||||
}
|
||||
public void SetPKM(PKM pk, bool src)
|
||||
{
|
||||
var slot = src ? Source : Destination;
|
||||
int o = slot.Offset;
|
||||
if (!slot.IsParty)
|
||||
{ SAV.setStoredSlot(pk, o); return; }
|
||||
|
||||
if (src)
|
||||
{
|
||||
if (pk.Species == 0) // Empty Slot
|
||||
{
|
||||
SAV.deletePartySlot(Source.Slot - 30);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (30 + SAV.PartyCount < slot.Slot)
|
||||
{
|
||||
o = SAV.getPartyOffset(SAV.PartyCount);
|
||||
slot.Slot = 30 + SAV.PartyCount;
|
||||
}
|
||||
}
|
||||
|
||||
if (pk.Stat_HPMax == 0) // Without Stats (Box)
|
||||
{
|
||||
pk.setStats(pk.getStats(SAV.Personal.getFormeEntry(pk.Species, pk.AltForm)));
|
||||
pk.Stat_Level = pk.CurrentLevel;
|
||||
}
|
||||
SAV.setPartySlot(pk, o);
|
||||
}
|
||||
|
||||
public bool? WasDragParticipant(object form, int index)
|
||||
{
|
||||
if (Destination.Box != index && Source.Box != index)
|
||||
return null; // form was not watching box
|
||||
return Source.Parent == form || Destination.Parent == form; // form already updated?
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
LeftMouseIsDown = RightMouseIsDown = DragDropInProgress = false;
|
||||
Cursor = CurrentPath = null;
|
||||
Source = new DragLocation();
|
||||
Destination = new DragLocation();
|
||||
}
|
||||
}
|
||||
}
|
6059
PKHeX.WinForms/MainWindow/Main.Designer.cs
generated
6059
PKHeX.WinForms/MainWindow/Main.Designer.cs
generated
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,477 +0,0 @@
|
|||
using System;
|
||||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.WinForms
|
||||
{
|
||||
public partial class Main
|
||||
{
|
||||
// Main Series
|
||||
private void populateFieldsPK4()
|
||||
{
|
||||
PK4 pk4 = pkm as PK4;
|
||||
if (pk4 == null)
|
||||
return;
|
||||
|
||||
// Do first
|
||||
pk4.Stat_Level = PKX.getLevel(pk4.Species, pk4.EXP);
|
||||
if (pk4.Stat_Level == 100 && !HaX)
|
||||
pk4.EXP = PKX.getEXP(pk4.Stat_Level, pk4.Species);
|
||||
|
||||
CB_Species.SelectedValue = pk4.Species;
|
||||
TB_Level.Text = pk4.Stat_Level.ToString();
|
||||
TB_EXP.Text = pk4.EXP.ToString();
|
||||
|
||||
// Load rest
|
||||
CHK_Fateful.Checked = pk4.FatefulEncounter;
|
||||
CHK_IsEgg.Checked = pk4.IsEgg;
|
||||
CHK_Nicknamed.Checked = pk4.IsNicknamed;
|
||||
Label_OTGender.Text = gendersymbols[pk4.OT_Gender];
|
||||
Label_OTGender.ForeColor = getGenderColor(pk4.OT_Gender);
|
||||
TB_PID.Text = pk4.PID.ToString("X8");
|
||||
CB_HeldItem.SelectedValue = pk4.HeldItem;
|
||||
CB_Nature.SelectedValue = pk4.Nature;
|
||||
TB_TID.Text = pk4.TID.ToString("00000");
|
||||
TB_SID.Text = pk4.SID.ToString("00000");
|
||||
TB_Nickname.Text = pk4.Nickname;
|
||||
TB_OT.Text = pk4.OT_Name;
|
||||
TB_Friendship.Text = pk4.CurrentFriendship.ToString();
|
||||
GB_OT.BackgroundImage = null;
|
||||
CB_Language.SelectedValue = pk4.Language;
|
||||
CB_GameOrigin.SelectedValue = pk4.Version;
|
||||
CB_EncounterType.SelectedValue = pk4.Gen4 ? pk4.EncounterType : 0;
|
||||
CB_Ball.SelectedValue = pk4.Ball;
|
||||
|
||||
CAL_MetDate.Value = pk4.MetDate ?? new DateTime(2000, 1, 1);
|
||||
|
||||
if (pk4.Egg_Location != 0)
|
||||
{
|
||||
// Was obtained initially as an egg.
|
||||
CHK_AsEgg.Checked = true;
|
||||
GB_EggConditions.Enabled = true;
|
||||
|
||||
CB_EggLocation.SelectedValue = pk4.Egg_Location;
|
||||
CAL_EggDate.Value = pk4.EggMetDate ?? new DateTime(2000, 1, 1);
|
||||
}
|
||||
else { CAL_EggDate.Value = new DateTime(2000, 01, 01); CHK_AsEgg.Checked = GB_EggConditions.Enabled = false; CB_EggLocation.SelectedValue = 0; }
|
||||
|
||||
CB_MetLocation.SelectedValue = pk4.Met_Location;
|
||||
|
||||
TB_MetLevel.Text = pk4.Met_Level.ToString();
|
||||
|
||||
// Reset Label and ComboBox visibility, as well as non-data checked status.
|
||||
Label_PKRS.Visible = CB_PKRSStrain.Visible = CHK_Infected.Checked = pk4.PKRS_Strain != 0;
|
||||
Label_PKRSdays.Visible = CB_PKRSDays.Visible = pk4.PKRS_Days != 0;
|
||||
|
||||
// Set SelectedIndexes for PKRS
|
||||
CB_PKRSStrain.SelectedIndex = pk4.PKRS_Strain;
|
||||
CHK_Cured.Checked = pk4.PKRS_Strain > 0 && pk4.PKRS_Days == 0;
|
||||
CB_PKRSDays.SelectedIndex = Math.Min(CB_PKRSDays.Items.Count - 1, pk4.PKRS_Days); // to strip out bad hacked 'rus
|
||||
|
||||
TB_Cool.Text = pk4.CNT_Cool.ToString();
|
||||
TB_Beauty.Text = pk4.CNT_Beauty.ToString();
|
||||
TB_Cute.Text = pk4.CNT_Cute.ToString();
|
||||
TB_Smart.Text = pk4.CNT_Smart.ToString();
|
||||
TB_Tough.Text = pk4.CNT_Tough.ToString();
|
||||
TB_Sheen.Text = pk4.CNT_Sheen.ToString();
|
||||
|
||||
TB_HPIV.Text = pk4.IV_HP.ToString();
|
||||
TB_ATKIV.Text = pk4.IV_ATK.ToString();
|
||||
TB_DEFIV.Text = pk4.IV_DEF.ToString();
|
||||
TB_SPEIV.Text = pk4.IV_SPE.ToString();
|
||||
TB_SPAIV.Text = pk4.IV_SPA.ToString();
|
||||
TB_SPDIV.Text = pk4.IV_SPD.ToString();
|
||||
CB_HPType.SelectedValue = pk4.HPType;
|
||||
|
||||
TB_HPEV.Text = pk4.EV_HP.ToString();
|
||||
TB_ATKEV.Text = pk4.EV_ATK.ToString();
|
||||
TB_DEFEV.Text = pk4.EV_DEF.ToString();
|
||||
TB_SPEEV.Text = pk4.EV_SPE.ToString();
|
||||
TB_SPAEV.Text = pk4.EV_SPA.ToString();
|
||||
TB_SPDEV.Text = pk4.EV_SPD.ToString();
|
||||
|
||||
CB_Move1.SelectedValue = pk4.Move1;
|
||||
CB_Move2.SelectedValue = pk4.Move2;
|
||||
CB_Move3.SelectedValue = pk4.Move3;
|
||||
CB_Move4.SelectedValue = pk4.Move4;
|
||||
CB_PPu1.SelectedIndex = pk4.Move1_PPUps;
|
||||
CB_PPu2.SelectedIndex = pk4.Move2_PPUps;
|
||||
CB_PPu3.SelectedIndex = pk4.Move3_PPUps;
|
||||
CB_PPu4.SelectedIndex = pk4.Move4_PPUps;
|
||||
TB_PP1.Text = pk4.Move1_PP.ToString();
|
||||
TB_PP2.Text = pk4.Move2_PP.ToString();
|
||||
TB_PP3.Text = pk4.Move3_PP.ToString();
|
||||
TB_PP4.Text = pk4.Move4_PP.ToString();
|
||||
|
||||
// Set Form if count is enough, else cap.
|
||||
CB_Form.SelectedIndex = CB_Form.Items.Count > pk4.AltForm ? pk4.AltForm : CB_Form.Items.Count - 1;
|
||||
|
||||
// Load Extrabyte Value
|
||||
TB_ExtraByte.Text = pk4.Data[Convert.ToInt32(CB_ExtraBytes.Text, 16)].ToString();
|
||||
|
||||
updateStats();
|
||||
|
||||
TB_EXP.Text = pk4.EXP.ToString();
|
||||
Label_Gender.Text = gendersymbols[pk4.Gender];
|
||||
Label_Gender.ForeColor = getGenderColor(pk4.Gender);
|
||||
|
||||
if (HaX)
|
||||
DEV_Ability.SelectedValue = pk4.Ability;
|
||||
else
|
||||
{
|
||||
int[] abils = SAV.Personal.getAbilities(pk4.Species, pk4.AltForm);
|
||||
int abil = Array.IndexOf(abils, pk4.Ability);
|
||||
|
||||
if (abil < 0)
|
||||
CB_Ability.SelectedIndex = 0;
|
||||
else if (abils[0] == abils[1] || abils[1] == 0)
|
||||
CB_Ability.SelectedIndex = pk4.PIDAbility;
|
||||
else
|
||||
CB_Ability.SelectedIndex = abil >= CB_Ability.Items.Count ? 0 : abil;
|
||||
}
|
||||
}
|
||||
private PKM preparePK4()
|
||||
{
|
||||
PK4 pk4 = pkm as PK4;
|
||||
if (pk4 == null)
|
||||
return null;
|
||||
|
||||
pk4.Species = WinFormsUtil.getIndex(CB_Species);
|
||||
pk4.HeldItem = WinFormsUtil.getIndex(CB_HeldItem);
|
||||
pk4.TID = Util.ToInt32(TB_TID.Text);
|
||||
pk4.SID = Util.ToInt32(TB_SID.Text);
|
||||
pk4.EXP = Util.ToUInt32(TB_EXP.Text);
|
||||
pk4.PID = Util.getHEXval(TB_PID.Text);
|
||||
|
||||
if (CB_Ability.Text.Length >= 4)
|
||||
{
|
||||
pk4.Ability = (byte)Array.IndexOf(GameInfo.Strings.abilitylist, CB_Ability.Text.Remove(CB_Ability.Text.Length - 4));
|
||||
}
|
||||
|
||||
pk4.FatefulEncounter = CHK_Fateful.Checked;
|
||||
pk4.Gender = PKX.getGender(Label_Gender.Text);
|
||||
pk4.AltForm = (MT_Form.Enabled ? Convert.ToInt32(MT_Form.Text) : CB_Form.Enabled ? CB_Form.SelectedIndex : 0) & 0x1F;
|
||||
pk4.EV_HP = Util.ToInt32(TB_HPEV.Text);
|
||||
pk4.EV_ATK = Util.ToInt32(TB_ATKEV.Text);
|
||||
pk4.EV_DEF = Util.ToInt32(TB_DEFEV.Text);
|
||||
pk4.EV_SPE = Util.ToInt32(TB_SPEEV.Text);
|
||||
pk4.EV_SPA = Util.ToInt32(TB_SPAEV.Text);
|
||||
pk4.EV_SPD = Util.ToInt32(TB_SPDEV.Text);
|
||||
|
||||
pk4.CNT_Cool = Util.ToInt32(TB_Cool.Text);
|
||||
pk4.CNT_Beauty = Util.ToInt32(TB_Beauty.Text);
|
||||
pk4.CNT_Cute = Util.ToInt32(TB_Cute.Text);
|
||||
pk4.CNT_Smart = Util.ToInt32(TB_Smart.Text);
|
||||
pk4.CNT_Tough = Util.ToInt32(TB_Tough.Text);
|
||||
pk4.CNT_Sheen = Util.ToInt32(TB_Sheen.Text);
|
||||
|
||||
pk4.PKRS_Days = CB_PKRSDays.SelectedIndex;
|
||||
pk4.PKRS_Strain = CB_PKRSStrain.SelectedIndex;
|
||||
pk4.Nickname = TB_Nickname.Text;
|
||||
pk4.Move1 = WinFormsUtil.getIndex(CB_Move1);
|
||||
pk4.Move2 = WinFormsUtil.getIndex(CB_Move2);
|
||||
pk4.Move3 = WinFormsUtil.getIndex(CB_Move3);
|
||||
pk4.Move4 = WinFormsUtil.getIndex(CB_Move4);
|
||||
pk4.Move1_PP = WinFormsUtil.getIndex(CB_Move1) > 0 ? Util.ToInt32(TB_PP1.Text) : 0;
|
||||
pk4.Move2_PP = WinFormsUtil.getIndex(CB_Move2) > 0 ? Util.ToInt32(TB_PP2.Text) : 0;
|
||||
pk4.Move3_PP = WinFormsUtil.getIndex(CB_Move3) > 0 ? Util.ToInt32(TB_PP3.Text) : 0;
|
||||
pk4.Move4_PP = WinFormsUtil.getIndex(CB_Move4) > 0 ? Util.ToInt32(TB_PP4.Text) : 0;
|
||||
pk4.Move1_PPUps = WinFormsUtil.getIndex(CB_Move1) > 0 ? CB_PPu1.SelectedIndex : 0;
|
||||
pk4.Move2_PPUps = WinFormsUtil.getIndex(CB_Move2) > 0 ? CB_PPu2.SelectedIndex : 0;
|
||||
pk4.Move3_PPUps = WinFormsUtil.getIndex(CB_Move3) > 0 ? CB_PPu3.SelectedIndex : 0;
|
||||
pk4.Move4_PPUps = WinFormsUtil.getIndex(CB_Move4) > 0 ? CB_PPu4.SelectedIndex : 0;
|
||||
|
||||
pk4.IV_HP = Util.ToInt32(TB_HPIV.Text);
|
||||
pk4.IV_ATK = Util.ToInt32(TB_ATKIV.Text);
|
||||
pk4.IV_DEF = Util.ToInt32(TB_DEFIV.Text);
|
||||
pk4.IV_SPE = Util.ToInt32(TB_SPEIV.Text);
|
||||
pk4.IV_SPA = Util.ToInt32(TB_SPAIV.Text);
|
||||
pk4.IV_SPD = Util.ToInt32(TB_SPDIV.Text);
|
||||
pk4.IsEgg = CHK_IsEgg.Checked;
|
||||
pk4.IsNicknamed = CHK_Nicknamed.Checked;
|
||||
|
||||
pk4.OT_Name = TB_OT.Text;
|
||||
pk4.CurrentFriendship = Util.ToInt32(TB_Friendship.Text);
|
||||
|
||||
pk4.Ball = WinFormsUtil.getIndex(CB_Ball);
|
||||
pk4.Met_Level = Util.ToInt32(TB_MetLevel.Text);
|
||||
pk4.OT_Gender = PKX.getGender(Label_OTGender.Text);
|
||||
pk4.EncounterType = WinFormsUtil.getIndex(CB_EncounterType);
|
||||
pk4.Version = WinFormsUtil.getIndex(CB_GameOrigin);
|
||||
pk4.Language = WinFormsUtil.getIndex(CB_Language);
|
||||
|
||||
// Default Dates
|
||||
DateTime? egg_date = null;
|
||||
int egg_location = 0;
|
||||
if (CHK_AsEgg.Checked) // If encountered as an egg, load the Egg Met data from fields.
|
||||
{
|
||||
egg_date = CAL_EggDate.Value;
|
||||
egg_location = WinFormsUtil.getIndex(CB_EggLocation);
|
||||
}
|
||||
// Egg Met Data
|
||||
pk4.EggMetDate = egg_date;
|
||||
pk4.Egg_Location = egg_location;
|
||||
// Met Data
|
||||
pk4.MetDate = CAL_MetDate.Value;
|
||||
pk4.Met_Location = WinFormsUtil.getIndex(CB_MetLocation);
|
||||
|
||||
if (pk4.IsEgg && pk4.Met_Location == 0) // If still an egg, it has no hatch location/date. Zero it!
|
||||
pk4.MetDate = null;
|
||||
|
||||
// Toss in Party Stats
|
||||
Array.Resize(ref pk4.Data, pk4.SIZE_PARTY);
|
||||
pk4.Stat_Level = Util.ToInt32(TB_Level.Text);
|
||||
pk4.Stat_HPCurrent = Util.ToInt32(Stat_HP.Text);
|
||||
pk4.Stat_HPMax = Util.ToInt32(Stat_HP.Text);
|
||||
pk4.Stat_ATK = Util.ToInt32(Stat_ATK.Text);
|
||||
pk4.Stat_DEF = Util.ToInt32(Stat_DEF.Text);
|
||||
pk4.Stat_SPE = Util.ToInt32(Stat_SPE.Text);
|
||||
pk4.Stat_SPA = Util.ToInt32(Stat_SPA.Text);
|
||||
pk4.Stat_SPD = Util.ToInt32(Stat_SPD.Text);
|
||||
|
||||
if (HaX)
|
||||
{
|
||||
pk4.Ability = (byte)WinFormsUtil.getIndex(DEV_Ability);
|
||||
pk4.Stat_Level = (byte)Math.Min(Convert.ToInt32(MT_Level.Text), byte.MaxValue);
|
||||
}
|
||||
|
||||
// Fix Moves if a slot is empty
|
||||
pk4.FixMoves();
|
||||
|
||||
pk4.RefreshChecksum();
|
||||
return pk4;
|
||||
}
|
||||
|
||||
// Battle Revolution
|
||||
private void populateFieldsBK4()
|
||||
{
|
||||
BK4 pk4 = pkm as BK4;
|
||||
if (pk4 == null)
|
||||
return;
|
||||
|
||||
// Do first
|
||||
pk4.Stat_Level = PKX.getLevel(pk4.Species, pk4.EXP);
|
||||
if (pk4.Stat_Level == 100)
|
||||
pk4.EXP = PKX.getEXP(pk4.Stat_Level, pk4.Species);
|
||||
|
||||
CB_Species.SelectedValue = pk4.Species;
|
||||
TB_Level.Text = pk4.Stat_Level.ToString();
|
||||
TB_EXP.Text = pk4.EXP.ToString();
|
||||
|
||||
// Load rest
|
||||
CHK_Fateful.Checked = pk4.FatefulEncounter;
|
||||
CHK_IsEgg.Checked = pk4.IsEgg;
|
||||
CHK_Nicknamed.Checked = pk4.IsNicknamed;
|
||||
Label_OTGender.Text = gendersymbols[pk4.OT_Gender];
|
||||
Label_OTGender.ForeColor = getGenderColor(pk4.OT_Gender);
|
||||
TB_PID.Text = pk4.PID.ToString("X8");
|
||||
CB_HeldItem.SelectedValue = pk4.HeldItem;
|
||||
setAbilityList();
|
||||
CB_Nature.SelectedValue = pk4.Nature;
|
||||
TB_TID.Text = pk4.TID.ToString("00000");
|
||||
TB_SID.Text = pk4.SID.ToString("00000");
|
||||
TB_Nickname.Text = pk4.Nickname;
|
||||
TB_OT.Text = pk4.OT_Name;
|
||||
TB_Friendship.Text = pk4.CurrentFriendship.ToString();
|
||||
GB_OT.BackgroundImage = null;
|
||||
CB_Language.SelectedValue = pk4.Language;
|
||||
CB_GameOrigin.SelectedValue = pk4.Version;
|
||||
CB_EncounterType.SelectedValue = pk4.Gen4 ? pk4.EncounterType : 0;
|
||||
CB_Ball.SelectedValue = pk4.Ball;
|
||||
|
||||
CAL_MetDate.Value = pk4.MetDate ?? new DateTime(2000, 1, 1);
|
||||
|
||||
if (pk4.Egg_Location != 0)
|
||||
{
|
||||
// Was obtained initially as an egg.
|
||||
CHK_AsEgg.Checked = true;
|
||||
GB_EggConditions.Enabled = true;
|
||||
|
||||
CB_EggLocation.SelectedValue = pk4.Egg_Location;
|
||||
CAL_EggDate.Value = pk4.EggMetDate ?? new DateTime(2000, 1, 1);
|
||||
}
|
||||
else { CAL_EggDate.Value = new DateTime(2000, 01, 01); CHK_AsEgg.Checked = GB_EggConditions.Enabled = false; CB_EggLocation.SelectedValue = 0; }
|
||||
|
||||
CB_MetLocation.SelectedValue = pk4.Met_Location;
|
||||
|
||||
TB_MetLevel.Text = pk4.Met_Level.ToString();
|
||||
|
||||
// Reset Label and ComboBox visibility, as well as non-data checked status.
|
||||
Label_PKRS.Visible = CB_PKRSStrain.Visible = CHK_Infected.Checked = pk4.PKRS_Strain != 0;
|
||||
Label_PKRSdays.Visible = CB_PKRSDays.Visible = pk4.PKRS_Days != 0;
|
||||
|
||||
// Set SelectedIndexes for PKRS
|
||||
CB_PKRSStrain.SelectedIndex = pk4.PKRS_Strain;
|
||||
CHK_Cured.Checked = pk4.PKRS_Strain > 0 && pk4.PKRS_Days == 0;
|
||||
CB_PKRSDays.SelectedIndex = Math.Min(CB_PKRSDays.Items.Count - 1, pk4.PKRS_Days); // to strip out bad hacked 'rus
|
||||
|
||||
TB_Cool.Text = pk4.CNT_Cool.ToString();
|
||||
TB_Beauty.Text = pk4.CNT_Beauty.ToString();
|
||||
TB_Cute.Text = pk4.CNT_Cute.ToString();
|
||||
TB_Smart.Text = pk4.CNT_Smart.ToString();
|
||||
TB_Tough.Text = pk4.CNT_Tough.ToString();
|
||||
TB_Sheen.Text = pk4.CNT_Sheen.ToString();
|
||||
|
||||
TB_HPIV.Text = pk4.IV_HP.ToString();
|
||||
TB_ATKIV.Text = pk4.IV_ATK.ToString();
|
||||
TB_DEFIV.Text = pk4.IV_DEF.ToString();
|
||||
TB_SPEIV.Text = pk4.IV_SPE.ToString();
|
||||
TB_SPAIV.Text = pk4.IV_SPA.ToString();
|
||||
TB_SPDIV.Text = pk4.IV_SPD.ToString();
|
||||
CB_HPType.SelectedValue = pk4.HPType;
|
||||
|
||||
TB_HPEV.Text = pk4.EV_HP.ToString();
|
||||
TB_ATKEV.Text = pk4.EV_ATK.ToString();
|
||||
TB_DEFEV.Text = pk4.EV_DEF.ToString();
|
||||
TB_SPEEV.Text = pk4.EV_SPE.ToString();
|
||||
TB_SPAEV.Text = pk4.EV_SPA.ToString();
|
||||
TB_SPDEV.Text = pk4.EV_SPD.ToString();
|
||||
|
||||
CB_Move1.SelectedValue = pk4.Move1;
|
||||
CB_Move2.SelectedValue = pk4.Move2;
|
||||
CB_Move3.SelectedValue = pk4.Move3;
|
||||
CB_Move4.SelectedValue = pk4.Move4;
|
||||
CB_PPu1.SelectedIndex = pk4.Move1_PPUps;
|
||||
CB_PPu2.SelectedIndex = pk4.Move2_PPUps;
|
||||
CB_PPu3.SelectedIndex = pk4.Move3_PPUps;
|
||||
CB_PPu4.SelectedIndex = pk4.Move4_PPUps;
|
||||
TB_PP1.Text = pk4.Move1_PP.ToString();
|
||||
TB_PP2.Text = pk4.Move2_PP.ToString();
|
||||
TB_PP3.Text = pk4.Move3_PP.ToString();
|
||||
TB_PP4.Text = pk4.Move4_PP.ToString();
|
||||
|
||||
// Set Form if count is enough, else cap.
|
||||
CB_Form.SelectedIndex = CB_Form.Items.Count > pk4.AltForm ? pk4.AltForm : CB_Form.Items.Count - 1;
|
||||
|
||||
// Load Extrabyte Value
|
||||
TB_ExtraByte.Text = pk4.Data[Convert.ToInt32(CB_ExtraBytes.Text, 16)].ToString();
|
||||
|
||||
updateStats();
|
||||
|
||||
TB_EXP.Text = pk4.EXP.ToString();
|
||||
Label_Gender.Text = gendersymbols[pk4.Gender];
|
||||
Label_Gender.ForeColor = getGenderColor(pk4.Gender);
|
||||
|
||||
if (HaX)
|
||||
DEV_Ability.SelectedValue = pk4.Ability;
|
||||
else
|
||||
{
|
||||
int[] abils = SAV.Personal.getAbilities(pk4.Species, pk4.AltForm);
|
||||
int abil = Array.IndexOf(abils, pk4.Ability);
|
||||
|
||||
if (abil < 0)
|
||||
CB_Ability.SelectedIndex = 0;
|
||||
else if (abils[0] == abils[1] || abils[1] == 0)
|
||||
CB_Ability.SelectedIndex = pk4.PIDAbility;
|
||||
else
|
||||
CB_Ability.SelectedIndex = abil >= CB_Ability.Items.Count ? 0 : abil;
|
||||
}
|
||||
}
|
||||
private PKM prepareBK4()
|
||||
{
|
||||
BK4 pk4 = pkm as BK4;
|
||||
if (pk4 == null)
|
||||
return null;
|
||||
|
||||
pk4.Species = WinFormsUtil.getIndex(CB_Species);
|
||||
pk4.HeldItem = WinFormsUtil.getIndex(CB_HeldItem);
|
||||
pk4.TID = Util.ToInt32(TB_TID.Text);
|
||||
pk4.SID = Util.ToInt32(TB_SID.Text);
|
||||
pk4.EXP = Util.ToUInt32(TB_EXP.Text);
|
||||
pk4.PID = Util.getHEXval(TB_PID.Text);
|
||||
pk4.Ability = (byte)Array.IndexOf(GameInfo.Strings.abilitylist, CB_Ability.Text.Remove(CB_Ability.Text.Length - 4));
|
||||
|
||||
pk4.FatefulEncounter = CHK_Fateful.Checked;
|
||||
pk4.Gender = PKX.getGender(Label_Gender.Text);
|
||||
pk4.AltForm = (MT_Form.Enabled ? Convert.ToInt32(MT_Form.Text) : CB_Form.Enabled ? CB_Form.SelectedIndex : 0) & 0x1F;
|
||||
pk4.EV_HP = Util.ToInt32(TB_HPEV.Text);
|
||||
pk4.EV_ATK = Util.ToInt32(TB_ATKEV.Text);
|
||||
pk4.EV_DEF = Util.ToInt32(TB_DEFEV.Text);
|
||||
pk4.EV_SPE = Util.ToInt32(TB_SPEEV.Text);
|
||||
pk4.EV_SPA = Util.ToInt32(TB_SPAEV.Text);
|
||||
pk4.EV_SPD = Util.ToInt32(TB_SPDEV.Text);
|
||||
|
||||
pk4.CNT_Cool = Util.ToInt32(TB_Cool.Text);
|
||||
pk4.CNT_Beauty = Util.ToInt32(TB_Beauty.Text);
|
||||
pk4.CNT_Cute = Util.ToInt32(TB_Cute.Text);
|
||||
pk4.CNT_Smart = Util.ToInt32(TB_Smart.Text);
|
||||
pk4.CNT_Tough = Util.ToInt32(TB_Tough.Text);
|
||||
pk4.CNT_Sheen = Util.ToInt32(TB_Sheen.Text);
|
||||
|
||||
pk4.PKRS_Days = CB_PKRSDays.SelectedIndex;
|
||||
pk4.PKRS_Strain = CB_PKRSStrain.SelectedIndex;
|
||||
pk4.Nickname = TB_Nickname.Text;
|
||||
pk4.Move1 = WinFormsUtil.getIndex(CB_Move1);
|
||||
pk4.Move2 = WinFormsUtil.getIndex(CB_Move2);
|
||||
pk4.Move3 = WinFormsUtil.getIndex(CB_Move3);
|
||||
pk4.Move4 = WinFormsUtil.getIndex(CB_Move4);
|
||||
pk4.Move1_PP = WinFormsUtil.getIndex(CB_Move1) > 0 ? Util.ToInt32(TB_PP1.Text) : 0;
|
||||
pk4.Move2_PP = WinFormsUtil.getIndex(CB_Move2) > 0 ? Util.ToInt32(TB_PP2.Text) : 0;
|
||||
pk4.Move3_PP = WinFormsUtil.getIndex(CB_Move3) > 0 ? Util.ToInt32(TB_PP3.Text) : 0;
|
||||
pk4.Move4_PP = WinFormsUtil.getIndex(CB_Move4) > 0 ? Util.ToInt32(TB_PP4.Text) : 0;
|
||||
pk4.Move1_PPUps = WinFormsUtil.getIndex(CB_Move1) > 0 ? CB_PPu1.SelectedIndex : 0;
|
||||
pk4.Move2_PPUps = WinFormsUtil.getIndex(CB_Move2) > 0 ? CB_PPu2.SelectedIndex : 0;
|
||||
pk4.Move3_PPUps = WinFormsUtil.getIndex(CB_Move3) > 0 ? CB_PPu3.SelectedIndex : 0;
|
||||
pk4.Move4_PPUps = WinFormsUtil.getIndex(CB_Move4) > 0 ? CB_PPu4.SelectedIndex : 0;
|
||||
|
||||
pk4.IV_HP = Util.ToInt32(TB_HPIV.Text);
|
||||
pk4.IV_ATK = Util.ToInt32(TB_ATKIV.Text);
|
||||
pk4.IV_DEF = Util.ToInt32(TB_DEFIV.Text);
|
||||
pk4.IV_SPE = Util.ToInt32(TB_SPEIV.Text);
|
||||
pk4.IV_SPA = Util.ToInt32(TB_SPAIV.Text);
|
||||
pk4.IV_SPD = Util.ToInt32(TB_SPDIV.Text);
|
||||
pk4.IsEgg = CHK_IsEgg.Checked;
|
||||
pk4.IsNicknamed = CHK_Nicknamed.Checked;
|
||||
|
||||
pk4.OT_Name = TB_OT.Text;
|
||||
pk4.CurrentFriendship = Util.ToInt32(TB_Friendship.Text);
|
||||
|
||||
pk4.Ball = WinFormsUtil.getIndex(CB_Ball);
|
||||
pk4.Met_Level = Util.ToInt32(TB_MetLevel.Text);
|
||||
pk4.OT_Gender = PKX.getGender(Label_OTGender.Text);
|
||||
pk4.EncounterType = WinFormsUtil.getIndex(CB_EncounterType);
|
||||
pk4.Version = WinFormsUtil.getIndex(CB_GameOrigin);
|
||||
pk4.Language = WinFormsUtil.getIndex(CB_Language);
|
||||
|
||||
// Default Dates
|
||||
DateTime? egg_date = null;
|
||||
int egg_location = 0;
|
||||
if (CHK_AsEgg.Checked) // If encountered as an egg, load the Egg Met data from fields.
|
||||
{
|
||||
egg_date = CAL_EggDate.Value;
|
||||
egg_location = WinFormsUtil.getIndex(CB_EggLocation);
|
||||
}
|
||||
// Egg Met Data
|
||||
pk4.EggMetDate = egg_date;
|
||||
pk4.Egg_Location = egg_location;
|
||||
// Met Data
|
||||
pk4.MetDate = CAL_MetDate.Value;
|
||||
pk4.Met_Location = WinFormsUtil.getIndex(CB_MetLocation);
|
||||
|
||||
if (pk4.IsEgg && pk4.Met_Location == 0) // If still an egg, it has no hatch location/date. Zero it!
|
||||
pk4.MetDate = null;
|
||||
|
||||
// Toss in Party Stats
|
||||
Array.Resize(ref pk4.Data, pk4.SIZE_PARTY);
|
||||
pk4.Stat_Level = Util.ToInt32(TB_Level.Text);
|
||||
pk4.Stat_HPCurrent = Util.ToInt32(Stat_HP.Text);
|
||||
pk4.Stat_HPMax = Util.ToInt32(Stat_HP.Text);
|
||||
pk4.Stat_ATK = Util.ToInt32(Stat_ATK.Text);
|
||||
pk4.Stat_DEF = Util.ToInt32(Stat_DEF.Text);
|
||||
pk4.Stat_SPE = Util.ToInt32(Stat_SPE.Text);
|
||||
pk4.Stat_SPA = Util.ToInt32(Stat_SPA.Text);
|
||||
pk4.Stat_SPD = Util.ToInt32(Stat_SPD.Text);
|
||||
|
||||
if (HaX)
|
||||
{
|
||||
pk4.Ability = (byte)WinFormsUtil.getIndex(DEV_Ability);
|
||||
pk4.Stat_Level = (byte)Math.Min(Convert.ToInt32(MT_Level.Text), byte.MaxValue);
|
||||
}
|
||||
|
||||
// Fix Moves if a slot is empty
|
||||
pk4.FixMoves();
|
||||
|
||||
pk4.RefreshChecksum();
|
||||
return pk4;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
namespace PKHeX.WinForms
|
||||
{
|
||||
public class SlotChange
|
||||
{
|
||||
public int Box;
|
||||
public int Slot;
|
||||
public int Offset;
|
||||
public object OriginalData;
|
||||
}
|
||||
}
|
|
@ -165,41 +165,72 @@
|
|||
<Reference Include="System.Deployment" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MainWindow\DragDropManager.cs" />
|
||||
<Compile Include="Controls\SAV Editor\BoxEditor.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\SAV Editor\BoxEditor.Designer.cs">
|
||||
<DependentUpon>BoxEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\PKM Editor\ContextMenuPKM.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\PKM Editor\ContextMenuPKM.Designer.cs">
|
||||
<DependentUpon>ContextMenuPKM.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\SAV Editor\ContextMenuSAV.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\SAV Editor\ContextMenuSAV.Designer.cs">
|
||||
<DependentUpon>ContextMenuSAV.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\SAV Editor\SlotChangeManager.cs" />
|
||||
<Compile Include="Controls\SAV Editor\SAVEditor.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\SAV Editor\SAVEditor.Designer.cs">
|
||||
<DependentUpon>SAVEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\SAV Editor\SlotChangeInfo.cs" />
|
||||
<Compile Include="MainWindow\Main.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow\Main.Designer.cs">
|
||||
<DependentUpon>Main.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow\MainCK3.cs">
|
||||
<SubType>Form</SubType>
|
||||
<Compile Include="Controls\PKM Editor\EditCK3.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow\MainPK1.cs">
|
||||
<SubType>Form</SubType>
|
||||
<Compile Include="Controls\PKM Editor\EditPK1.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow\MainPK2.cs">
|
||||
<SubType>Form</SubType>
|
||||
<Compile Include="Controls\PKM Editor\EditPK2.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow\MainPK3.cs">
|
||||
<SubType>Form</SubType>
|
||||
<Compile Include="Controls\PKM Editor\EditPK3.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow\MainPK4.cs">
|
||||
<SubType>Form</SubType>
|
||||
<Compile Include="Controls\PKM Editor\EditPK4.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow\MainPK5.cs">
|
||||
<SubType>Form</SubType>
|
||||
<Compile Include="Controls\PKM Editor\EditPK5.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow\MainPK6.cs">
|
||||
<SubType>Form</SubType>
|
||||
<Compile Include="Controls\PKM Editor\EditPK6.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow\MainPK7.cs">
|
||||
<SubType>Form</SubType>
|
||||
<Compile Include="Controls\PKM Editor\EditPK7.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow\MainXK3.cs">
|
||||
<SubType>Form</SubType>
|
||||
<Compile Include="Controls\PKM Editor\EditXK3.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\SAV Editor\SlotChange.cs" />
|
||||
<Compile Include="Controls\PKM Editor\PKMEditor.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\PKM Editor\PKMEditor.Designer.cs">
|
||||
<DependentUpon>PKMEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow\SlotChange.cs" />
|
||||
<Compile Include="Misc\About.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -492,10 +523,25 @@
|
|||
<Compile Include="Util\QRCoder\QRCodeGenerator.cs" />
|
||||
<Compile Include="Util\SAVUtil.cs" />
|
||||
<Compile Include="Util\WinFormsUtil.cs" />
|
||||
<EmbeddedResource Include="Controls\SAV Editor\BoxEditor.resx">
|
||||
<DependentUpon>BoxEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\PKM Editor\ContextMenuPKM.resx">
|
||||
<DependentUpon>ContextMenuPKM.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\SAV Editor\ContextMenuSAV.resx">
|
||||
<DependentUpon>ContextMenuSAV.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\SAV Editor\SAVEditor.resx">
|
||||
<DependentUpon>SAVEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainWindow\Main.resx">
|
||||
<DependentUpon>Main.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\PKM Editor\PKMEditor.resx">
|
||||
<DependentUpon>PKMEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Misc\About.resx">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
|
|
|
@ -10,20 +10,23 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class KChart : Form
|
||||
{
|
||||
private readonly SaveFile SAV;
|
||||
private readonly string[] species = GameInfo.Strings.specieslist;
|
||||
private readonly string[] abilities = GameInfo.Strings.abilitylist;
|
||||
|
||||
private readonly bool alolanOnly = Main.SAV.Generation == 7 && DialogResult.Yes == WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Alolan Dex only?");
|
||||
private readonly bool alolanOnly;
|
||||
private static int[] baseForm;
|
||||
private static int[] formVal;
|
||||
public KChart()
|
||||
public KChart(SaveFile sav)
|
||||
{
|
||||
SAV = sav;
|
||||
alolanOnly = SAV.Generation == 7 && DialogResult.Yes == WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Alolan Dex only?");
|
||||
InitializeComponent();
|
||||
|
||||
Array.Resize(ref species, Main.SAV.Personal.TableLength);
|
||||
Array.Resize(ref species, SAV.Personal.TableLength);
|
||||
|
||||
var AltForms = Main.SAV.Personal.getFormList(species, Main.SAV.MaxSpeciesID);
|
||||
species = Main.SAV.Personal.getPersonalEntryList(AltForms, species, Main.SAV.MaxSpeciesID, out baseForm, out formVal);
|
||||
var AltForms = SAV.Personal.getFormList(species, SAV.MaxSpeciesID);
|
||||
species = SAV.Personal.getPersonalEntryList(AltForms, species, SAV.MaxSpeciesID, out baseForm, out formVal);
|
||||
|
||||
DGV.Rows.Clear();
|
||||
for (int i = 1; i < species.Length; i++)
|
||||
|
@ -34,10 +37,10 @@ namespace PKHeX.WinForms
|
|||
|
||||
private void popEntry(int index)
|
||||
{
|
||||
var p = Main.SAV.Personal[index];
|
||||
var p = SAV.Personal[index];
|
||||
|
||||
int s = index > Main.SAV.MaxSpeciesID ? baseForm[index] : index;
|
||||
var f = index <= Main.SAV.MaxSpeciesID ? 0 : formVal[index];
|
||||
int s = index > SAV.MaxSpeciesID ? baseForm[index] : index;
|
||||
var f = index <= SAV.MaxSpeciesID ? 0 : formVal[index];
|
||||
bool alolan = s > 721 || Legal.PastGenAlolanNatives.Contains(s);
|
||||
|
||||
if (alolanOnly && !alolan)
|
||||
|
@ -48,7 +51,7 @@ namespace PKHeX.WinForms
|
|||
|
||||
int r = 0;
|
||||
row.Cells[r++].Value = s.ToString("000") + (f > 0 ? "-"+f.ToString("00") :"");
|
||||
row.Cells[r++].Value = PKMUtil.getSprite(s, f, 0, 0, false, false, Main.SAV.Generation);
|
||||
row.Cells[r++].Value = PKMUtil.getSprite(s, f, 0, 0, false, false, SAV.Generation);
|
||||
row.Cells[r++].Value = species[index];
|
||||
row.Cells[r++].Value = s > 721 || Legal.PastGenAlolanNatives.Contains(s);
|
||||
row.Cells[r].Style.BackColor = mapColor((int)((p.BST - 175) / 3f));
|
||||
|
|
|
@ -12,10 +12,12 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class BatchEditor : Form
|
||||
{
|
||||
public BatchEditor(PKM pk)
|
||||
private readonly SaveFile SAV;
|
||||
public BatchEditor(PKM pk, SaveFile sav)
|
||||
{
|
||||
InitializeComponent();
|
||||
pkmref = pk;
|
||||
SAV = sav;
|
||||
InitializeComponent();
|
||||
DragDrop += tabMain_DragDrop;
|
||||
DragEnter += tabMain_DragEnter;
|
||||
|
||||
|
@ -189,19 +191,19 @@ namespace PKHeX.WinForms
|
|||
len = err = ctr = 0;
|
||||
if (RB_SAV.Checked)
|
||||
{
|
||||
if (Main.SAV.HasParty)
|
||||
if (SAV.HasParty)
|
||||
{
|
||||
var data = Main.SAV.PartyData;
|
||||
var data = SAV.PartyData;
|
||||
setupProgressBar(data.Length);
|
||||
processSAV(data, Filters, Instructions);
|
||||
Main.SAV.PartyData = data;
|
||||
SAV.PartyData = data;
|
||||
}
|
||||
if (Main.SAV.HasBox)
|
||||
if (SAV.HasBox)
|
||||
{
|
||||
var data = Main.SAV.BoxData;
|
||||
var data = SAV.BoxData;
|
||||
setupProgressBar(data.Length);
|
||||
processSAV(data, Filters, Instructions);
|
||||
Main.SAV.BoxData = data;
|
||||
SAV.BoxData = data;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -264,7 +266,7 @@ namespace PKHeX.WinForms
|
|||
continue;
|
||||
}
|
||||
|
||||
int format = fi.Extension.Length > 0 ? (fi.Extension.Last() - 0x30) & 7 : Main.SAV.Generation;
|
||||
int format = fi.Extension.Length > 0 ? (fi.Extension.Last() - 0x30) & 7 : SAV.Generation;
|
||||
byte[] data = File.ReadAllBytes(file);
|
||||
var pkm = PKMConverter.getPKMfromBytes(data, prefer: format);
|
||||
if (processPKM(pkm, Filters, Instructions))
|
||||
|
@ -438,7 +440,7 @@ namespace PKHeX.WinForms
|
|||
continue;
|
||||
return ModifyResult.Filtered;
|
||||
}
|
||||
if (!pkm.HasProperty(cmd.PropertyName))
|
||||
if (!pkm.HasPropertyAll(typeof(PKM), cmd.PropertyName))
|
||||
return ModifyResult.Filtered;
|
||||
if (ReflectUtil.GetValueEquals(PKM, cmd.PropertyName, cmd.PropertyValue) != cmd.Evaluator)
|
||||
return ModifyResult.Filtered;
|
||||
|
|
|
@ -9,8 +9,9 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
private readonly string[] args = new string[5];
|
||||
private readonly string[] vartypes = new string[5];
|
||||
public MemoryAmie() // Keeping the form reference as a lot of control elements are required to operate.
|
||||
public MemoryAmie(PKM pk)
|
||||
{
|
||||
pkm = pk;
|
||||
InitializeComponent();
|
||||
cba = new[] { CB_Country0, CB_Country1, CB_Country2, CB_Country3, CB_Country4 };
|
||||
mta = new[] { CB_Region0, CB_Region1, CB_Region2, CB_Region3, CB_Region4, };
|
||||
|
@ -44,7 +45,7 @@ namespace PKHeX.WinForms
|
|||
private bool init;
|
||||
private readonly ComboBox[] cba;
|
||||
private readonly ComboBox[] mta;
|
||||
private readonly PKM pkm = Main.pkm;
|
||||
private readonly PKM pkm;
|
||||
|
||||
// Load/Save Actions
|
||||
private void loadFields()
|
||||
|
@ -167,8 +168,6 @@ namespace PKHeX.WinForms
|
|||
pkm.OT_TextVar = CB_OTVar.Enabled ? WinFormsUtil.getIndex(CB_OTVar) : 0;
|
||||
pkm.OT_Intensity = CB_OTFeel.Enabled ? CB_OTQual.SelectedIndex + 1 : 0;
|
||||
pkm.OT_Feeling = CB_OTFeel.Enabled ? CB_OTFeel.SelectedIndex : 0;
|
||||
|
||||
Main.pkm = pkm;
|
||||
}
|
||||
|
||||
// Event Actions
|
||||
|
@ -237,7 +236,7 @@ namespace PKHeX.WinForms
|
|||
vs = "";
|
||||
break;
|
||||
case "PKM":
|
||||
argvals = Util.getCBList(GameInfo.Strings.specieslist.Take(Main.SAV.MaxSpeciesID+1).ToArray(), null);
|
||||
argvals = Util.getCBList(GameInfo.Strings.specieslist.Take(pkm.MaxSpeciesID+1).ToArray(), null);
|
||||
vs = vartypes[0];
|
||||
break;
|
||||
case "GENLOC":
|
||||
|
|
|
@ -9,8 +9,9 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class RibbonEditor : Form
|
||||
{
|
||||
public RibbonEditor()
|
||||
public RibbonEditor(PKM pk)
|
||||
{
|
||||
pkm = pk;
|
||||
InitializeComponent();
|
||||
int vertScrollWidth = SystemInformation.VerticalScrollBarWidth;
|
||||
TLP_Ribbons.Padding = FLP_Ribbons.Padding = new Padding(0, 0, vertScrollWidth, 0);
|
||||
|
@ -25,7 +26,7 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
|
||||
private readonly List<RibbonInfo> riblist = new List<RibbonInfo>();
|
||||
private readonly PKM pkm = Main.pkm.Clone();
|
||||
private readonly PKM pkm;
|
||||
private const string PrefixNUD = "NUD_";
|
||||
private const string PrefixLabel = "L_";
|
||||
private const string PrefixCHK = "CHK_";
|
||||
|
@ -159,7 +160,6 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
foreach (var rib in riblist)
|
||||
ReflectUtil.SetValue(pkm, rib.Name, rib.RibbonCount < 0 ? rib.HasRibbon : (object) rib.RibbonCount);
|
||||
Main.pkm = pkm;
|
||||
}
|
||||
|
||||
private class RibbonInfo
|
||||
|
|
|
@ -8,8 +8,9 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SuperTrainingEditor : Form
|
||||
{
|
||||
public SuperTrainingEditor()
|
||||
public SuperTrainingEditor(PKM pk)
|
||||
{
|
||||
pkm = pk;
|
||||
InitializeComponent();
|
||||
int vertScrollWidth = SystemInformation.VerticalScrollBarWidth;
|
||||
TLP_SuperTrain.Padding = TLP_DistSuperTrain.Padding = new Padding(0, 0, vertScrollWidth, 0);
|
||||
|
@ -51,7 +52,7 @@ namespace PKHeX.WinForms
|
|||
|
||||
private readonly List<RegimenInfo> reglist = new List<RegimenInfo>();
|
||||
private readonly List<RegimenInfo> distlist = new List<RegimenInfo>();
|
||||
private readonly PKM pkm = Main.pkm.Clone();
|
||||
private readonly PKM pkm;
|
||||
private const string PrefixLabel = "L_";
|
||||
private const string PrefixCHK = "CHK_";
|
||||
|
||||
|
@ -126,8 +127,6 @@ namespace PKHeX.WinForms
|
|||
pkm.SecretSuperTrainingUnlocked &= CHK_SecretUnlocked.Checked;
|
||||
pkm.SecretSuperTrainingComplete &= CHK_SecretComplete.Checked;
|
||||
}
|
||||
|
||||
Main.pkm = pkm;
|
||||
}
|
||||
|
||||
private class RegimenInfo
|
||||
|
|
|
@ -9,9 +9,12 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class f2_Text : Form
|
||||
{
|
||||
public f2_Text(TextBoxBase TB_NN, byte[] raw)
|
||||
private readonly SaveFile SAV;
|
||||
public f2_Text(TextBoxBase TB_NN, byte[] raw, SaveFile sav)
|
||||
{
|
||||
SAV = sav;
|
||||
InitializeComponent();
|
||||
bigendian = new[] { GameVersion.COLO, GameVersion.XD, GameVersion.BATREV, }.Contains(SAV.Version);
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
|
||||
FinalString = TB_NN.Text;
|
||||
|
@ -47,7 +50,7 @@ namespace PKHeX.WinForms
|
|||
public byte[] FinalBytes { get; private set; }
|
||||
private readonly byte[] Raw;
|
||||
private bool editing;
|
||||
private readonly bool bigendian = new[] { GameVersion.COLO, GameVersion.XD, GameVersion.BATREV, }.Contains(Main.SAV.Version);
|
||||
private readonly bool bigendian;
|
||||
private void B_Cancel_Click(object sender, EventArgs e) => Close();
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -59,7 +62,7 @@ namespace PKHeX.WinForms
|
|||
|
||||
private void addCharEditing()
|
||||
{
|
||||
ushort[] chars = getChars(Main.SAV.Generation);
|
||||
ushort[] chars = getChars(SAV.Generation);
|
||||
if (chars.Length == 0)
|
||||
return;
|
||||
|
||||
|
@ -78,7 +81,7 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
FLP_Hex.Visible = true;
|
||||
GB_Trash.Visible = true;
|
||||
NUD_Generation.Value = Main.SAV.Generation;
|
||||
NUD_Generation.Value = SAV.Generation;
|
||||
Font courier = new Font("Courier New", 8);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
|
@ -110,7 +113,7 @@ namespace PKHeX.WinForms
|
|||
CB_Language.DisplayMember = "Text";
|
||||
CB_Language.ValueMember = "Value";
|
||||
var languages = Util.getUnsortedCBList("languages");
|
||||
if (Main.SAV.Generation < 7)
|
||||
if (SAV.Generation < 7)
|
||||
languages = languages.Where(l => l.Value <= 8).ToList(); // Korean
|
||||
CB_Language.DataSource = languages;
|
||||
}
|
||||
|
@ -125,7 +128,7 @@ namespace PKHeX.WinForms
|
|||
int index = Bytes.IndexOf(nud);
|
||||
Raw[index] = (byte)nud.Value;
|
||||
|
||||
string str = PKX.getString(Raw, Main.SAV.Generation, Main.SAV.Japanese, bigendian, Raw.Length);
|
||||
string str = PKX.getString(Raw, SAV.Generation, SAV.Japanese, bigendian, Raw.Length);
|
||||
TB_Text.Text = str;
|
||||
editing = false;
|
||||
}
|
||||
|
@ -135,7 +138,7 @@ namespace PKHeX.WinForms
|
|||
return;
|
||||
editing = true;
|
||||
// build bytes
|
||||
byte[] data = PKX.setString(TB_Text.Text, Main.SAV.Generation, Main.SAV.Japanese, bigendian, Raw.Length, Main.SAV.Language);
|
||||
byte[] data = PKX.setString(TB_Text.Text, SAV.Generation, SAV.Japanese, bigendian, Raw.Length, SAV.Language);
|
||||
Array.Copy(data, Raw, Math.Min(data.Length, Raw.Length));
|
||||
for (int i = 0; i < Raw.Length; i++)
|
||||
Bytes[i].Value = Raw[i];
|
||||
|
@ -149,8 +152,8 @@ namespace PKHeX.WinForms
|
|||
if (species == "") // no result
|
||||
species = CB_Species.Text;
|
||||
|
||||
byte[] current = PKX.setString(TB_Text.Text, Main.SAV.Generation, Main.SAV.Japanese, bigendian, Raw.Length, Main.SAV.Language);
|
||||
byte[] data = PKX.setString(species, Main.SAV.Generation, Main.SAV.Japanese, bigendian, Raw.Length, Main.SAV.Language);
|
||||
byte[] current = PKX.setString(TB_Text.Text, SAV.Generation, SAV.Japanese, bigendian, Raw.Length, SAV.Language);
|
||||
byte[] data = PKX.setString(species, SAV.Generation, SAV.Japanese, bigendian, Raw.Length, SAV.Language);
|
||||
if (data.Length <= current.Length)
|
||||
{
|
||||
WinFormsUtil.Alert("Trash byte layer is hidden by current text.",
|
||||
|
@ -167,7 +170,7 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
private void B_ClearTrash_Click(object sender, EventArgs e)
|
||||
{
|
||||
byte[] current = PKX.setString(TB_Text.Text, Main.SAV.Generation, Main.SAV.Japanese, bigendian, Raw.Length, Main.SAV.Language);
|
||||
byte[] current = PKX.setString(TB_Text.Text, SAV.Generation, SAV.Japanese, bigendian, Raw.Length, SAV.Language);
|
||||
for (int i = current.Length; i < Bytes.Count; i++)
|
||||
Bytes[i].Value = 0;
|
||||
}
|
||||
|
|
|
@ -8,14 +8,20 @@ using System.Linq;
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using PKHeX.Core;
|
||||
using PKHeX.WinForms.Controls;
|
||||
|
||||
namespace PKHeX.WinForms
|
||||
{
|
||||
public partial class SAV_Database : Form
|
||||
{
|
||||
public SAV_Database(Main f1)
|
||||
private readonly SaveFile SAV;
|
||||
private readonly SAVEditor BoxView;
|
||||
private readonly PKMEditor PKME_Tabs;
|
||||
public SAV_Database(PKMEditor f1, SAVEditor saveditor)
|
||||
{
|
||||
m_parent = f1;
|
||||
SAV = saveditor.SAV;
|
||||
BoxView = saveditor;
|
||||
PKME_Tabs = f1;
|
||||
InitializeComponent();
|
||||
|
||||
// Preset Filters to only show PKM available for loaded save
|
||||
|
@ -96,7 +102,7 @@ namespace PKHeX.WinForms
|
|||
|
||||
// Prepare Database
|
||||
RawDB = new List<PKM>(dbTemp.OrderBy(pk => pk.Identifier)
|
||||
.Concat(Main.SAV.BoxData.Where(pk => pk.Species != 0)) // Fetch from save file
|
||||
.Concat(SAV.BoxData.Where(pk => pk.Species != 0)) // Fetch from save file
|
||||
.Where(pk => pk.ChecksumValid && pk.Species != 0 && pk.Sanity == 0)
|
||||
.Distinct());
|
||||
setResults(RawDB);
|
||||
|
@ -108,7 +114,7 @@ namespace PKHeX.WinForms
|
|||
};
|
||||
CenterToParent();
|
||||
}
|
||||
private readonly Main m_parent;
|
||||
|
||||
private readonly PictureBox[] PKXBOXES;
|
||||
private readonly string DatabasePath = Main.DatabasePath;
|
||||
private List<PKM> Results;
|
||||
|
@ -147,7 +153,7 @@ namespace PKHeX.WinForms
|
|||
return;
|
||||
}
|
||||
|
||||
m_parent.populateFields(Results[index], false);
|
||||
PKME_Tabs.populateFields(Results[index], false);
|
||||
slotSelected = index;
|
||||
slotColor = Properties.Resources.slotView;
|
||||
FillPKXBoxes(SCR_Box.Value);
|
||||
|
@ -182,13 +188,13 @@ namespace PKHeX.WinForms
|
|||
// Data from Box: Delete from save file
|
||||
int box = pk.Box-1;
|
||||
int slot = pk.Slot-1;
|
||||
int offset = Main.SAV.getBoxOffset(box) + slot*Main.SAV.SIZE_STORED;
|
||||
PKM pkSAV = Main.SAV.getStoredSlot(offset);
|
||||
int offset = SAV.getBoxOffset(box) + slot*SAV.SIZE_STORED;
|
||||
PKM pkSAV = SAV.getStoredSlot(offset);
|
||||
|
||||
if (pkSAV.Data.SequenceEqual(pk.Data))
|
||||
{
|
||||
Main.SAV.setStoredSlot(Main.SAV.BlankPKM, offset);
|
||||
m_parent.setPKXBoxes();
|
||||
SAV.setStoredSlot(SAV.BlankPKM, offset);
|
||||
BoxView.setPKXBoxes();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -208,10 +214,10 @@ namespace PKHeX.WinForms
|
|||
private void clickSet(object sender, EventArgs e)
|
||||
{
|
||||
// Don't care what slot was clicked, just add it to the database
|
||||
if (!m_parent.verifiedPKM())
|
||||
if (!PKME_Tabs.verifiedPKM())
|
||||
return;
|
||||
|
||||
PKM pk = m_parent.preparePKM();
|
||||
PKM pk = PKME_Tabs.preparePKM();
|
||||
if (!Directory.Exists(DatabasePath))
|
||||
Directory.CreateDirectory(DatabasePath);
|
||||
|
||||
|
@ -506,7 +512,7 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
if (cmd.PropertyName == nameof(PKM.Identifier) + "Contains")
|
||||
return pkm.Identifier.Contains(cmd.PropertyValue);
|
||||
if (!pkm.GetType().HasPropertyAll(cmd.PropertyName))
|
||||
if (!pkm.GetType().HasPropertyAll(typeof(PKM), cmd.PropertyName))
|
||||
return false;
|
||||
try { if (ReflectUtil.GetValueEquals(pkm, cmd.PropertyName, cmd.PropertyValue) == cmd.Evaluator) continue; }
|
||||
catch { Console.WriteLine($"Unable to compare {cmd.PropertyName} to {cmd.PropertyValue}."); }
|
||||
|
@ -620,7 +626,7 @@ namespace PKHeX.WinForms
|
|||
else
|
||||
{
|
||||
CB_Format.Visible = true;
|
||||
int index = MAXFORMAT - Main.SAV.Generation + 1;
|
||||
int index = MAXFORMAT - SAV.Generation + 1;
|
||||
CB_Format.SelectedIndex = index < CB_Format.Items.Count ? index : 0; // SAV generation (offset by 1 for "Any")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,14 +6,18 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using PKHeX.Core;
|
||||
using PKHeX.WinForms.Controls;
|
||||
|
||||
namespace PKHeX.WinForms
|
||||
{
|
||||
public partial class SAV_MysteryGiftDB : Form
|
||||
{
|
||||
public SAV_MysteryGiftDB(Main f1)
|
||||
private readonly PKMEditor PKME_Tabs;
|
||||
private readonly SaveFile SAV;
|
||||
public SAV_MysteryGiftDB(PKMEditor tabs, SAVEditor sav)
|
||||
{
|
||||
m_parent = f1;
|
||||
SAV = sav.SAV;
|
||||
PKME_Tabs = tabs;
|
||||
InitializeComponent();
|
||||
|
||||
// Preset Filters to only show PKM available for loaded save
|
||||
|
@ -98,7 +102,6 @@ namespace PKHeX.WinForms
|
|||
populateComboBoxes();
|
||||
CenterToParent();
|
||||
}
|
||||
private readonly Main m_parent;
|
||||
private readonly PictureBox[] PKXBOXES;
|
||||
private readonly string DatabasePath = Main.MGDatabasePath;
|
||||
private List<MysteryGift> Results;
|
||||
|
@ -115,7 +118,7 @@ namespace PKHeX.WinForms
|
|||
private void clickView(object sender, EventArgs e)
|
||||
{
|
||||
int index = getSenderIndex(sender);
|
||||
m_parent.populateFields(Results[index].convertToPKM(Main.SAV), false);
|
||||
PKME_Tabs.populateFields(Results[index].convertToPKM(SAV), false);
|
||||
slotSelected = index;
|
||||
slotColor = Properties.Resources.slotView;
|
||||
FillPKXBoxes(SCR_Box.Value);
|
||||
|
@ -125,7 +128,7 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
int index = getSenderIndex(sender);
|
||||
var gift = Results[index];
|
||||
var pk = gift.convertToPKM(Main.SAV);
|
||||
var pk = gift.convertToPKM(SAV);
|
||||
WinFormsUtil.SavePKMDialog(pk);
|
||||
}
|
||||
private void clickSaveMG(object sender, EventArgs e)
|
||||
|
@ -285,7 +288,7 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
foreach (var cmd in filters)
|
||||
{
|
||||
if (!gift.GetType().HasPropertyAll(cmd.PropertyName))
|
||||
if (!gift.GetType().HasPropertyAll(typeof(PKM), cmd.PropertyName))
|
||||
return false;
|
||||
try { if (ReflectUtil.GetValueEquals(gift, cmd.PropertyName, cmd.PropertyValue) == cmd.Evaluator) continue; }
|
||||
catch { Console.WriteLine($"Unable to compare {cmd.PropertyName} to {cmd.PropertyValue}."); }
|
||||
|
@ -331,7 +334,7 @@ namespace PKHeX.WinForms
|
|||
int begin = start * RES_MIN;
|
||||
int end = Math.Min(RES_MAX, Results.Count - start * RES_MIN);
|
||||
for (int i = 0; i < end; i++)
|
||||
PKXBOXES[i].Image = Results[i + begin].Sprite();
|
||||
PKXBOXES[i].Image = Results[i + begin].Sprite(SAV);
|
||||
for (int i = end; i < RES_MAX; i++)
|
||||
PKXBOXES[i].Image = null;
|
||||
|
||||
|
@ -372,7 +375,7 @@ namespace PKHeX.WinForms
|
|||
else
|
||||
{
|
||||
CB_Format.Visible = true;
|
||||
int index = MAXFORMAT - Main.SAV.Generation + 1;
|
||||
int index = MAXFORMAT - SAV.Generation + 1;
|
||||
CB_Format.SelectedIndex = index < CB_Format.Items.Count ? index : 0; // SAV generation (offset by 1 for "Any")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,9 +8,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_Misc3 : Form
|
||||
{
|
||||
private readonly SAV3 SAV = (SAV3)Main.SAV.Clone();
|
||||
public SAV_Misc3()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV3 SAV;
|
||||
public SAV_Misc3(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV3)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
|
||||
|
@ -52,8 +54,7 @@ namespace PKHeX.WinForms
|
|||
SAV.BP = (ushort)NUD_BP.Value;
|
||||
SAV.Coin = (ushort)NUD_Coins.Value;
|
||||
|
||||
SAV.Data.CopyTo(Main.SAV.Data, 0);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -6,9 +6,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_RTC3 : Form
|
||||
{
|
||||
private readonly SAV3 SAV = (SAV3)Main.SAV.Clone();
|
||||
public SAV_RTC3()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV3 SAV;
|
||||
public SAV_RTC3(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV3)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
|
||||
|
@ -52,8 +54,7 @@ namespace PKHeX.WinForms
|
|||
SAV.ClockInitial = ClockInitial;
|
||||
SAV.ClockElapsed = ClockElapsed;
|
||||
|
||||
SAV.Data.CopyTo(Main.SAV.Data, 0);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -7,9 +7,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_HoneyTree : Form
|
||||
{
|
||||
private readonly SAV4 SAV = (SAV4)Main.SAV.Clone();
|
||||
public SAV_HoneyTree()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV4 SAV;
|
||||
public SAV_HoneyTree(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV4)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
|
||||
|
@ -84,8 +86,7 @@ namespace PKHeX.WinForms
|
|||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
saveTree();
|
||||
SAV.Data.CopyTo(Main.SAV.Data, 0);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
private void B_Cancel_Click(object sender, EventArgs e) => Close();
|
||||
|
|
|
@ -10,9 +10,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_Misc4 : Form
|
||||
{
|
||||
private readonly SAV4 SAV = (SAV4)Main.SAV.Clone();
|
||||
public SAV_Misc4()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV4 SAV;
|
||||
public SAV_Misc4(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV4)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
|
||||
switch (SAV.Version)
|
||||
|
@ -38,8 +40,7 @@ namespace PKHeX.WinForms
|
|||
if (TC_Misc.Controls.Contains(TAB_BF))
|
||||
saveBF();
|
||||
|
||||
SAV.Data.CopyTo(Main.SAV.Data, 0);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -8,8 +8,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_Pokedex4 : Form
|
||||
{
|
||||
public SAV_Pokedex4()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV4 SAV;
|
||||
public SAV_Pokedex4(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV4)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
CL = new[] { CHK_L1, CHK_L2, CHK_L3, CHK_L5, CHK_L4, CHK_L6, }; // JPN,ENG,FRA,GER,ITA,SPA
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
|
@ -38,7 +41,6 @@ namespace PKHeX.WinForms
|
|||
CB_DexUpgraded.SelectedIndex = SAV.DexUpgraded;
|
||||
}
|
||||
|
||||
private readonly SAV4 SAV = new SAV4(Main.SAV.Data);
|
||||
private readonly CheckBox[] CL;
|
||||
private bool editing;
|
||||
private int species = -1;
|
||||
|
@ -235,9 +237,7 @@ namespace PKHeX.WinForms
|
|||
int s = CB_DexUpgraded.SelectedIndex;
|
||||
if (s >= 0) SAV.DexUpgraded = s;
|
||||
|
||||
// Return back to the parent savefile
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -10,11 +10,14 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_CGearSkin : Form
|
||||
{
|
||||
public SAV_CGearSkin()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV5 SAV;
|
||||
public SAV_CGearSkin(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV5)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
|
||||
SAV = (SAV5)Main.SAV.Clone();
|
||||
SAV = (Origin = sav).Clone() as SAV5;
|
||||
|
||||
bool cgearPresent = SAV.Data[SAV.CGearInfoOffset + 0x26] == 1;
|
||||
bg = new CGearBackground(cgearPresent ?
|
||||
|
@ -25,7 +28,6 @@ namespace PKHeX.WinForms
|
|||
WinFormsUtil.Alert("Editor is incomplete.", "No guarantee of functionality.");
|
||||
}
|
||||
|
||||
private readonly SAV5 SAV;
|
||||
private CGearBackground bg;
|
||||
|
||||
private void B_ImportPNG_Click(object sender, EventArgs e)
|
||||
|
@ -115,24 +117,24 @@ namespace PKHeX.WinForms
|
|||
|
||||
bgdata = CGearBackground.CGBtoPSK(bgdata, SAV.B2W2);
|
||||
|
||||
Array.Copy(bgdata, 0, Main.SAV.Data, SAV.CGearDataOffset, bgdata.Length);
|
||||
Array.Copy(bgdata, 0, SAV.Data, SAV.CGearDataOffset, bgdata.Length);
|
||||
ushort chk = SaveUtil.ccitt16(bgdata);
|
||||
BitConverter.GetBytes(chk).CopyTo(Main.SAV.Data, SAV.CGearDataOffset + bgdata.Length + 2);
|
||||
BitConverter.GetBytes(chk).CopyTo(Main.SAV.Data, SAV.CGearDataOffset + bgdata.Length + 0x100);
|
||||
BitConverter.GetBytes(chk).CopyTo(SAV.Data, SAV.CGearDataOffset + bgdata.Length + 2);
|
||||
BitConverter.GetBytes(chk).CopyTo(SAV.Data, SAV.CGearDataOffset + bgdata.Length + 0x100);
|
||||
|
||||
byte[] skinchkdata = Main.SAV.Data.Skip(SAV.CGearDataOffset + bgdata.Length + 0x100).Take(4).ToArray();
|
||||
byte[] skinchkdata = SAV.Data.Skip(SAV.CGearDataOffset + bgdata.Length + 0x100).Take(4).ToArray();
|
||||
ushort skinchkval = SaveUtil.ccitt16(skinchkdata);
|
||||
BitConverter.GetBytes(skinchkval).CopyTo(Main.SAV.Data, SAV.CGearDataOffset + bgdata.Length + 0x112);
|
||||
BitConverter.GetBytes(skinchkval).CopyTo(SAV.Data, SAV.CGearDataOffset + bgdata.Length + 0x112);
|
||||
|
||||
// Indicate in the save file that data is present
|
||||
BitConverter.GetBytes((ushort)0xC21E).CopyTo(Main.SAV.Data, 0x19438);
|
||||
BitConverter.GetBytes((ushort)0xC21E).CopyTo(SAV.Data, 0x19438);
|
||||
|
||||
|
||||
|
||||
Main.SAV.Data[SAV.CGearInfoOffset + 0x26] = 1; // data present
|
||||
BitConverter.GetBytes(chk).CopyTo(Main.SAV.Data, SAV.CGearInfoOffset + 0x24);
|
||||
SAV.Data[SAV.CGearInfoOffset + 0x26] = 1; // data present
|
||||
BitConverter.GetBytes(chk).CopyTo(SAV.Data, SAV.CGearInfoOffset + 0x24);
|
||||
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -9,8 +9,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_Pokedex5 : Form
|
||||
{
|
||||
public SAV_Pokedex5()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV5 SAV;
|
||||
public SAV_Pokedex5(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV5)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
FormLen = SAV.B2W2 ? 0xB : 0x9;
|
||||
CP = new[] { CHK_P1, CHK_P2, CHK_P3, CHK_P4, CHK_P5, CHK_P6, CHK_P7, CHK_P8, CHK_P9, };
|
||||
|
@ -35,7 +38,6 @@ namespace PKHeX.WinForms
|
|||
LB_Species.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
private readonly SAV5 SAV = new SAV5(Main.SAV.Data);
|
||||
private readonly CheckBox[] CP;
|
||||
private readonly CheckBox[] CL;
|
||||
private readonly bool[,] specbools = new bool[9, brSize * 8];
|
||||
|
@ -256,9 +258,7 @@ namespace PKHeX.WinForms
|
|||
setEntry();
|
||||
setData();
|
||||
|
||||
// Return back to the parent savefile
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -6,13 +6,15 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_BerryFieldXY : Form
|
||||
{
|
||||
public SAV_BerryFieldXY()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV6 SAV;
|
||||
public SAV_BerryFieldXY(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV6)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
listBox1.SelectedIndex = 0;
|
||||
}
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
|
||||
private void changefield(object sender, EventArgs e)
|
||||
{
|
||||
|
|
|
@ -7,8 +7,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_BoxLayout : Form
|
||||
{
|
||||
public SAV_BoxLayout(int box)
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SaveFile SAV;
|
||||
public SAV_BoxLayout(SaveFile sav, int box)
|
||||
{
|
||||
SAV = (Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
editing = true;
|
||||
|
@ -84,7 +87,6 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
|
||||
private readonly NumericUpDown[] flagArr = new NumericUpDown[0];
|
||||
private readonly SaveFile SAV = Main.SAV.Clone();
|
||||
private bool editing;
|
||||
private bool renameBox;
|
||||
private void changeBox(object sender, EventArgs e)
|
||||
|
@ -119,8 +121,7 @@ namespace PKHeX.WinForms
|
|||
if (CB_Unlocked.Visible)
|
||||
SAV.BoxesUnlocked = CB_Unlocked.SelectedIndex;
|
||||
|
||||
Main.SAV = SAV;
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -9,8 +9,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_HallOfFame : Form
|
||||
{
|
||||
public SAV_HallOfFame()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV6 SAV;
|
||||
public SAV_HallOfFame(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV6)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
|
||||
|
@ -50,7 +53,6 @@ namespace PKHeX.WinForms
|
|||
editing = true;
|
||||
}
|
||||
private bool editing;
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
|
||||
private readonly string[] gendersymbols = Main.gendersymbols;
|
||||
private readonly byte[] data = new byte[0x1B40];
|
||||
|
@ -90,8 +92,7 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
private void B_Close_Click(object sender, EventArgs e)
|
||||
{
|
||||
Array.Copy(data, 0, Main.SAV.Data, SAV.HoF, data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(data, SAV.HoF);
|
||||
Close();
|
||||
}
|
||||
private void displayEntry(object sender, EventArgs e)
|
||||
|
@ -415,7 +416,7 @@ namespace PKHeX.WinForms
|
|||
int offset = LB_DataEntry.SelectedIndex * 0x1B4;
|
||||
var nicktrash = data.Skip(offset + 0x18).Take(24).ToArray();
|
||||
SAV.setString(TB_Nickname.Text, 12).CopyTo(nicktrash, 0);
|
||||
var d = new f2_Text(tb, nicktrash);
|
||||
var d = new f2_Text(tb, nicktrash, SAV);
|
||||
d.ShowDialog();
|
||||
tb.Text = d.FinalString;
|
||||
d.FinalBytes.CopyTo(data, offset + 0x18);
|
||||
|
|
|
@ -8,8 +8,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_Link6 : Form
|
||||
{
|
||||
public SAV_Link6()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV6 SAV;
|
||||
public SAV_Link6(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV6)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
foreach (var cb in TAB_Items.Controls.OfType<ComboBox>())
|
||||
{
|
||||
|
@ -29,7 +32,6 @@ namespace PKHeX.WinForms
|
|||
loadLinkData(data);
|
||||
}
|
||||
|
||||
private readonly SAV6 SAV = Main.SAV.Clone() as SAV6;
|
||||
private PL6 LinkInfo;
|
||||
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
|
@ -42,7 +44,7 @@ namespace PKHeX.WinForms
|
|||
BitConverter.GetBytes(ccitt).CopyTo(data, data.Length - 4);
|
||||
|
||||
SAV.LinkBlock = data;
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -7,14 +7,16 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_OPower : Form
|
||||
{
|
||||
public SAV_OPower()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV6 SAV;
|
||||
public SAV_OPower(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV6)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
LoadData();
|
||||
}
|
||||
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
|
@ -100,8 +102,7 @@ namespace PKHeX.WinForms
|
|||
SAV.Data[o + 0x19] = Convert.ToByte(CHK_6.Checked);
|
||||
SAV.Data[o + 0x26] = Convert.ToByte(CHK_7.Checked);
|
||||
SAV.Data[o + 0x2B] = Convert.ToByte(CHK_8.Checked);
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
}
|
||||
private int getIndex(int o, int l)
|
||||
{
|
||||
|
@ -112,7 +113,7 @@ namespace PKHeX.WinForms
|
|||
byte[] _4 = { 01, 01, 01, 01, };
|
||||
|
||||
byte[] data = new byte[4];
|
||||
Array.Copy(Main.SAV.Data, o, data, 0, l);
|
||||
Array.Copy(SAV.Data, o, data, 0, l);
|
||||
|
||||
if (data.SequenceEqual(_4)) return 4;
|
||||
if (data.SequenceEqual(_3)) return 3;
|
||||
|
|
|
@ -6,8 +6,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_PokeBlockORAS : Form
|
||||
{
|
||||
public SAV_PokeBlockORAS()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV6 SAV;
|
||||
public SAV_PokeBlockORAS(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV6)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
nup_spec = new[] { NUP_Red, NUP_Blue, NUP_Pink, NUP_Green, NUP_Yellow, NUP_Rainbow, NUP_RedPlus, NUP_BluePlus, NUP_PinkPlus, NUP_GreenPlus, NUP_YellowPlus, NUP_RainbowPlus };
|
||||
|
@ -20,7 +23,6 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
}
|
||||
private readonly NumericUpDown[] nup_spec;
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -30,7 +32,7 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
for (int i = 0; i < nup_spec.Length; i++)
|
||||
BitConverter.GetBytes((uint)nup_spec[i].Value).CopyTo(SAV.Data, SAV.Contest + i * 4);
|
||||
Main.SAV.Data = (byte[])SAV.Data.Clone();
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -9,8 +9,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_PokedexORAS : Form
|
||||
{
|
||||
public SAV_PokedexORAS()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV6 SAV;
|
||||
public SAV_PokedexORAS(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV6)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
CP = new[] { CHK_P1, CHK_P2, CHK_P3, CHK_P4, CHK_P5, CHK_P6, CHK_P7, CHK_P8, CHK_P9, };
|
||||
CL = new[] { CHK_L1, CHK_L2, CHK_L3, CHK_L4, CHK_L5, CHK_L6, CHK_L7, };
|
||||
|
@ -35,7 +38,6 @@ namespace PKHeX.WinForms
|
|||
TB_Spinda.Text = BitConverter.ToUInt32(SAV.Data, SAV.Spinda).ToString("X8");
|
||||
}
|
||||
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
private readonly CheckBox[] CP;
|
||||
private readonly CheckBox[] CL;
|
||||
private readonly bool[,] specbools = new bool[9, 0x60 * 8];
|
||||
|
@ -261,9 +263,7 @@ namespace PKHeX.WinForms
|
|||
setEntry();
|
||||
setData();
|
||||
|
||||
// Return back to the parent savefile
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -9,8 +9,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_PokedexXY : Form
|
||||
{
|
||||
public SAV_PokedexXY()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV6 SAV;
|
||||
public SAV_PokedexXY(SaveFile sav)
|
||||
{
|
||||
SAV = (Origin = sav).Clone() as SAV6;
|
||||
InitializeComponent();
|
||||
CP = new[] { CHK_P1, CHK_P2, CHK_P3, CHK_P4, CHK_P5, CHK_P6, CHK_P7, CHK_P8, CHK_P9, };
|
||||
CL = new[] { CHK_L1, CHK_L2, CHK_L3, CHK_L4, CHK_L5, CHK_L6, CHK_L7, };
|
||||
|
@ -35,7 +38,6 @@ namespace PKHeX.WinForms
|
|||
TB_Spinda.Text = BitConverter.ToUInt32(SAV.Data, SAV.Spinda).ToString("X8");
|
||||
}
|
||||
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
private readonly CheckBox[] CP;
|
||||
private readonly CheckBox[] CL;
|
||||
private readonly bool[,] specbools = new bool[9, 0x60 * 8];
|
||||
|
@ -280,8 +282,7 @@ namespace PKHeX.WinForms
|
|||
setData();
|
||||
|
||||
// Return back to the parent savefile
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_Pokepuff : Form
|
||||
{
|
||||
public SAV_Pokepuff()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV6 SAV;
|
||||
public SAV_Pokepuff(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV6)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
|
||||
|
@ -19,7 +22,6 @@ namespace PKHeX.WinForms
|
|||
new ToolTip().SetToolTip(B_All, "Hold CTRL to best instead of varied.");
|
||||
}
|
||||
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
private readonly string[] pfa;
|
||||
private void Setup()
|
||||
{
|
||||
|
@ -150,8 +152,7 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
SAV.Puffs = puffarray;
|
||||
SAV.PuffCount = Util.ToInt32(MT_CNT.Text);
|
||||
Main.SAV.Data = SAV.Data;
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_SecretBase : Form
|
||||
{
|
||||
public SAV_SecretBase()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV6 SAV;
|
||||
public SAV_SecretBase(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV6)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
abilitylist = GameInfo.Strings.abilitylist;
|
||||
|
@ -25,7 +28,6 @@ namespace PKHeX.WinForms
|
|||
B_SAV2FAV(null, null);
|
||||
}
|
||||
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
private bool editing;
|
||||
private bool loading = true;
|
||||
|
||||
|
@ -194,8 +196,7 @@ namespace PKHeX.WinForms
|
|||
uint flags = Util.ToUInt32(MT_Flags.Text);
|
||||
Array.Copy(BitConverter.GetBytes(flags), 0, SAV.Data, SAV.PSSStats + 0x140, 4); // write pss
|
||||
Array.Copy(BitConverter.GetBytes(flags), 0, SAV.Data, SAV.SecretBase + 0x62C, 4); // write counter
|
||||
Main.SAV.Data = SAV.Data;
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
private void B_GiveDecor_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -7,8 +7,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_SuperTrain : Form
|
||||
{
|
||||
public SAV_SuperTrain()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV6 SAV;
|
||||
public SAV_SuperTrain(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV6)(Origin = sav).Clone();
|
||||
trba = GameInfo.Strings.trainingbags;
|
||||
trba[0] = "---";
|
||||
offsetTime = SAV.SuperTrain + 0x08;
|
||||
|
@ -24,7 +27,6 @@ namespace PKHeX.WinForms
|
|||
setup();
|
||||
}
|
||||
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
private readonly string[] trba;
|
||||
private readonly int offsetVal;
|
||||
private readonly int offsetTime;
|
||||
|
@ -120,8 +122,7 @@ namespace PKHeX.WinForms
|
|||
try { BitConverter.GetBytes(float.Parse(TB_Time2.Text)).CopyTo(SAV.Data, offsetTime + 4 * 31); } catch { }
|
||||
BitConverter.GetBytes((ushort)WinFormsUtil.getIndex(CB_S2)).CopyTo(SAV.Data, offsetSpec + 4 * 30);
|
||||
bagarray.CopyTo(SAV.Data, SAV.SuperTrain + 0x308);
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, Main.SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -8,15 +8,17 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_Trainer : Form
|
||||
{
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
public SAV_Trainer()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV6 SAV;
|
||||
public SAV_Trainer(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV6)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
if (Main.unicode)
|
||||
try
|
||||
{
|
||||
TB_OTName.Font = FontUtil.getPKXFont(11);
|
||||
if (Main.SAV.XY)
|
||||
if (SAV.XY)
|
||||
TB_TRNick.Font = TB_OTName.Font;
|
||||
}
|
||||
catch (Exception e) { WinFormsUtil.Alert("Font loading failed...", e.ToString()); }
|
||||
|
@ -38,9 +40,9 @@ namespace PKHeX.WinForms
|
|||
cba = new[] { CHK_Badge1, CHK_Badge2, CHK_Badge3, CHK_Badge4, CHK_Badge5, CHK_Badge6, CHK_Badge7, CHK_Badge8, };
|
||||
pba = new [] { PB_Badge1, PB_Badge2, PB_Badge3, PB_Badge4, PB_Badge5, PB_Badge6, PB_Badge7, PB_Badge8, };
|
||||
|
||||
L_MultiplayerSprite.Enabled = CB_MultiplayerSprite.Enabled = Main.SAV.ORAS;
|
||||
L_MultiplayerSprite.Visible = CB_MultiplayerSprite.Visible = Main.SAV.ORAS;
|
||||
PB_Sprite.Visible = Main.SAV.ORAS;
|
||||
L_MultiplayerSprite.Enabled = CB_MultiplayerSprite.Enabled = SAV.ORAS;
|
||||
L_MultiplayerSprite.Visible = CB_MultiplayerSprite.Visible = SAV.ORAS;
|
||||
PB_Sprite.Visible = SAV.ORAS;
|
||||
|
||||
L_Style.Visible = TB_Style.Visible = SAV.XY;
|
||||
if (!SAV.XY)
|
||||
|
@ -346,7 +348,7 @@ namespace PKHeX.WinForms
|
|||
private void getBadges()
|
||||
{
|
||||
// Fetch Badges
|
||||
Bitmap[] bma = Main.SAV.ORAS ?
|
||||
Bitmap[] bma = SAV.ORAS ?
|
||||
new[] {
|
||||
Properties.Resources.badge_01, // ORAS Badges
|
||||
Properties.Resources.badge_02,
|
||||
|
@ -578,7 +580,7 @@ namespace PKHeX.WinForms
|
|||
if (ModifierKeys != Keys.Control)
|
||||
return;
|
||||
|
||||
var d = new f2_Text(tb, null);
|
||||
var d = new f2_Text(tb, null, SAV);
|
||||
d.ShowDialog();
|
||||
tb.Text = d.FinalString;
|
||||
}
|
||||
|
@ -598,8 +600,7 @@ namespace PKHeX.WinForms
|
|||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
save();
|
||||
Main.SAV.Data = SAV.Data;
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
private void changeBadge(object sender, EventArgs e)
|
||||
|
|
|
@ -7,8 +7,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_HallOfFame7 : Form
|
||||
{
|
||||
public SAV_HallOfFame7()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV7 SAV;
|
||||
public SAV_HallOfFame7(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV7)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
entries = new[]
|
||||
|
@ -18,7 +21,6 @@ namespace PKHeX.WinForms
|
|||
};
|
||||
Setup();
|
||||
}
|
||||
private readonly SAV7 SAV = new SAV7(Main.SAV.Data);
|
||||
private readonly ComboBox[] entries;
|
||||
|
||||
private void Setup()
|
||||
|
@ -61,8 +63,7 @@ namespace PKHeX.WinForms
|
|||
var val = WinFormsUtil.getIndex(cb);
|
||||
BitConverter.GetBytes((ushort)val).CopyTo(SAV.Data, o);
|
||||
}
|
||||
SAV.Data.CopyTo(Main.SAV.Data, 0);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,9 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_Pokebean : Form
|
||||
{
|
||||
public SAV_Pokebean()
|
||||
public SAV_Pokebean(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV7)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
|
||||
|
@ -30,7 +31,8 @@ namespace PKHeX.WinForms
|
|||
|
||||
private int MaxBeanID = 14;
|
||||
|
||||
private readonly SAV7 SAV = new SAV7(Main.SAV.Data);
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV7 SAV;
|
||||
private readonly string[] beanlist;
|
||||
private void Setup()
|
||||
{
|
||||
|
@ -98,8 +100,7 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
for (int i = 0; i <= MaxBeanID; i++)
|
||||
SAV.SetPokebeanCount(i, (int)dgv.Rows[i].Cells[1].Value);
|
||||
Main.SAV.Data = SAV.Data;
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_PokedexSM : Form
|
||||
{
|
||||
public SAV_PokedexSM()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV7 SAV;
|
||||
public SAV_PokedexSM(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV7)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
CP = new[] { CHK_P1, CHK_P2, CHK_P3, CHK_P4, CHK_P5, CHK_P6, CHK_P7, CHK_P8, CHK_P9, };
|
||||
CL = new[] { CHK_L1, CHK_L2, CHK_L3, CHK_L4, CHK_L5, CHK_L6, CHK_L7, CHK_L8, CHK_L9, };
|
||||
|
@ -52,7 +55,6 @@ namespace PKHeX.WinForms
|
|||
LB_Species.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
private readonly SAV7 SAV = new SAV7(Main.SAV.Data);
|
||||
private readonly PokeDex7 Dex;
|
||||
private bool editing;
|
||||
private bool allModifying;
|
||||
|
@ -328,9 +330,7 @@ namespace PKHeX.WinForms
|
|||
setEntry();
|
||||
Dex.WriteToSAV(SAV);
|
||||
|
||||
// Return back to the parent savefile
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -8,9 +8,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_Trainer7 : Form
|
||||
{
|
||||
private readonly SAV7 SAV = new SAV7(Main.SAV.Data);
|
||||
public SAV_Trainer7()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV7 SAV;
|
||||
public SAV_Trainer7(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV7)(Origin = sav).Clone();
|
||||
Loading = true;
|
||||
InitializeComponent();
|
||||
if (Main.unicode)
|
||||
|
@ -347,7 +349,7 @@ namespace PKHeX.WinForms
|
|||
if (ModifierKeys != Keys.Control)
|
||||
return;
|
||||
|
||||
var d = new f2_Text(tb, null);
|
||||
var d = new f2_Text(tb, null, SAV);
|
||||
d.ShowDialog();
|
||||
tb.Text = d.FinalString;
|
||||
}
|
||||
|
@ -370,8 +372,7 @@ namespace PKHeX.WinForms
|
|||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
save();
|
||||
Main.SAV.Data = SAV.Data;
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
private void change255(object sender, EventArgs e)
|
||||
|
|
|
@ -7,9 +7,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_ZygardeCell : Form
|
||||
{
|
||||
private readonly SAV7 SAV = new SAV7(Main.SAV.Data);
|
||||
public SAV_ZygardeCell()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SAV7 SAV;
|
||||
public SAV_ZygardeCell(SaveFile sav)
|
||||
{
|
||||
SAV = (SAV7)(Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
|
||||
// Constants @ 0x1C00
|
||||
|
@ -64,8 +66,7 @@ namespace PKHeX.WinForms
|
|||
constants[cellscollected] = (ushort)NUD_Collected.Value;
|
||||
|
||||
SAV.EventConsts = constants;
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -29,481 +29,14 @@
|
|||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAV_BoxViewer));
|
||||
this.PAN_Box = new System.Windows.Forms.Panel();
|
||||
this.bpkx30 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx29 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx28 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx27 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx26 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx25 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx24 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx23 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx22 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx21 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx20 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx19 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx18 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx17 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx16 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx15 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx14 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx13 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx12 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx11 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx10 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx9 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx8 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx7 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx6 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx5 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx4 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx3 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx2 = new System.Windows.Forms.PictureBox();
|
||||
this.bpkx1 = new System.Windows.Forms.PictureBox();
|
||||
this.B_BoxRight = new System.Windows.Forms.Button();
|
||||
this.B_BoxLeft = new System.Windows.Forms.Button();
|
||||
this.CB_BoxSelect = new System.Windows.Forms.ComboBox();
|
||||
this.PB_BoxSwap = new System.Windows.Forms.PictureBox();
|
||||
this.PAN_Box.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx30)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx29)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx28)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx27)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx26)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx25)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx24)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx23)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx22)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx21)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx20)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx19)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx18)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx17)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx16)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx15)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx14)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx13)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx12)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx11)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx10)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx1)).BeginInit();
|
||||
this.Box = new PKHeX.WinForms.Controls.BoxEditor();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PB_BoxSwap)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PAN_Box
|
||||
//
|
||||
this.PAN_Box.BackgroundImage = Properties.Resources.box_wp16xy;
|
||||
this.PAN_Box.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.PAN_Box.Controls.Add(this.bpkx30);
|
||||
this.PAN_Box.Controls.Add(this.bpkx29);
|
||||
this.PAN_Box.Controls.Add(this.bpkx28);
|
||||
this.PAN_Box.Controls.Add(this.bpkx27);
|
||||
this.PAN_Box.Controls.Add(this.bpkx26);
|
||||
this.PAN_Box.Controls.Add(this.bpkx25);
|
||||
this.PAN_Box.Controls.Add(this.bpkx24);
|
||||
this.PAN_Box.Controls.Add(this.bpkx23);
|
||||
this.PAN_Box.Controls.Add(this.bpkx22);
|
||||
this.PAN_Box.Controls.Add(this.bpkx21);
|
||||
this.PAN_Box.Controls.Add(this.bpkx20);
|
||||
this.PAN_Box.Controls.Add(this.bpkx19);
|
||||
this.PAN_Box.Controls.Add(this.bpkx18);
|
||||
this.PAN_Box.Controls.Add(this.bpkx17);
|
||||
this.PAN_Box.Controls.Add(this.bpkx16);
|
||||
this.PAN_Box.Controls.Add(this.bpkx15);
|
||||
this.PAN_Box.Controls.Add(this.bpkx14);
|
||||
this.PAN_Box.Controls.Add(this.bpkx13);
|
||||
this.PAN_Box.Controls.Add(this.bpkx12);
|
||||
this.PAN_Box.Controls.Add(this.bpkx11);
|
||||
this.PAN_Box.Controls.Add(this.bpkx10);
|
||||
this.PAN_Box.Controls.Add(this.bpkx9);
|
||||
this.PAN_Box.Controls.Add(this.bpkx8);
|
||||
this.PAN_Box.Controls.Add(this.bpkx7);
|
||||
this.PAN_Box.Controls.Add(this.bpkx6);
|
||||
this.PAN_Box.Controls.Add(this.bpkx5);
|
||||
this.PAN_Box.Controls.Add(this.bpkx4);
|
||||
this.PAN_Box.Controls.Add(this.bpkx3);
|
||||
this.PAN_Box.Controls.Add(this.bpkx2);
|
||||
this.PAN_Box.Controls.Add(this.bpkx1);
|
||||
this.PAN_Box.Location = new System.Drawing.Point(17, 37);
|
||||
this.PAN_Box.Name = "PAN_Box";
|
||||
this.PAN_Box.Size = new System.Drawing.Size(251, 160);
|
||||
this.PAN_Box.TabIndex = 66;
|
||||
//
|
||||
// bpkx30
|
||||
//
|
||||
this.bpkx30.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx30.Location = new System.Drawing.Point(207, 126);
|
||||
this.bpkx30.Name = "bpkx30";
|
||||
this.bpkx30.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx30.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx30.TabIndex = 59;
|
||||
this.bpkx30.TabStop = false;
|
||||
//
|
||||
// bpkx29
|
||||
//
|
||||
this.bpkx29.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx29.Location = new System.Drawing.Point(166, 126);
|
||||
this.bpkx29.Name = "bpkx29";
|
||||
this.bpkx29.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx29.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx29.TabIndex = 58;
|
||||
this.bpkx29.TabStop = false;
|
||||
//
|
||||
// bpkx28
|
||||
//
|
||||
this.bpkx28.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx28.Location = new System.Drawing.Point(125, 126);
|
||||
this.bpkx28.Name = "bpkx28";
|
||||
this.bpkx28.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx28.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx28.TabIndex = 57;
|
||||
this.bpkx28.TabStop = false;
|
||||
//
|
||||
// bpkx27
|
||||
//
|
||||
this.bpkx27.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx27.Location = new System.Drawing.Point(84, 126);
|
||||
this.bpkx27.Name = "bpkx27";
|
||||
this.bpkx27.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx27.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx27.TabIndex = 56;
|
||||
this.bpkx27.TabStop = false;
|
||||
//
|
||||
// bpkx26
|
||||
//
|
||||
this.bpkx26.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx26.Location = new System.Drawing.Point(43, 126);
|
||||
this.bpkx26.Name = "bpkx26";
|
||||
this.bpkx26.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx26.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx26.TabIndex = 55;
|
||||
this.bpkx26.TabStop = false;
|
||||
//
|
||||
// bpkx25
|
||||
//
|
||||
this.bpkx25.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx25.Location = new System.Drawing.Point(2, 126);
|
||||
this.bpkx25.Name = "bpkx25";
|
||||
this.bpkx25.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx25.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx25.TabIndex = 54;
|
||||
this.bpkx25.TabStop = false;
|
||||
//
|
||||
// bpkx24
|
||||
//
|
||||
this.bpkx24.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx24.Location = new System.Drawing.Point(207, 95);
|
||||
this.bpkx24.Name = "bpkx24";
|
||||
this.bpkx24.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx24.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx24.TabIndex = 53;
|
||||
this.bpkx24.TabStop = false;
|
||||
//
|
||||
// bpkx23
|
||||
//
|
||||
this.bpkx23.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx23.Location = new System.Drawing.Point(166, 95);
|
||||
this.bpkx23.Name = "bpkx23";
|
||||
this.bpkx23.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx23.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx23.TabIndex = 52;
|
||||
this.bpkx23.TabStop = false;
|
||||
//
|
||||
// bpkx22
|
||||
//
|
||||
this.bpkx22.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx22.Location = new System.Drawing.Point(125, 95);
|
||||
this.bpkx22.Name = "bpkx22";
|
||||
this.bpkx22.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx22.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx22.TabIndex = 51;
|
||||
this.bpkx22.TabStop = false;
|
||||
//
|
||||
// bpkx21
|
||||
//
|
||||
this.bpkx21.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx21.Location = new System.Drawing.Point(84, 95);
|
||||
this.bpkx21.Name = "bpkx21";
|
||||
this.bpkx21.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx21.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx21.TabIndex = 50;
|
||||
this.bpkx21.TabStop = false;
|
||||
//
|
||||
// bpkx20
|
||||
//
|
||||
this.bpkx20.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx20.Location = new System.Drawing.Point(43, 95);
|
||||
this.bpkx20.Name = "bpkx20";
|
||||
this.bpkx20.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx20.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx20.TabIndex = 49;
|
||||
this.bpkx20.TabStop = false;
|
||||
//
|
||||
// bpkx19
|
||||
//
|
||||
this.bpkx19.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx19.Location = new System.Drawing.Point(2, 95);
|
||||
this.bpkx19.Name = "bpkx19";
|
||||
this.bpkx19.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx19.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx19.TabIndex = 48;
|
||||
this.bpkx19.TabStop = false;
|
||||
//
|
||||
// bpkx18
|
||||
//
|
||||
this.bpkx18.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx18.Location = new System.Drawing.Point(207, 64);
|
||||
this.bpkx18.Name = "bpkx18";
|
||||
this.bpkx18.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx18.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx18.TabIndex = 47;
|
||||
this.bpkx18.TabStop = false;
|
||||
//
|
||||
// bpkx17
|
||||
//
|
||||
this.bpkx17.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx17.Location = new System.Drawing.Point(166, 64);
|
||||
this.bpkx17.Name = "bpkx17";
|
||||
this.bpkx17.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx17.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx17.TabIndex = 46;
|
||||
this.bpkx17.TabStop = false;
|
||||
//
|
||||
// bpkx16
|
||||
//
|
||||
this.bpkx16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx16.Location = new System.Drawing.Point(125, 64);
|
||||
this.bpkx16.Name = "bpkx16";
|
||||
this.bpkx16.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx16.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx16.TabIndex = 45;
|
||||
this.bpkx16.TabStop = false;
|
||||
//
|
||||
// bpkx15
|
||||
//
|
||||
this.bpkx15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx15.Location = new System.Drawing.Point(84, 64);
|
||||
this.bpkx15.Name = "bpkx15";
|
||||
this.bpkx15.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx15.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx15.TabIndex = 44;
|
||||
this.bpkx15.TabStop = false;
|
||||
//
|
||||
// bpkx14
|
||||
//
|
||||
this.bpkx14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx14.Location = new System.Drawing.Point(43, 64);
|
||||
this.bpkx14.Name = "bpkx14";
|
||||
this.bpkx14.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx14.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx14.TabIndex = 43;
|
||||
this.bpkx14.TabStop = false;
|
||||
//
|
||||
// bpkx13
|
||||
//
|
||||
this.bpkx13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx13.Location = new System.Drawing.Point(2, 64);
|
||||
this.bpkx13.Name = "bpkx13";
|
||||
this.bpkx13.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx13.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx13.TabIndex = 42;
|
||||
this.bpkx13.TabStop = false;
|
||||
//
|
||||
// bpkx12
|
||||
//
|
||||
this.bpkx12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx12.Location = new System.Drawing.Point(207, 33);
|
||||
this.bpkx12.Name = "bpkx12";
|
||||
this.bpkx12.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx12.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx12.TabIndex = 41;
|
||||
this.bpkx12.TabStop = false;
|
||||
//
|
||||
// bpkx11
|
||||
//
|
||||
this.bpkx11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx11.Location = new System.Drawing.Point(166, 33);
|
||||
this.bpkx11.Name = "bpkx11";
|
||||
this.bpkx11.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx11.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx11.TabIndex = 40;
|
||||
this.bpkx11.TabStop = false;
|
||||
//
|
||||
// bpkx10
|
||||
//
|
||||
this.bpkx10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx10.Location = new System.Drawing.Point(125, 33);
|
||||
this.bpkx10.Name = "bpkx10";
|
||||
this.bpkx10.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx10.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx10.TabIndex = 39;
|
||||
this.bpkx10.TabStop = false;
|
||||
//
|
||||
// bpkx9
|
||||
//
|
||||
this.bpkx9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx9.Location = new System.Drawing.Point(84, 33);
|
||||
this.bpkx9.Name = "bpkx9";
|
||||
this.bpkx9.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx9.TabIndex = 38;
|
||||
this.bpkx9.TabStop = false;
|
||||
//
|
||||
// bpkx8
|
||||
//
|
||||
this.bpkx8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx8.Location = new System.Drawing.Point(43, 33);
|
||||
this.bpkx8.Name = "bpkx8";
|
||||
this.bpkx8.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx8.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx8.TabIndex = 37;
|
||||
this.bpkx8.TabStop = false;
|
||||
//
|
||||
// bpkx7
|
||||
//
|
||||
this.bpkx7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx7.Location = new System.Drawing.Point(2, 33);
|
||||
this.bpkx7.Name = "bpkx7";
|
||||
this.bpkx7.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx7.TabIndex = 36;
|
||||
this.bpkx7.TabStop = false;
|
||||
//
|
||||
// bpkx6
|
||||
//
|
||||
this.bpkx6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx6.Location = new System.Drawing.Point(207, 2);
|
||||
this.bpkx6.Name = "bpkx6";
|
||||
this.bpkx6.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx6.TabIndex = 35;
|
||||
this.bpkx6.TabStop = false;
|
||||
//
|
||||
// bpkx5
|
||||
//
|
||||
this.bpkx5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx5.Location = new System.Drawing.Point(166, 2);
|
||||
this.bpkx5.Name = "bpkx5";
|
||||
this.bpkx5.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx5.TabIndex = 34;
|
||||
this.bpkx5.TabStop = false;
|
||||
//
|
||||
// bpkx4
|
||||
//
|
||||
this.bpkx4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx4.Location = new System.Drawing.Point(125, 2);
|
||||
this.bpkx4.Name = "bpkx4";
|
||||
this.bpkx4.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx4.TabIndex = 33;
|
||||
this.bpkx4.TabStop = false;
|
||||
//
|
||||
// bpkx3
|
||||
//
|
||||
this.bpkx3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx3.Location = new System.Drawing.Point(84, 2);
|
||||
this.bpkx3.Name = "bpkx3";
|
||||
this.bpkx3.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx3.TabIndex = 32;
|
||||
this.bpkx3.TabStop = false;
|
||||
//
|
||||
// bpkx2
|
||||
//
|
||||
this.bpkx2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx2.Location = new System.Drawing.Point(43, 2);
|
||||
this.bpkx2.Name = "bpkx2";
|
||||
this.bpkx2.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx2.TabIndex = 31;
|
||||
this.bpkx2.TabStop = false;
|
||||
//
|
||||
// bpkx1
|
||||
//
|
||||
this.bpkx1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bpkx1.Location = new System.Drawing.Point(2, 2);
|
||||
this.bpkx1.Name = "bpkx1";
|
||||
this.bpkx1.Size = new System.Drawing.Size(42, 32);
|
||||
this.bpkx1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.bpkx1.TabIndex = 30;
|
||||
this.bpkx1.TabStop = false;
|
||||
//
|
||||
// B_BoxRight
|
||||
//
|
||||
this.B_BoxRight.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.B_BoxRight.Location = new System.Drawing.Point(210, 11);
|
||||
this.B_BoxRight.Name = "B_BoxRight";
|
||||
this.B_BoxRight.Size = new System.Drawing.Size(27, 23);
|
||||
this.B_BoxRight.TabIndex = 65;
|
||||
this.B_BoxRight.Text = ">>";
|
||||
this.B_BoxRight.UseVisualStyleBackColor = true;
|
||||
this.B_BoxRight.Click += new System.EventHandler(this.clickBoxRight);
|
||||
//
|
||||
// B_BoxLeft
|
||||
//
|
||||
this.B_BoxLeft.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.B_BoxLeft.Location = new System.Drawing.Point(48, 11);
|
||||
this.B_BoxLeft.Name = "B_BoxLeft";
|
||||
this.B_BoxLeft.Size = new System.Drawing.Size(27, 23);
|
||||
this.B_BoxLeft.TabIndex = 64;
|
||||
this.B_BoxLeft.Text = "<<";
|
||||
this.B_BoxLeft.UseVisualStyleBackColor = true;
|
||||
this.B_BoxLeft.Click += new System.EventHandler(this.clickBoxLeft);
|
||||
//
|
||||
// CB_BoxSelect
|
||||
//
|
||||
this.CB_BoxSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CB_BoxSelect.FormattingEnabled = true;
|
||||
this.CB_BoxSelect.Items.AddRange(new object[] {
|
||||
"Box 1",
|
||||
"Box 2",
|
||||
"Box 3",
|
||||
"Box 4",
|
||||
"Box 5",
|
||||
"Box 6",
|
||||
"Box 7",
|
||||
"Box 8",
|
||||
"Box 9",
|
||||
"Box 10",
|
||||
"Box 11",
|
||||
"Box 12",
|
||||
"Box 13",
|
||||
"Box 14",
|
||||
"Box 15",
|
||||
"Box 16",
|
||||
"Box 17",
|
||||
"Box 18",
|
||||
"Box 19",
|
||||
"Box 20",
|
||||
"Box 21",
|
||||
"Box 22",
|
||||
"Box 23",
|
||||
"Box 24",
|
||||
"Box 25",
|
||||
"Box 26",
|
||||
"Box 27",
|
||||
"Box 28",
|
||||
"Box 29",
|
||||
"Box 30",
|
||||
"Box 31"});
|
||||
this.CB_BoxSelect.Location = new System.Drawing.Point(79, 12);
|
||||
this.CB_BoxSelect.Name = "CB_BoxSelect";
|
||||
this.CB_BoxSelect.Size = new System.Drawing.Size(127, 21);
|
||||
this.CB_BoxSelect.TabIndex = 63;
|
||||
this.CB_BoxSelect.SelectedIndexChanged += new System.EventHandler(this.CB_BoxSelect_SelectedIndexChanged);
|
||||
//
|
||||
// PB_BoxSwap
|
||||
//
|
||||
this.PB_BoxSwap.Image = Properties.Resources.swapBox;
|
||||
this.PB_BoxSwap.Image = global::PKHeX.WinForms.Properties.Resources.swapBox;
|
||||
this.PB_BoxSwap.Location = new System.Drawing.Point(0, 0);
|
||||
this.PB_BoxSwap.Name = "PB_BoxSwap";
|
||||
this.PB_BoxSwap.Size = new System.Drawing.Size(24, 24);
|
||||
|
@ -511,93 +44,37 @@
|
|||
this.PB_BoxSwap.TabStop = false;
|
||||
this.PB_BoxSwap.Click += new System.EventHandler(this.PB_BoxSwap_Click);
|
||||
//
|
||||
// Box
|
||||
//
|
||||
this.Box.AllowDrop = true;
|
||||
this.Box.CurrentBox = -1;
|
||||
this.Box.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.Box.Location = new System.Drawing.Point(0, 0);
|
||||
this.Box.Name = "Box";
|
||||
this.Box.Size = new System.Drawing.Size(250, 185);
|
||||
this.Box.TabIndex = 68;
|
||||
//
|
||||
// SAV_BoxViewer
|
||||
//
|
||||
this.AllowDrop = true;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 211);
|
||||
this.ClientSize = new System.Drawing.Size(250, 185);
|
||||
this.Controls.Add(this.PB_BoxSwap);
|
||||
this.Controls.Add(this.B_BoxRight);
|
||||
this.Controls.Add(this.B_BoxLeft);
|
||||
this.Controls.Add(this.CB_BoxSelect);
|
||||
this.Controls.Add(this.PAN_Box);
|
||||
this.Controls.Add(this.Box);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "SAV_BoxViewer";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Box Viewer";
|
||||
this.PAN_Box.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx30)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx29)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx28)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx27)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx26)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx25)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx24)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx23)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx22)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx21)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx20)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx19)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx18)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx17)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx16)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx15)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx14)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx13)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx12)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx11)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx10)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx1)).EndInit();
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SAV_BoxViewer_FormClosing);
|
||||
((System.ComponentModel.ISupportInitialize)(this.PB_BoxSwap)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel PAN_Box;
|
||||
private System.Windows.Forms.PictureBox bpkx30;
|
||||
private System.Windows.Forms.PictureBox bpkx29;
|
||||
private System.Windows.Forms.PictureBox bpkx28;
|
||||
private System.Windows.Forms.PictureBox bpkx27;
|
||||
private System.Windows.Forms.PictureBox bpkx26;
|
||||
private System.Windows.Forms.PictureBox bpkx25;
|
||||
private System.Windows.Forms.PictureBox bpkx24;
|
||||
private System.Windows.Forms.PictureBox bpkx23;
|
||||
private System.Windows.Forms.PictureBox bpkx22;
|
||||
private System.Windows.Forms.PictureBox bpkx21;
|
||||
private System.Windows.Forms.PictureBox bpkx20;
|
||||
private System.Windows.Forms.PictureBox bpkx19;
|
||||
private System.Windows.Forms.PictureBox bpkx18;
|
||||
private System.Windows.Forms.PictureBox bpkx17;
|
||||
private System.Windows.Forms.PictureBox bpkx16;
|
||||
private System.Windows.Forms.PictureBox bpkx15;
|
||||
private System.Windows.Forms.PictureBox bpkx14;
|
||||
private System.Windows.Forms.PictureBox bpkx13;
|
||||
private System.Windows.Forms.PictureBox bpkx12;
|
||||
private System.Windows.Forms.PictureBox bpkx11;
|
||||
private System.Windows.Forms.PictureBox bpkx10;
|
||||
private System.Windows.Forms.PictureBox bpkx9;
|
||||
private System.Windows.Forms.PictureBox bpkx8;
|
||||
private System.Windows.Forms.PictureBox bpkx7;
|
||||
private System.Windows.Forms.PictureBox bpkx6;
|
||||
private System.Windows.Forms.PictureBox bpkx5;
|
||||
private System.Windows.Forms.PictureBox bpkx4;
|
||||
private System.Windows.Forms.PictureBox bpkx3;
|
||||
private System.Windows.Forms.PictureBox bpkx2;
|
||||
private System.Windows.Forms.PictureBox bpkx1;
|
||||
private System.Windows.Forms.Button B_BoxRight;
|
||||
private System.Windows.Forms.Button B_BoxLeft;
|
||||
private System.Windows.Forms.ComboBox CB_BoxSelect;
|
||||
private System.Windows.Forms.PictureBox PB_BoxSwap;
|
||||
public Controls.BoxEditor Box;
|
||||
}
|
||||
}
|
|
@ -1,24 +1,21 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using PKHeX.Core;
|
||||
using PKHeX.WinForms.Properties;
|
||||
using static PKHeX.WinForms.Main;
|
||||
using PKHeX.WinForms.Controls;
|
||||
|
||||
namespace PKHeX.WinForms
|
||||
{
|
||||
public partial class SAV_BoxViewer : Form
|
||||
{
|
||||
public SAV_BoxViewer(Main p)
|
||||
private readonly SAVEditor parent;
|
||||
public SAV_BoxViewer(SAVEditor p, SlotChangeManager m)
|
||||
{
|
||||
InitializeComponent();
|
||||
parent = p;
|
||||
InitializeComponent();
|
||||
Box.Setup(m);
|
||||
CenterToParent();
|
||||
|
||||
AllowDrop = true;
|
||||
GiveFeedback += (sender, e) => { e.UseDefaultCursors = false; };
|
||||
DragEnter += tabMain_DragEnter;
|
||||
DragDrop += (sender, e) =>
|
||||
{
|
||||
|
@ -26,338 +23,12 @@ namespace PKHeX.WinForms
|
|||
System.Media.SystemSounds.Asterisk.Play();
|
||||
};
|
||||
|
||||
SlotPictureBoxes = new[] {
|
||||
bpkx1, bpkx2, bpkx3, bpkx4, bpkx5, bpkx6,
|
||||
bpkx7, bpkx8, bpkx9, bpkx10,bpkx11,bpkx12,
|
||||
bpkx13,bpkx14,bpkx15,bpkx16,bpkx17,bpkx18,
|
||||
bpkx19,bpkx20,bpkx21,bpkx22,bpkx23,bpkx24,
|
||||
bpkx25,bpkx26,bpkx27,bpkx28,bpkx29,bpkx30,
|
||||
};
|
||||
foreach (PictureBox pb in SlotPictureBoxes)
|
||||
{
|
||||
pb.AllowDrop = true;
|
||||
pb.GiveFeedback += (sender, e) => { e.UseDefaultCursors = false; };
|
||||
pb.MouseUp += pbBoxSlot_MouseUp;
|
||||
pb.MouseDown += pbBoxSlot_MouseDown;
|
||||
pb.MouseMove += pbBoxSlot_MouseMove;
|
||||
pb.DragDrop += pbBoxSlot_DragDrop;
|
||||
pb.DragEnter += pbBoxSlot_DragEnter;
|
||||
pb.QueryContinueDrag += pbBoxSlot_QueryContinueDrag;
|
||||
pb.MouseEnter += pbBoxSlot_MouseEnter;
|
||||
pb.MouseLeave += pbBoxSlot_MouseLeave;
|
||||
}
|
||||
for (int i = SAV.BoxSlotCount; i < SlotPictureBoxes.Length; i++)
|
||||
SlotPictureBoxes[i].Visible = false;
|
||||
|
||||
try
|
||||
{
|
||||
CB_BoxSelect.Items.Clear();
|
||||
for (int i = 0; i < SAV.BoxCount; i++)
|
||||
CB_BoxSelect.Items.Add(SAV.getBoxName(i));
|
||||
}
|
||||
catch
|
||||
{
|
||||
CB_BoxSelect.Items.Clear();
|
||||
for (int i = 1; i <= SAV.BoxCount; i++)
|
||||
CB_BoxSelect.Items.Add($"BOX {i}");
|
||||
}
|
||||
CB_BoxSelect.SelectedIndex = 0;
|
||||
}
|
||||
private readonly Main parent;
|
||||
private readonly PictureBox[] SlotPictureBoxes;
|
||||
public int CurrentBox => CB_BoxSelect.SelectedIndex;
|
||||
|
||||
private void CB_BoxSelect_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
setPKXBoxes();
|
||||
}
|
||||
private void clickBoxRight(object sender, EventArgs e)
|
||||
{
|
||||
CB_BoxSelect.SelectedIndex = (CB_BoxSelect.SelectedIndex + 1) % SAV.BoxCount;
|
||||
}
|
||||
private void clickBoxLeft(object sender, EventArgs e)
|
||||
{
|
||||
CB_BoxSelect.SelectedIndex = (CB_BoxSelect.SelectedIndex + SAV.BoxCount - 1) % SAV.BoxCount;
|
||||
}
|
||||
private void PB_BoxSwap_Click(object sender, EventArgs e)
|
||||
{
|
||||
CB_BoxSelect.SelectedIndex = parent.swapBoxesViewer(CB_BoxSelect.SelectedIndex);
|
||||
}
|
||||
|
||||
// Copied Methods from Main.cs (slightly modified)
|
||||
private int getPKXOffset(int slot)
|
||||
{
|
||||
return SAV.getBoxOffset(CB_BoxSelect.SelectedIndex) + slot * SAV.SIZE_STORED;
|
||||
}
|
||||
public void setPKXBoxes()
|
||||
{
|
||||
int boxoffset = SAV.getBoxOffset(CB_BoxSelect.SelectedIndex);
|
||||
int boxbgval = SAV.getBoxWallpaper(CB_BoxSelect.SelectedIndex);
|
||||
PAN_Box.BackgroundImage = SAV.WallpaperImage(boxbgval);
|
||||
|
||||
for (int i = 0; i < SAV.BoxSlotCount; i++)
|
||||
getSlotFiller(boxoffset + SAV.SIZE_STORED*i, SlotPictureBoxes[i]);
|
||||
}
|
||||
private void getSlotFiller(int offset, PictureBox pb)
|
||||
{
|
||||
if (SAV.getData(offset, SAV.SIZE_STORED).SequenceEqual(new byte[SAV.SIZE_STORED]))
|
||||
{
|
||||
// 00s present in slot.
|
||||
pb.Image = null;
|
||||
pb.BackColor = Color.Transparent;
|
||||
return;
|
||||
}
|
||||
PKM p = SAV.getStoredSlot(offset);
|
||||
if (!p.Valid) // Invalid
|
||||
{
|
||||
// Bad Egg present in slot.
|
||||
pb.Image = null;
|
||||
pb.BackColor = Color.Red;
|
||||
return;
|
||||
}
|
||||
|
||||
int slot = getSlot(pb);
|
||||
pb.Image = p.Sprite(SAV, CB_BoxSelect.SelectedIndex, slot, parent.Menu_FlagIllegal.Checked);
|
||||
pb.BackColor = Color.Transparent;
|
||||
pb.Visible = true;
|
||||
}
|
||||
private void getQuickFiller(PictureBox pb, PKM pk)
|
||||
{
|
||||
int slot = getSlot(pb);
|
||||
pb.Image = pk.Sprite(SAV, CB_BoxSelect.SelectedIndex, slot, parent.Menu_FlagIllegal.Checked);
|
||||
if (pb.BackColor == Color.Red)
|
||||
pb.BackColor = Color.Transparent;
|
||||
}
|
||||
private int getSlot(object sender)
|
||||
{
|
||||
sender = ((sender as ToolStripItem)?.Owner as ContextMenuStrip)?.SourceControl ?? sender as PictureBox;
|
||||
return Array.IndexOf(SlotPictureBoxes, sender);
|
||||
}
|
||||
|
||||
// Drag and drop related functions
|
||||
private static Image OriginalBackground;
|
||||
private static Image CurrentBackground;
|
||||
private void pbBoxSlot_MouseEnter(object sender, EventArgs e)
|
||||
{
|
||||
var pb = (PictureBox)sender;
|
||||
if (pb.Image == null)
|
||||
return;
|
||||
OriginalBackground = pb.BackgroundImage;
|
||||
pb.BackgroundImage = CurrentBackground = Resources.slotHover;
|
||||
Cursor = Cursors.Hand;
|
||||
}
|
||||
private void pbBoxSlot_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
var pb = (PictureBox)sender;
|
||||
if (pb.BackgroundImage != CurrentBackground)
|
||||
return;
|
||||
pb.BackgroundImage = OriginalBackground;
|
||||
Cursor = Cursors.Default;
|
||||
}
|
||||
private void pbBoxSlot_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
DragInfo.LeftMouseIsDown = false;
|
||||
if (e.Button == MouseButtons.Right)
|
||||
DragInfo.RightMouseIsDown = false;
|
||||
}
|
||||
private void pbBoxSlot_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
DragInfo.LeftMouseIsDown = true;
|
||||
if (e.Button == MouseButtons.Right)
|
||||
DragInfo.RightMouseIsDown = true;
|
||||
}
|
||||
private void pbBoxSlot_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (DragInfo.DragDropInProgress)
|
||||
return;
|
||||
|
||||
if (!DragInfo.LeftMouseIsDown)
|
||||
return;
|
||||
|
||||
// The goal is to create a temporary PKX file for the underlying Pokemon
|
||||
// and use that file to perform a drag drop operation.
|
||||
|
||||
// Abort if there is no Pokemon in the given slot.
|
||||
PictureBox pb = (PictureBox)sender;
|
||||
if (pb.Image == null)
|
||||
return;
|
||||
|
||||
int slot = getSlot(pb);
|
||||
int box = slot >= 30 ? -1 : CB_BoxSelect.SelectedIndex;
|
||||
if (SAV.getIsSlotLocked(box, slot))
|
||||
return;
|
||||
|
||||
// Set flag to prevent re-entering.
|
||||
DragInfo.DragDropInProgress = true;
|
||||
|
||||
DragInfo.Source.Parent = this;
|
||||
DragInfo.Source.Slot = slot;
|
||||
DragInfo.Source.Box = box;
|
||||
DragInfo.Source.Offset = getPKXOffset(DragInfo.Source.Slot);
|
||||
|
||||
// Prepare Data
|
||||
DragInfo.Source.Data = SAV.getData(DragInfo.Source.Offset, SAV.SIZE_STORED);
|
||||
|
||||
// Make a new file name based off the PID
|
||||
byte[] dragdata = SAV.decryptPKM(DragInfo.Source.Data);
|
||||
Array.Resize(ref dragdata, SAV.SIZE_STORED);
|
||||
PKM pkx = SAV.getPKM(dragdata);
|
||||
string filename = pkx.FileName;
|
||||
|
||||
// Make File
|
||||
string newfile = Path.Combine(Path.GetTempPath(), Util.CleanFileName(filename));
|
||||
try
|
||||
{
|
||||
File.WriteAllBytes(newfile, dragdata);
|
||||
var img = (Bitmap)pb.Image;
|
||||
DragInfo.Cursor = Cursor.Current = new Cursor(img.GetHicon());
|
||||
pb.Image = null;
|
||||
pb.BackgroundImage = Resources.slotDrag;
|
||||
// Thread Blocks on DoDragDrop
|
||||
DragInfo.CurrentPath = newfile;
|
||||
DragDropEffects result = pb.DoDragDrop(new DataObject(DataFormats.FileDrop, new[] { newfile }), DragDropEffects.Move);
|
||||
if (!DragInfo.Source.IsValid || result != DragDropEffects.Link) // not dropped to another box slot, restore img
|
||||
pb.Image = img;
|
||||
else // refresh image
|
||||
getQuickFiller(pb, SAV.getStoredSlot(DragInfo.Source.Offset));
|
||||
pb.BackgroundImage = null;
|
||||
|
||||
if (DragInfo.SameBox && DragInfo.Destination.IsValid)
|
||||
{
|
||||
if (SAV.getIsTeamSet(box, DragInfo.Destination.Slot) ^ SAV.getIsTeamSet(box, DragInfo.Source.Slot))
|
||||
getQuickFiller(SlotPictureBoxes[DragInfo.Destination.Slot], SAV.getStoredSlot(DragInfo.Destination.Offset));
|
||||
else
|
||||
SlotPictureBoxes[DragInfo.Destination.Slot].Image = img;
|
||||
}
|
||||
}
|
||||
catch (Exception x)
|
||||
{
|
||||
WinFormsUtil.Error("Drag & Drop Error", x);
|
||||
}
|
||||
parent.notifyBoxViewerRefresh();
|
||||
DragInfo.Reset();
|
||||
Cursor = DefaultCursor;
|
||||
|
||||
// Browser apps need time to load data since the file isn't moved to a location on the user's local storage.
|
||||
// Tested 10ms -> too quick, 100ms was fine. 500ms should be safe?
|
||||
new Thread(() =>
|
||||
{
|
||||
Thread.Sleep(500);
|
||||
if (File.Exists(newfile) && DragInfo.CurrentPath == null)
|
||||
File.Delete(newfile);
|
||||
}).Start();
|
||||
}
|
||||
private void pbBoxSlot_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
DragInfo.Destination.Parent = this;
|
||||
DragInfo.Destination.Slot = getSlot(sender);
|
||||
DragInfo.Destination.Offset = getPKXOffset(DragInfo.Destination.Slot);
|
||||
DragInfo.Destination.Box = CB_BoxSelect.SelectedIndex;
|
||||
|
||||
// Check for In-Dropped files (PKX,SAV,ETC)
|
||||
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
if (Directory.Exists(files[0])) { return; }
|
||||
if (SAV.getIsSlotLocked(DragInfo.Destination.Box, DragInfo.Destination.Slot))
|
||||
{
|
||||
DragInfo.Destination.Slot = -1; // Invalidate
|
||||
WinFormsUtil.Alert("Unable to set to locked slot.");
|
||||
return;
|
||||
}
|
||||
if (DragInfo.Source.Offset < 0) // file
|
||||
{
|
||||
if (files.Length <= 0)
|
||||
return;
|
||||
string file = files[0];
|
||||
FileInfo fi = new FileInfo(file);
|
||||
if (!PKX.getIsPKM(fi.Length) && !MysteryGift.getIsMysteryGift(fi.Length))
|
||||
{ return; }
|
||||
|
||||
byte[] data = File.ReadAllBytes(file);
|
||||
MysteryGift mg = MysteryGift.getMysteryGift(data, fi.Extension);
|
||||
PKM temp = mg != null ? mg.convertToPKM(SAV) : PKMConverter.getPKMfromBytes(data, prefer: SAV.Generation);
|
||||
string c;
|
||||
|
||||
PKM pk = PKMConverter.convertToFormat(temp, SAV.PKMType, out c);
|
||||
if (pk == null)
|
||||
{ WinFormsUtil.Error(c); Console.WriteLine(c); return; }
|
||||
|
||||
string[] errata = SAV.IsPKMCompatible(pk);
|
||||
if (errata.Length > 0)
|
||||
{
|
||||
string concat = string.Join(Environment.NewLine, errata);
|
||||
if (DialogResult.Yes != WinFormsUtil.Prompt(MessageBoxButtons.YesNo, concat, "Continue?"))
|
||||
{ Console.WriteLine(c); Console.WriteLine(concat); return; }
|
||||
}
|
||||
|
||||
DragInfo.SetPKM(pk, false);
|
||||
getQuickFiller(SlotPictureBoxes[DragInfo.Destination.Slot], pk);
|
||||
Console.WriteLine(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
PKM pkz = DragInfo.GetPKM(true);
|
||||
if (!DragInfo.Source.IsValid) { } // not overwritable, do nothing
|
||||
else if (ModifierKeys == Keys.Alt && DragInfo.Destination.IsValid) // overwrite
|
||||
{
|
||||
// Clear from slot
|
||||
if (DragInfo.SameBox)
|
||||
getQuickFiller(SlotPictureBoxes[DragInfo.Source.Slot], SAV.BlankPKM); // picturebox
|
||||
|
||||
DragInfo.SetPKM(SAV.BlankPKM, true);
|
||||
}
|
||||
else if (ModifierKeys != Keys.Control && DragInfo.Destination.IsValid) // move
|
||||
{
|
||||
// Load data from destination
|
||||
PKM pk = ((PictureBox)sender).Image != null
|
||||
? DragInfo.GetPKM(false)
|
||||
: SAV.BlankPKM;
|
||||
|
||||
// Set destination pokemon image to source picture box
|
||||
if (DragInfo.SameBox)
|
||||
getQuickFiller(SlotPictureBoxes[DragInfo.Source.Slot], pk);
|
||||
|
||||
// Set destination pokemon data to source slot
|
||||
DragInfo.SetPKM(pk, true);
|
||||
}
|
||||
else if (DragInfo.SameBox) // clone
|
||||
getQuickFiller(SlotPictureBoxes[DragInfo.Source.Slot], pkz);
|
||||
|
||||
// Copy from temp to destination slot.
|
||||
DragInfo.SetPKM(pkz, false);
|
||||
getQuickFiller(SlotPictureBoxes[DragInfo.Destination.Slot], pkz);
|
||||
|
||||
e.Effect = DragDropEffects.Link;
|
||||
Cursor = DefaultCursor;
|
||||
}
|
||||
if (DragInfo.Source.IsParty || DragInfo.Destination.IsParty)
|
||||
parent.setParty();
|
||||
if (DragInfo.Source.Parent == null) // another instance or file
|
||||
{
|
||||
parent.notifyBoxViewerRefresh();
|
||||
DragInfo.Reset();
|
||||
}
|
||||
}
|
||||
private void pbBoxSlot_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.AllowedEffect == (DragDropEffects.Copy | DragDropEffects.Link)) // external file
|
||||
e.Effect = DragDropEffects.Copy;
|
||||
else if (e.Data != null) // within
|
||||
e.Effect = DragDropEffects.Move;
|
||||
|
||||
if (DragInfo.DragDropInProgress)
|
||||
Cursor = (Cursor)DragInfo.Cursor;
|
||||
}
|
||||
private void pbBoxSlot_QueryContinueDrag(object sender, QueryContinueDragEventArgs e)
|
||||
{
|
||||
if (e.Action == DragAction.Cancel || e.Action == DragAction.Drop)
|
||||
{
|
||||
DragInfo.LeftMouseIsDown = false;
|
||||
DragInfo.RightMouseIsDown = false;
|
||||
DragInfo.DragDropInProgress = false;
|
||||
}
|
||||
foreach (PictureBox pb in Box.SlotPictureBoxes)
|
||||
pb.ContextMenuStrip = parent.SlotPictureBoxes[0].ContextMenuStrip;
|
||||
}
|
||||
public int CurrentBox => Box.CurrentBox;
|
||||
private void PB_BoxSwap_Click(object sender, EventArgs e) => Box.CurrentBox = parent.swapBoxesViewer(Box.CurrentBox);
|
||||
public void setPKXBoxes() => Box.ResetSlots();
|
||||
|
||||
private void tabMain_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
|
@ -366,5 +37,11 @@ namespace PKHeX.WinForms
|
|||
else if (e.Data != null) // within
|
||||
e.Effect = DragDropEffects.Move;
|
||||
}
|
||||
|
||||
private void SAV_BoxViewer_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
// Remove viewer from manager list
|
||||
Box.M.Boxes.Remove(Box);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_EventFlags : Form
|
||||
{
|
||||
public SAV_EventFlags()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SaveFile SAV;
|
||||
public SAV_EventFlags(SaveFile sav)
|
||||
{
|
||||
SAV = (Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
|
||||
DragEnter += tabMain_DragEnter;
|
||||
|
@ -46,7 +49,6 @@ namespace PKHeX.WinForms
|
|||
NUD_Flag.Text = "0";
|
||||
}
|
||||
|
||||
private readonly SaveFile SAV = Main.SAV.Clone();
|
||||
private readonly bool[] flags;
|
||||
private readonly ushort[] Constants;
|
||||
private const string flagTag = "bool_";
|
||||
|
@ -76,7 +78,8 @@ namespace PKHeX.WinForms
|
|||
// Copy back Constants
|
||||
changeConstantIndex(null, null); // Trigger Saving
|
||||
SAV.EventConsts = Constants;
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
SAV.Data.CopyTo(Origin.Data, 0);
|
||||
Origin.Edited = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -8,8 +8,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_Inventory : Form
|
||||
{
|
||||
public SAV_Inventory()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SaveFile SAV;
|
||||
public SAV_Inventory(SaveFile sav)
|
||||
{
|
||||
SAV = (Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
if (SAV.Generation <= 3)
|
||||
|
@ -28,7 +31,6 @@ namespace PKHeX.WinForms
|
|||
switchBag(null, null); // bag 0
|
||||
}
|
||||
|
||||
private readonly SaveFile SAV = Main.SAV.Clone();
|
||||
private readonly InventoryPouch[] Pouches;
|
||||
private const string TabPrefix = "TAB_";
|
||||
private const string DGVPrefix = "DGV_";
|
||||
|
@ -43,8 +45,7 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
setBags();
|
||||
SAV.Inventory = Pouches;
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_SimplePokedex : Form
|
||||
{
|
||||
public SAV_SimplePokedex()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SaveFile SAV;
|
||||
public SAV_SimplePokedex(SaveFile sav)
|
||||
{
|
||||
SAV = (Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
seen = new bool[SAV.MaxSpeciesID];
|
||||
|
@ -26,7 +29,6 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
initialized = true;
|
||||
}
|
||||
private readonly SaveFile SAV = Main.SAV.Clone();
|
||||
|
||||
private readonly bool[] seen;
|
||||
private readonly bool[] caught;
|
||||
|
@ -40,8 +42,7 @@ namespace PKHeX.WinForms
|
|||
SAV.setSeen(species, seen[i]);
|
||||
SAV.setCaught(species, caught[i]);
|
||||
}
|
||||
SAV.Data.CopyTo(Main.SAV.Data, 0);
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,11 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_SimpleTrainer : Form
|
||||
{
|
||||
public SAV_SimpleTrainer()
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SaveFile SAV;
|
||||
public SAV_SimpleTrainer(SaveFile sav)
|
||||
{
|
||||
SAV = (Origin = sav).Clone();
|
||||
Loading = true;
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
|
@ -150,7 +153,6 @@ namespace PKHeX.WinForms
|
|||
Loading = false;
|
||||
}
|
||||
private readonly CheckBox[] cba;
|
||||
private readonly SaveFile SAV = Main.SAV.Clone();
|
||||
private readonly bool Loading;
|
||||
private bool MapUpdated;
|
||||
|
||||
|
@ -245,9 +247,8 @@ namespace PKHeX.WinForms
|
|||
|
||||
SAV.SecondsToStart = getSeconds(CAL_AdventureStartDate, CAL_AdventureStartTime);
|
||||
SAV.SecondsToFame = getSeconds(CAL_HoFDate, CAL_HoFTime);
|
||||
|
||||
SAV.Data.CopyTo(Main.SAV.Data, 0);
|
||||
Main.SAV.Edited = true;
|
||||
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -10,11 +10,14 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
public partial class SAV_Wondercard : Form
|
||||
{
|
||||
public SAV_Wondercard(MysteryGift g = null)
|
||||
private readonly SaveFile Origin;
|
||||
private readonly SaveFile SAV;
|
||||
public SAV_Wondercard(SaveFile sav, MysteryGift g = null)
|
||||
{
|
||||
SAV = (Origin = sav).Clone();
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.curlanguage);
|
||||
mga = Main.SAV.GiftAlbum;
|
||||
mga = SAV.GiftAlbum;
|
||||
|
||||
switch (SAV.Generation)
|
||||
{
|
||||
|
@ -53,8 +56,7 @@ namespace PKHeX.WinForms
|
|||
else
|
||||
viewGiftData(g);
|
||||
}
|
||||
|
||||
private readonly SaveFile SAV = Main.SAV.Clone();
|
||||
|
||||
private MysteryGiftAlbum mga;
|
||||
private MysteryGift mg;
|
||||
private readonly PictureBox[] pba;
|
||||
|
@ -70,7 +72,7 @@ namespace PKHeX.WinForms
|
|||
for (int i = 0; i < mga.Gifts.Length; i++)
|
||||
{
|
||||
MysteryGift m = mga.Gifts[i];
|
||||
pba[i].Image = m.Sprite();
|
||||
pba[i].Image = m.Sprite(SAV);
|
||||
}
|
||||
}
|
||||
private void viewGiftData(MysteryGift g)
|
||||
|
@ -84,8 +86,8 @@ namespace PKHeX.WinForms
|
|||
"Do you want to remove the USED flag so that it is UNUSED?"))
|
||||
g.GiftUsed = false;
|
||||
|
||||
RTB.Text = getDescription(g);
|
||||
PB_Preview.Image = g.Sprite();
|
||||
RTB.Text = getDescription(g, SAV);
|
||||
PB_Preview.Image = g.Sprite(SAV);
|
||||
mg = g;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -223,8 +225,7 @@ namespace PKHeX.WinForms
|
|||
mga.Flags = flags;
|
||||
SAV.GiftAlbum = mga;
|
||||
|
||||
Main.SAV.Data = SAV.Data;
|
||||
Main.SAV.Edited = true;
|
||||
Origin.setData(SAV.Data, 0);
|
||||
Close();
|
||||
}
|
||||
|
||||
|
@ -281,7 +282,7 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
if (g.CardID == 2048 && g.Item == 726) // Eon Ticket (OR/AS)
|
||||
{
|
||||
if (!Main.SAV.ORAS || ((SAV6)SAV).EonTicket < 0)
|
||||
if (!SAV.ORAS || ((SAV6)SAV).EonTicket < 0)
|
||||
goto reject;
|
||||
BitConverter.GetBytes(WC6.EonTicketConst).CopyTo(SAV.Data, ((SAV6)SAV).EonTicket);
|
||||
}
|
||||
|
@ -324,7 +325,7 @@ namespace PKHeX.WinForms
|
|||
Image qr = QR.getQRImage(mg.Data, server);
|
||||
if (qr == null) return;
|
||||
|
||||
string desc = $"({mg.Type}) {getDescription(mg)}";
|
||||
string desc = $"({mg.Type}) {getDescription(mg, SAV)}";
|
||||
|
||||
new QR(qr, PB_Preview.Image, desc + "PKHeX Wonder Card @ ProjectPokemon.org", "", "", "").ShowDialog();
|
||||
}
|
||||
|
@ -448,7 +449,7 @@ namespace PKHeX.WinForms
|
|||
e.Effect = DragDropEffects.Move;
|
||||
}
|
||||
private int wc_slot = -1;
|
||||
private static string getDescription(MysteryGift gift)
|
||||
private static string getDescription(MysteryGift gift, SaveFile SAV)
|
||||
{
|
||||
if (gift.Empty)
|
||||
return "Empty Slot. No data!";
|
||||
|
@ -470,7 +471,7 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
else if (gift.IsPokémon)
|
||||
{
|
||||
PKM pk = gift.convertToPKM(Main.SAV);
|
||||
PKM pk = gift.convertToPKM(SAV);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -60,14 +60,14 @@ namespace PKHeX.WinForms
|
|||
return Resources.ResourceManager.GetObject("type_icon_" + type.ToString("00")) as Image;
|
||||
}
|
||||
|
||||
private static Image getSprite(MysteryGift gift)
|
||||
private static Image getSprite(MysteryGift gift, SaveFile SAV)
|
||||
{
|
||||
if (gift.Empty)
|
||||
return null;
|
||||
|
||||
Image img;
|
||||
if (gift.IsPokémon)
|
||||
img = getSprite(gift.convertToPKM(Main.SAV));
|
||||
img = getSprite(gift.convertToPKM(SAV));
|
||||
else if (gift.IsItem)
|
||||
img = (Image)(Resources.ResourceManager.GetObject("item_" + gift.Item) ?? Resources.unknown);
|
||||
else
|
||||
|
@ -125,7 +125,7 @@ namespace PKHeX.WinForms
|
|||
|
||||
// Extension Methods
|
||||
public static Image WallpaperImage(this SaveFile SAV, int box) => getWallpaper(SAV, box);
|
||||
public static Image Sprite(this MysteryGift gift) => getSprite(gift);
|
||||
public static Image Sprite(this MysteryGift gift, SaveFile SAV) => getSprite(gift, SAV);
|
||||
public static Image Sprite(this SaveFile SAV) => getSprite(SAV);
|
||||
public static Image Sprite(this PKM pkm, bool isBoxBGRed = false) => getSprite(pkm, isBoxBGRed);
|
||||
public static Image Sprite(this PKM pkm, SaveFile SAV, int box, int slot, bool flagIllegal = false)
|
||||
|
|
|
@ -119,6 +119,9 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
#endregion
|
||||
|
||||
public static Form FirstFormOfType<T>(this Form f) => f.OwnedForms.FirstOrDefault(form => form is T);
|
||||
public static Control GetUnderlyingControl(object sender) => ((sender as ToolStripItem)?.Owner as ContextMenuStrip)?.SourceControl ?? sender as PictureBox;
|
||||
|
||||
#region Message Displays
|
||||
/// <summary>
|
||||
/// Displays a dialog showing the details of an error.
|
||||
|
|
|
@ -16,6 +16,18 @@ namespace PKHeX.Tests.PKM
|
|||
public int EggMetDay { get; set; }
|
||||
public override PersonalInfo PersonalInfo => null;
|
||||
|
||||
// Maximums
|
||||
public override int MaxMoveID => -1;
|
||||
public override int MaxSpeciesID => -1;
|
||||
public override int MaxAbilityID => -1;
|
||||
public override int MaxItemID => -1;
|
||||
public override int MaxBallID => -1;
|
||||
public override int MaxGameID => -1;
|
||||
public override int MaxIV => -1;
|
||||
public override int MaxEV => -1;
|
||||
public override int OTLength => -1;
|
||||
public override int NickLength => -1;
|
||||
|
||||
public override string getString(int Offset, int Count) { throw new NotImplementedException(); }
|
||||
public override byte[] setString(string value, int maxLength) { throw new NotImplementedException(); }
|
||||
|
||||
|
|
Loading…
Reference in a new issue