diff --git a/Directory.Build.props b/Directory.Build.props index 66ae3be32..5b2820643 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 24.11.11 + 25.02.23 13 enable en diff --git a/PKHeX.Core/Editing/Saves/Slots/Extensions.cs b/PKHeX.Core/Editing/Saves/Slots/Extensions.cs index 11cf4fd94..be84c3c3c 100644 --- a/PKHeX.Core/Editing/Saves/Slots/Extensions.cs +++ b/PKHeX.Core/Editing/Saves/Slots/Extensions.cs @@ -5,7 +5,7 @@ namespace PKHeX.Core; public static partial class Extensions { - public static IReadOnlyList GetAllPKM(this SaveFile sav) + public static List GetAllPKM(this SaveFile sav) { var result = new List(); if (sav.HasBox) @@ -161,7 +161,7 @@ private static List GetExtraSlots7(SAV7 sav, bool all) return list; } - private static List GetExtraSlots7b(ISaveBlock7b sav) + private static List GetExtraSlots7b(SAV7b sav) { return [ @@ -169,7 +169,7 @@ private static List GetExtraSlots7b(ISaveBlock7b sav) ]; } - private static List GetExtraSlots8(ISaveBlock8Main sav) + private static List GetExtraSlots8(SAV8SWSH sav) { var fused = sav.Fused; var dc = sav.Daycare; @@ -178,6 +178,7 @@ private static List GetExtraSlots8(ISaveBlock8Main sav) new(fused[0], 0, true) {Type = StorageSlotType.FusedKyurem}, new(fused[1], 1, true) {Type = StorageSlotType.FusedNecrozmaS}, new(fused[2], 2, true) {Type = StorageSlotType.FusedNecrozmaM}, + // If Calyrex exists, insert here at index 3. new(dc[0], 0) {Type = StorageSlotType.Daycare}, new(dc[1], 1) {Type = StorageSlotType.Daycare}, @@ -185,10 +186,9 @@ private static List GetExtraSlots8(ISaveBlock8Main sav) new(dc[3], 3) {Type = StorageSlotType.Daycare}, }; - if (sav is SAV8SWSH {SaveRevision: >= 2} s8) + if (sav.Blocks.TryGetBlock(SaveBlockAccessor8SWSH.KFusedCalyrex, out var calyrex)) { - var block = s8.Blocks.GetBlockSafe(SaveBlockAccessor8SWSH.KFusedCalyrex); - var c = new SlotInfoMisc(block.Raw, 3, true) {Type = StorageSlotType.FusedCalyrex}; + var c = new SlotInfoMisc(calyrex.Raw, 3, true) {Type = StorageSlotType.FusedCalyrex}; list.Insert(3, c); } @@ -218,11 +218,10 @@ private static List GetExtraSlots8a(SAV8LA _) private static List GetExtraSlots9(SAV9SV sav) { - var afterBox = sav.GetBoxOffset(BoxLayout9.BoxCount); var list = new List { // Ride Legend - new(sav.BoxInfo.Raw.Slice(afterBox, PokeCrypto.SIZE_9PARTY), 0, true, Mutable: true) { Type = StorageSlotType.Ride }, + new(sav.BoxInfo.RideLegend, 0, true, Mutable: true) { Type = StorageSlotType.Ride }, }; var block = sav.Blocks.GetBlock(SaveBlockAccessor9SV.KFusedCalyrex); diff --git a/PKHeX.Core/Legality/Core.cs b/PKHeX.Core/Legality/Core.cs index 3f9f8c692..92ccf388e 100644 --- a/PKHeX.Core/Legality/Core.cs +++ b/PKHeX.Core/Legality/Core.cs @@ -80,22 +80,22 @@ public static class Legal internal const int MaxAbilityID_8 = MaxAbilityID_8_R2; // Orion (No DLC) - internal const int MaxSpeciesID_8_O0 = 890; // Eternatus - internal const int MaxMoveID_8_O0 = 796; // Steel Beam - internal const int MaxItemID_8_O0 = 1278; // Rotom Catalog, ignore all catalog parts - internal const int MaxAbilityID_8_O0 = 258; // Hunger Switch + internal const ushort MaxSpeciesID_8_O0 = 890; // Eternatus + internal const ushort MaxMoveID_8_O0 = 796; // Steel Beam + internal const ushort MaxItemID_8_O0 = 1278; // Rotom Catalog, ignore all catalog parts + internal const ushort MaxAbilityID_8_O0 = 258; // Hunger Switch // Rigel 1 (DLC 1: Isle of Armor) - internal const int MaxSpeciesID_8_R1 = 893; // Zarude - internal const int MaxMoveID_8_R1 = 818; // Surging Strikes - internal const int MaxItemID_8_R1 = 1589; // Mark Charm - internal const int MaxAbilityID_8_R1 = 260; // Unseen Fist + internal const ushort MaxSpeciesID_8_R1 = 893; // Zarude + internal const ushort MaxMoveID_8_R1 = 818; // Surging Strikes + internal const ushort MaxItemID_8_R1 = 1589; // Mark Charm + internal const ushort MaxAbilityID_8_R1 = 260; // Unseen Fist // Rigel 2 (DLC 2: Crown Tundra) - internal const int MaxSpeciesID_8_R2 = 898; // Calyrex - internal const int MaxMoveID_8_R2 = 826; // Eerie Spell - internal const int MaxItemID_8_R2 = 1607; // Reins of Unity - internal const int MaxAbilityID_8_R2 = 267; // As One (Glastrier) + internal const ushort MaxSpeciesID_8_R2 = 898; // Calyrex + internal const ushort MaxMoveID_8_R2 = 826; // Eerie Spell + internal const ushort MaxItemID_8_R2 = 1607; // Reins of Unity + internal const ushort MaxAbilityID_8_R2 = 267; // As One (Glastrier) internal const int MaxBallID_8 = 0x1A; // 26 Beast internal const GameVersion MaxGameID_8 = GameVersion.SH; @@ -114,25 +114,25 @@ public static class Legal //internal const GameVersion MaxGameID_8b = GameVersion.SP; internal const int MaxAbilityID_8b = MaxAbilityID_8_R2; - internal const int MaxSpeciesID_9 = MaxSpeciesID_9_T2; - internal const int MaxMoveID_9 = MaxMoveID_9_T2; - internal const int MaxItemID_9 = MaxItemID_9_T2; - internal const int MaxAbilityID_9 = MaxAbilityID_9_T2; + internal const ushort MaxSpeciesID_9 = MaxSpeciesID_9_T2; + internal const ushort MaxMoveID_9 = MaxMoveID_9_T2; + internal const ushort MaxItemID_9 = MaxItemID_9_T2; + internal const ushort MaxAbilityID_9 = MaxAbilityID_9_T2; - internal const int MaxSpeciesID_9_T0 = (int)Species.IronLeaves; - internal const int MaxMoveID_9_T0 = (int)Move.MagicalTorque; - internal const int MaxItemID_9_T0 = 2400; // Yellow Dish - internal const int MaxAbilityID_9_T0 = (int)Ability.MyceliumMight; + internal const ushort MaxSpeciesID_9_T0 = (int)Species.IronLeaves; + internal const ushort MaxMoveID_9_T0 = (int)Move.MagicalTorque; + internal const ushort MaxItemID_9_T0 = 2400; // Yellow Dish + internal const ushort MaxAbilityID_9_T0 = (int)Ability.MyceliumMight; - internal const int MaxSpeciesID_9_T1 = (int)Species.Ogerpon; - internal const int MaxMoveID_9_T1 = (int)Move.IvyCudgel; - internal const int MaxItemID_9_T1 = 2481; // Glimmering Charm - internal const int MaxAbilityID_9_T1 = (int)Ability.SupersweetSyrup; + internal const ushort MaxSpeciesID_9_T1 = (int)Species.Ogerpon; + internal const ushort MaxMoveID_9_T1 = (int)Move.IvyCudgel; + internal const ushort MaxItemID_9_T1 = 2481; // Glimmering Charm + internal const ushort MaxAbilityID_9_T1 = (int)Ability.SupersweetSyrup; - internal const int MaxSpeciesID_9_T2 = (int)Species.Pecharunt; - internal const int MaxMoveID_9_T2 = (int)Move.MalignantChain; - internal const int MaxItemID_9_T2 = 2557; // Briar’s Book - internal const int MaxAbilityID_9_T2 = (int)Ability.PoisonPuppeteer; + internal const ushort MaxSpeciesID_9_T2 = (int)Species.Pecharunt; + internal const ushort MaxMoveID_9_T2 = (int)Move.MalignantChain; + internal const ushort MaxItemID_9_T2 = 2557; // Briar’s Book + internal const ushort MaxAbilityID_9_T2 = (int)Ability.PoisonPuppeteer; internal const int MaxBallID_9 = (int)Ball.LAOrigin; internal const GameVersion MaxGameID_9 = GameVersion.VL; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterSlot3.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterSlot3.cs index 87d53e02d..18edac170 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterSlot3.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterSlot3.cs @@ -70,7 +70,7 @@ private void SetPINGA(PK3 pk, EncounterCriteria criteria, PersonalInfo3 pi) { if (Species != (int)Core.Species.Unown) { - if (criteria.IsSpecifiedIVsAll() && this.SetFromIVs(pk, criteria)) + if (criteria.IsSpecifiedIVsAll() && this.SetFromIVs(pk, pi, criteria, pk.E)) return; this.SetRandom(pk, pi, criteria, Util.Rand32()); } diff --git a/PKHeX.Core/Legality/Encounters/Templates/Shared/EncounterInvalid.cs b/PKHeX.Core/Legality/Encounters/Templates/Shared/EncounterInvalid.cs index cd607c6bb..b62355d24 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Shared/EncounterInvalid.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Shared/EncounterInvalid.cs @@ -18,7 +18,7 @@ public sealed record EncounterInvalid : IEncounterable public EntityContext Context { get; } public GameVersion Version { get; } public bool IsShiny => false; - public Shiny Shiny => Shiny.Never; + public Shiny Shiny => Shiny.Random; public string Name => "Invalid"; public string LongName => "Invalid"; diff --git a/PKHeX.Core/Legality/RNG/ClassicEra/Gen3/GenerateMethodH.cs b/PKHeX.Core/Legality/RNG/ClassicEra/Gen3/GenerateMethodH.cs index d85f64f5c..9dd7c46d7 100644 --- a/PKHeX.Core/Legality/RNG/ClassicEra/Gen3/GenerateMethodH.cs +++ b/PKHeX.Core/Legality/RNG/ClassicEra/Gen3/GenerateMethodH.cs @@ -113,15 +113,14 @@ public static void SetRandomUnown(this T enc, PK3 pk, EncounterCriteria crite } } - public static bool SetFromIVs(this T enc, PK3 pk, EncounterCriteria criteria) + public static bool SetFromIVs(this T enc, PK3 pk, PersonalInfo3 pi, EncounterCriteria criteria, bool emerald) where T : IEncounterSlot3 { - var gr = pk.PersonalInfo.Gender; + var gr = pi.Gender; criteria.GetCombinedIVs(out var iv1, out var iv2); Span all = stackalloc uint[LCRNG.MaxCountSeedsIV]; var count = LCRNGReversal.GetSeedsIVs(all, iv1 << 16, iv2 << 16); var seeds = all[..count]; - bool emerald = pk.E; foreach (ref var seed in seeds) { seed = LCRNG.Prev2(seed); diff --git a/PKHeX.Core/PKM/Searching/SearchUtil.cs b/PKHeX.Core/PKM/Searching/SearchUtil.cs index ab5c54715..0d4c1e155 100644 --- a/PKHeX.Core/PKM/Searching/SearchUtil.cs +++ b/PKHeX.Core/PKM/Searching/SearchUtil.cs @@ -27,19 +27,13 @@ public static class SearchUtil _ => pk.Generation == generation, }; - public static bool SatisfiesFilterLevel(PKM pk, SearchComparison option, int level) + public static bool SatisfiesFilterLevel(PKM pk, SearchComparison option, int level) => option switch { - if (level > 100) - return true; // why??? - - return option switch - { - SearchComparison.LessThanEquals => pk.Stat_Level <= level, - SearchComparison.Equals => pk.Stat_Level == level, - SearchComparison.GreaterThanEquals => pk.Stat_Level >= level, - _ => true, - }; - } + SearchComparison.LessThanEquals => pk.Stat_Level <= level, + SearchComparison.Equals => pk.Stat_Level == level, + SearchComparison.GreaterThanEquals => pk.Stat_Level >= level, + _ => true, + }; public static bool SatisfiesFilterEVs(PKM pk, int option) => option switch { diff --git a/PKHeX.Core/Resources/legality/mgdb/wa8.pkl b/PKHeX.Core/Resources/legality/mgdb/wa8.pkl index 8b9133587..798d31136 100644 Binary files a/PKHeX.Core/Resources/legality/mgdb/wa8.pkl and b/PKHeX.Core/Resources/legality/mgdb/wa8.pkl differ diff --git a/PKHeX.Core/Resources/legality/mgdb/wb7full.pkl b/PKHeX.Core/Resources/legality/mgdb/wb7full.pkl index 970f93764..aebfe7261 100644 Binary files a/PKHeX.Core/Resources/legality/mgdb/wb7full.pkl and b/PKHeX.Core/Resources/legality/mgdb/wb7full.pkl differ diff --git a/PKHeX.Core/Resources/legality/mgdb/wb8.pkl b/PKHeX.Core/Resources/legality/mgdb/wb8.pkl index c95c63bec..7b398d382 100644 Binary files a/PKHeX.Core/Resources/legality/mgdb/wb8.pkl and b/PKHeX.Core/Resources/legality/mgdb/wb8.pkl differ diff --git a/PKHeX.Core/Resources/legality/mgdb/wc8.pkl b/PKHeX.Core/Resources/legality/mgdb/wc8.pkl index 6809699ca..b87ab3684 100644 Binary files a/PKHeX.Core/Resources/legality/mgdb/wc8.pkl and b/PKHeX.Core/Resources/legality/mgdb/wc8.pkl differ diff --git a/PKHeX.Core/Resources/legality/mgdb/wc9.pkl b/PKHeX.Core/Resources/legality/mgdb/wc9.pkl index 0d83799d5..d94b89b89 100644 Binary files a/PKHeX.Core/Resources/legality/mgdb/wc9.pkl and b/PKHeX.Core/Resources/legality/mgdb/wc9.pkl differ diff --git a/PKHeX.Core/Resources/legality/wild/encounter_go_home.pkl b/PKHeX.Core/Resources/legality/wild/encounter_go_home.pkl index 42dae8391..88e64e340 100644 Binary files a/PKHeX.Core/Resources/legality/wild/encounter_go_home.pkl and b/PKHeX.Core/Resources/legality/wild/encounter_go_home.pkl differ diff --git a/PKHeX.Core/Saves/Access/ISaveBlock9Main.cs b/PKHeX.Core/Saves/Access/ISaveBlock9Main.cs index 46b3f57c4..8154f25e4 100644 --- a/PKHeX.Core/Saves/Access/ISaveBlock9Main.cs +++ b/PKHeX.Core/Saves/Access/ISaveBlock9Main.cs @@ -5,7 +5,7 @@ namespace PKHeX.Core; /// public interface ISaveBlock9Main { - Box8 BoxInfo { get; } + Box9 BoxInfo { get; } Party9 PartyInfo { get; } MyItem9 Items { get; } MyStatus9 MyStatus { get; } diff --git a/PKHeX.Core/Saves/Access/SaveBlockAccessor9SV.cs b/PKHeX.Core/Saves/Access/SaveBlockAccessor9SV.cs index f836de0fc..c9c5ceedf 100644 --- a/PKHeX.Core/Saves/Access/SaveBlockAccessor9SV.cs +++ b/PKHeX.Core/Saves/Access/SaveBlockAccessor9SV.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; // ReSharper disable UnusedMember.Local #pragma warning disable IDE0051 // Remove unused private members @@ -12,7 +11,7 @@ namespace PKHeX.Core; public sealed class SaveBlockAccessor9SV(SAV9SV sav) : SCBlockAccessor, ISaveBlock9Main { public override IReadOnlyList BlockInfo { get; } = sav.AllBlocks; - public Box8 BoxInfo { get; } = new(sav, Block(sav, KBox)); + public Box9 BoxInfo { get; } = new(sav, Block(sav, KBox)); public Party9 PartyInfo { get; } = new(sav, Block(sav, KParty)); public MyItem9 Items { get; } = new(sav, Block(sav, KItem)); public MyStatus9 MyStatus { get; } = new(sav, Block(sav, KMyStatus)); diff --git a/PKHeX.Core/Saves/SAV8SWSH.cs b/PKHeX.Core/Saves/SAV8SWSH.cs index f13dd4367..9583126a8 100644 --- a/PKHeX.Core/Saves/SAV8SWSH.cs +++ b/PKHeX.Core/Saves/SAV8SWSH.cs @@ -106,28 +106,13 @@ private void Initialize() Party = 0; TeamIndexes.LoadBattleTeams(); - int rev = SaveRevision; - if (rev == 0) + (m_move, m_spec, m_item, m_abil) = SaveRevision switch { - m_move = Legal.MaxMoveID_8_O0; - m_spec = Legal.MaxSpeciesID_8_O0; - m_item = Legal.MaxItemID_8_O0; - m_abil = Legal.MaxAbilityID_8_O0; - } - else if (rev == 1) - { - m_move = Legal.MaxMoveID_8_R1; - m_spec = Legal.MaxSpeciesID_8_R1; - m_item = Legal.MaxItemID_8_R1; - m_abil = Legal.MaxAbilityID_8_R1; - } - else - { - m_move = Legal.MaxMoveID_8_R2; - m_spec = Legal.MaxSpeciesID_8_R2; - m_item = Legal.MaxItemID_8_R2; - m_abil = Legal.MaxAbilityID_8_R2; - } + 0 => (Legal.MaxMoveID_8_O0, Legal.MaxSpeciesID_8_O0, Legal.MaxItemID_8_O0, Legal.MaxAbilityID_8_O0), + 1 => (Legal.MaxMoveID_8_R1, Legal.MaxSpeciesID_8_R1, Legal.MaxItemID_8_R1, Legal.MaxAbilityID_8_R1), + 2 => (Legal.MaxMoveID_8_R2, Legal.MaxSpeciesID_8_R2, Legal.MaxItemID_8_R2, Legal.MaxAbilityID_8_R2), + _ => throw new ArgumentOutOfRangeException(nameof(SaveRevision)), + }; } // Save Data Attributes diff --git a/PKHeX.Core/Saves/SAV9SV.cs b/PKHeX.Core/Saves/SAV9SV.cs index 7d725377f..7ba2b8810 100644 --- a/PKHeX.Core/Saves/SAV9SV.cs +++ b/PKHeX.Core/Saves/SAV9SV.cs @@ -67,7 +67,7 @@ public override void CopyChangesFrom(SaveFile sav) public IReadOnlyList AllBlocks { get; } public T GetValue(uint key) where T : struct => Blocks.GetBlockValueSafe(key); public void SetValue(uint key, T value) where T : struct => Blocks.SetBlockValueSafe(key, value); - public Box8 BoxInfo => Blocks.BoxInfo; + public Box9 BoxInfo => Blocks.BoxInfo; public Party9 PartyInfo => Blocks.PartyInfo; public MyItem9 Items => Blocks.Items; public MyStatus9 MyStatus => Blocks.MyStatus; @@ -113,32 +113,13 @@ private void Initialize() Party = 0; TeamIndexes.LoadBattleTeams(); - int rev = SaveRevision; - if (rev == 0) + (m_move, m_spec, m_item, m_abil) = SaveRevision switch { - m_move = Legal.MaxMoveID_9_T0; - m_spec = Legal.MaxSpeciesID_9_T0; - m_item = Legal.MaxItemID_9_T0; - m_abil = Legal.MaxAbilityID_9_T0; - } - else if (rev == 1) - { - m_move = Legal.MaxMoveID_9_T1; - m_spec = Legal.MaxSpeciesID_9_T1; - m_item = Legal.MaxItemID_9_T1; - m_abil = Legal.MaxAbilityID_9_T1; - } - else if (rev == 2) - { - m_move = Legal.MaxMoveID_9_T2; - m_spec = Legal.MaxSpeciesID_9_T2; - m_item = Legal.MaxItemID_9_T2; - m_abil = Legal.MaxAbilityID_9_T2; - } - else - { - throw new ArgumentOutOfRangeException(nameof(SaveRevision)); - } + 0 => (Legal.MaxMoveID_9_T0, Legal.MaxSpeciesID_9_T0, Legal.MaxItemID_9_T0, Legal.MaxAbilityID_9_T0), + 1 => (Legal.MaxMoveID_9_T1, Legal.MaxSpeciesID_9_T1, Legal.MaxItemID_9_T1, Legal.MaxAbilityID_9_T1), + 2 => (Legal.MaxMoveID_9_T2, Legal.MaxSpeciesID_9_T2, Legal.MaxItemID_9_T2, Legal.MaxAbilityID_9_T2), + _ => throw new ArgumentOutOfRangeException(nameof(SaveRevision)), + }; } // Configuration diff --git a/PKHeX.Core/Saves/Substructures/Battle Videos/BattleVideo5.cs b/PKHeX.Core/Saves/Substructures/Battle Videos/BattleVideo5.cs index b6a3796b5..7702ae75c 100644 --- a/PKHeX.Core/Saves/Substructures/Battle Videos/BattleVideo5.cs +++ b/PKHeX.Core/Saves/Substructures/Battle Videos/BattleVideo5.cs @@ -25,7 +25,7 @@ public sealed class BattleVideo5(Memory Raw) : IBattleVideo public byte Generation => 5; public IEnumerable Contents => GetTeam(0).Concat(GetTeam(1)); // don't bother with multi-battles public static bool IsValid(ReadOnlySpan data) => data.Length == SIZE - && ReadUInt32LittleEndian(data[^2..]) == Checksums.CRC16_CCITT(data[..^4]); + && ReadUInt16LittleEndian(data[^4..]) == Checksums.CRC16_CCITT(data[..^4]); // Structure: // 0xC4 - 0x18A0: encrypted region diff --git a/PKHeX.Core/Saves/Substructures/Gen9/Box9.cs b/PKHeX.Core/Saves/Substructures/Gen9/Box9.cs new file mode 100644 index 000000000..180b27719 --- /dev/null +++ b/PKHeX.Core/Saves/Substructures/Gen9/Box9.cs @@ -0,0 +1,9 @@ +using System; + +namespace PKHeX.Core; + +public sealed class Box9(SaveFile sav, SCBlock block) : SaveBlock(sav, block.Raw) +{ + private const int afterBox = BoxLayout9.BoxCount * 30 * PokeCrypto.SIZE_9PARTY; + public Memory RideLegend => Raw.Slice(afterBox, PokeCrypto.SIZE_9PARTY); +} diff --git a/PKHeX.WinForms/Controls/PKM Editor/EditPK7.cs b/PKHeX.WinForms/Controls/PKM Editor/EditPK7.cs index 2be62d796..6c0cd78db 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/EditPK7.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/EditPK7.cs @@ -59,6 +59,14 @@ private void PopulateFieldsPB7() LoadAVs(pk7); SizeCP.LoadPKM(pk7); + try + { + CAL_ReceivedDateTime.Value = new DateTime( + pk7.ReceivedYear + 2000, pk7.ReceivedMonth, pk7.ReceivedDay, + pk7.ReceivedHour, pk7.ReceivedMinute, pk7.ReceivedSecond); + } + catch { /* */ } + LoadPartyStats(pk7); UpdateStats(); } @@ -83,6 +91,14 @@ private PB7 PreparePB7() // heal values to original pk7.FieldEventFatigue1 = pk7.FieldEventFatigue2 = 100; + var date = CAL_ReceivedDateTime.Value; + pk7.ReceivedYear = (byte)(date.Year - 2000); + pk7.ReceivedMonth = (byte)date.Month; + pk7.ReceivedDay = (byte)date.Day; + pk7.ReceivedHour = (byte)date.Hour; + pk7.ReceivedMinute = (byte)date.Minute; + pk7.ReceivedSecond = (byte)date.Second; + pk7.FixMoves(); pk7.FixRelearn(); if (ModifyPKM) diff --git a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.Designer.cs b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.Designer.cs index 0b8e93051..f8c5652e1 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.Designer.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.Designer.cs @@ -247,6 +247,8 @@ private void InitializeComponent() Tab_Moves = new System.Windows.Forms.TabPage(); Tab_Cosmetic = new System.Windows.Forms.TabPage(); Tab_OTMisc = new System.Windows.Forms.TabPage(); + CAL_ReceivedDateTime = new System.Windows.Forms.DateTimePicker(); + FLP_ReceivedDate = new System.Windows.Forms.FlowLayoutPanel(); Hidden_TC.SuspendLayout(); Hidden_Main.SuspendLayout(); FLP_Main.SuspendLayout(); @@ -337,6 +339,7 @@ private void InitializeComponent() FLP_HomeTracker.SuspendLayout(); FLP_EncryptionConstant.SuspendLayout(); TC_Editor.SuspendLayout(); + FLP_ReceivedDate.SuspendLayout(); SuspendLayout(); // // Hidden_TC @@ -354,7 +357,7 @@ private void InitializeComponent() Hidden_TC.Margin = new System.Windows.Forms.Padding(0); Hidden_TC.Name = "Hidden_TC"; Hidden_TC.SelectedIndex = 0; - Hidden_TC.Size = new System.Drawing.Size(304, 400); + Hidden_TC.Size = new System.Drawing.Size(304, 524); Hidden_TC.SizeMode = System.Windows.Forms.TabSizeMode.Fixed; Hidden_TC.TabIndex = 1; Hidden_TC.TabStop = false; @@ -366,7 +369,7 @@ private void InitializeComponent() Hidden_Main.Location = new System.Drawing.Point(4, 5); Hidden_Main.Margin = new System.Windows.Forms.Padding(0); Hidden_Main.Name = "Hidden_Main"; - Hidden_Main.Size = new System.Drawing.Size(296, 391); + Hidden_Main.Size = new System.Drawing.Size(296, 515); Hidden_Main.TabIndex = 0; Hidden_Main.Text = "Main"; Hidden_Main.UseVisualStyleBackColor = true; @@ -395,7 +398,7 @@ private void InitializeComponent() FLP_Main.Margin = new System.Windows.Forms.Padding(0); FLP_Main.Name = "FLP_Main"; FLP_Main.Padding = new System.Windows.Forms.Padding(0, 16, 0, 0); - FLP_Main.Size = new System.Drawing.Size(296, 391); + FLP_Main.Size = new System.Drawing.Size(296, 515); FLP_Main.TabIndex = 103; // // FLP_PID @@ -511,8 +514,8 @@ private void InitializeComponent() // // UC_Gender // - UC_Gender.AccessibleDescription = "Entity Gender Pane"; - UC_Gender.AccessibleName = "Entity Gender Pane"; + UC_Gender.AccessibleDescription = "Entity Gender Pane (0)"; + UC_Gender.AccessibleName = "Entity Gender Pane (0)"; UC_Gender.AccessibleRole = System.Windows.Forms.AccessibleRole.Graphic; UC_Gender.AllowClick = false; UC_Gender.BackgroundImage = (System.Drawing.Image)resources.GetObject("UC_Gender.BackgroundImage"); @@ -569,7 +572,7 @@ private void InitializeComponent() CB_Species.Location = new System.Drawing.Point(104, 0); CB_Species.Margin = new System.Windows.Forms.Padding(0); CB_Species.Name = "CB_Species"; - CB_Species.Size = new System.Drawing.Size(144, 23); + CB_Species.Size = new System.Drawing.Size(144, 25); CB_Species.TabIndex = 3; CB_Species.SelectedIndexChanged += ValidateComboBox2; CB_Species.SelectedValueChanged += UpdateSpecies; @@ -602,11 +605,11 @@ private void InitializeComponent() // CHK_Nicknamed // CHK_Nicknamed.AutoSize = true; - CHK_Nicknamed.Location = new System.Drawing.Point(40, 0); + CHK_Nicknamed.Location = new System.Drawing.Point(36, 0); CHK_Nicknamed.Margin = new System.Windows.Forms.Padding(0); CHK_Nicknamed.MinimumSize = new System.Drawing.Size(0, 24); CHK_Nicknamed.Name = "CHK_Nicknamed"; - CHK_Nicknamed.Size = new System.Drawing.Size(64, 24); + CHK_Nicknamed.Size = new System.Drawing.Size(68, 24); CHK_Nicknamed.TabIndex = 5; CHK_Nicknamed.Text = "Nickname:"; CHK_Nicknamed.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -615,7 +618,7 @@ private void InitializeComponent() // CHK_NicknamedFlag // CHK_NicknamedFlag.Anchor = System.Windows.Forms.AnchorStyles.Right; - CHK_NicknamedFlag.Location = new System.Drawing.Point(24, 0); + CHK_NicknamedFlag.Location = new System.Drawing.Point(20, 0); CHK_NicknamedFlag.Margin = new System.Windows.Forms.Padding(0); CHK_NicknamedFlag.Name = "CHK_NicknamedFlag"; CHK_NicknamedFlag.Size = new System.Drawing.Size(16, 24); @@ -631,7 +634,7 @@ private void InitializeComponent() TB_Nickname.Margin = new System.Windows.Forms.Padding(0); TB_Nickname.MaxLength = 12; TB_Nickname.Name = "TB_Nickname"; - TB_Nickname.Size = new System.Drawing.Size(144, 23); + TB_Nickname.Size = new System.Drawing.Size(144, 25); TB_Nickname.TabIndex = 5; TB_Nickname.TextChanged += UpdateIsNicknamed; TB_Nickname.MouseDown += UpdateNicknameClick; @@ -691,7 +694,7 @@ private void InitializeComponent() TB_EXP.Margin = new System.Windows.Forms.Padding(0); TB_EXP.Mask = "0000000"; TB_EXP.Name = "TB_EXP"; - TB_EXP.Size = new System.Drawing.Size(48, 23); + TB_EXP.Size = new System.Drawing.Size(48, 25); TB_EXP.TabIndex = 7; TB_EXP.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; TB_EXP.TextChanged += UpdateEXPLevel; @@ -714,7 +717,7 @@ private void InitializeComponent() TB_Level.Margin = new System.Windows.Forms.Padding(0); TB_Level.Mask = "000"; TB_Level.Name = "TB_Level"; - TB_Level.Size = new System.Drawing.Size(24, 23); + TB_Level.Size = new System.Drawing.Size(24, 25); TB_Level.TabIndex = 8; TB_Level.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; TB_Level.Click += ClickLevel; @@ -750,7 +753,7 @@ private void InitializeComponent() CB_Nature.Location = new System.Drawing.Point(104, 0); CB_Nature.Margin = new System.Windows.Forms.Padding(0); CB_Nature.Name = "CB_Nature"; - CB_Nature.Size = new System.Drawing.Size(144, 23); + CB_Nature.Size = new System.Drawing.Size(144, 25); CB_Nature.TabIndex = 9; CB_Nature.SelectedIndexChanged += ValidateComboBox2; CB_Nature.Validating += ValidateComboBox; @@ -785,7 +788,7 @@ private void InitializeComponent() CB_StatNature.Location = new System.Drawing.Point(104, 0); CB_StatNature.Margin = new System.Windows.Forms.Padding(0); CB_StatNature.Name = "CB_StatNature"; - CB_StatNature.Size = new System.Drawing.Size(144, 23); + CB_StatNature.Size = new System.Drawing.Size(144, 25); CB_StatNature.TabIndex = 10; CB_StatNature.SelectedIndexChanged += ValidateComboBox2; CB_StatNature.Validating += ValidateComboBox; @@ -854,7 +857,7 @@ private void InitializeComponent() CB_Form.Location = new System.Drawing.Point(0, 0); CB_Form.Margin = new System.Windows.Forms.Padding(0); CB_Form.Name = "CB_Form"; - CB_Form.Size = new System.Drawing.Size(128, 23); + CB_Form.Size = new System.Drawing.Size(128, 25); CB_Form.TabIndex = 12; CB_Form.SelectedIndexChanged += UpdateForm; // @@ -899,7 +902,7 @@ private void InitializeComponent() CB_HeldItem.Location = new System.Drawing.Point(104, 0); CB_HeldItem.Margin = new System.Windows.Forms.Padding(0); CB_HeldItem.Name = "CB_HeldItem"; - CB_HeldItem.Size = new System.Drawing.Size(144, 23); + CB_HeldItem.Size = new System.Drawing.Size(144, 25); CB_HeldItem.TabIndex = 10; CB_HeldItem.SelectedIndexChanged += ValidateComboBox2; CB_HeldItem.Validating += ValidateComboBox; @@ -945,7 +948,7 @@ private void InitializeComponent() CB_Ability.Location = new System.Drawing.Point(0, 0); CB_Ability.Margin = new System.Windows.Forms.Padding(0); CB_Ability.Name = "CB_Ability"; - CB_Ability.Size = new System.Drawing.Size(144, 23); + CB_Ability.Size = new System.Drawing.Size(144, 25); CB_Ability.TabIndex = 13; CB_Ability.SelectedIndexChanged += ValidateComboBox2; CB_Ability.Validating += ValidateComboBox; @@ -956,21 +959,21 @@ private void InitializeComponent() DEV_Ability.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; DEV_Ability.Enabled = false; DEV_Ability.FormattingEnabled = true; - DEV_Ability.Location = new System.Drawing.Point(0, 23); + DEV_Ability.Location = new System.Drawing.Point(0, 25); DEV_Ability.Margin = new System.Windows.Forms.Padding(0); DEV_Ability.Name = "DEV_Ability"; - DEV_Ability.Size = new System.Drawing.Size(126, 23); + DEV_Ability.Size = new System.Drawing.Size(126, 25); DEV_Ability.TabIndex = 14; DEV_Ability.Visible = false; // // TB_AbilityNumber // TB_AbilityNumber.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - TB_AbilityNumber.Location = new System.Drawing.Point(126, 23); + TB_AbilityNumber.Location = new System.Drawing.Point(126, 25); TB_AbilityNumber.Margin = new System.Windows.Forms.Padding(0); TB_AbilityNumber.Mask = "0"; TB_AbilityNumber.Name = "TB_AbilityNumber"; - TB_AbilityNumber.Size = new System.Drawing.Size(19, 23); + TB_AbilityNumber.Size = new System.Drawing.Size(19, 25); TB_AbilityNumber.TabIndex = 14; TB_AbilityNumber.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; TB_AbilityNumber.Visible = false; @@ -1039,7 +1042,7 @@ private void InitializeComponent() TB_Friendship.Margin = new System.Windows.Forms.Padding(0); TB_Friendship.Mask = "000"; TB_Friendship.Name = "TB_Friendship"; - TB_Friendship.Size = new System.Drawing.Size(24, 23); + TB_Friendship.Size = new System.Drawing.Size(24, 25); TB_Friendship.TabIndex = 11; TB_Friendship.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; TB_Friendship.Validated += Update255_MTB; @@ -1073,7 +1076,7 @@ private void InitializeComponent() CB_Language.Location = new System.Drawing.Point(104, 0); CB_Language.Margin = new System.Windows.Forms.Padding(0); CB_Language.Name = "CB_Language"; - CB_Language.Size = new System.Drawing.Size(144, 23); + CB_Language.Size = new System.Drawing.Size(144, 25); CB_Language.TabIndex = 15; CB_Language.SelectedIndexChanged += UpdateNickname; // @@ -1102,10 +1105,10 @@ private void InitializeComponent() // CHK_IsEgg // CHK_IsEgg.AutoSize = true; - CHK_IsEgg.Location = new System.Drawing.Point(47, 3); + CHK_IsEgg.Location = new System.Drawing.Point(41, 3); CHK_IsEgg.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); CHK_IsEgg.Name = "CHK_IsEgg"; - CHK_IsEgg.Size = new System.Drawing.Size(57, 19); + CHK_IsEgg.Size = new System.Drawing.Size(63, 21); CHK_IsEgg.TabIndex = 16; CHK_IsEgg.Text = "Is Egg"; CHK_IsEgg.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -1129,7 +1132,7 @@ private void InitializeComponent() CHK_Infected.Location = new System.Drawing.Point(0, 3); CHK_Infected.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); CHK_Infected.Name = "CHK_Infected"; - CHK_Infected.Size = new System.Drawing.Size(69, 19); + CHK_Infected.Size = new System.Drawing.Size(73, 21); CHK_Infected.TabIndex = 17; CHK_Infected.Text = "Infected"; CHK_Infected.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -1139,10 +1142,10 @@ private void InitializeComponent() // CHK_Cured // CHK_Cured.AutoSize = true; - CHK_Cured.Location = new System.Drawing.Point(69, 3); + CHK_Cured.Location = new System.Drawing.Point(73, 3); CHK_Cured.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); CHK_Cured.Name = "CHK_Cured"; - CHK_Cured.Size = new System.Drawing.Size(58, 19); + CHK_Cured.Size = new System.Drawing.Size(62, 21); CHK_Cured.TabIndex = 18; CHK_Cured.Text = "Cured"; CHK_Cured.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -1191,7 +1194,7 @@ private void InitializeComponent() CB_PKRSStrain.Location = new System.Drawing.Point(0, 0); CB_PKRSStrain.Margin = new System.Windows.Forms.Padding(0); CB_PKRSStrain.Name = "CB_PKRSStrain"; - CB_PKRSStrain.Size = new System.Drawing.Size(40, 23); + CB_PKRSStrain.Size = new System.Drawing.Size(40, 25); CB_PKRSStrain.TabIndex = 19; CB_PKRSStrain.Visible = false; CB_PKRSStrain.SelectedValueChanged += UpdatePKRSstrain; @@ -1214,7 +1217,7 @@ private void InitializeComponent() CB_PKRSDays.Location = new System.Drawing.Point(65, 0); CB_PKRSDays.Margin = new System.Windows.Forms.Padding(0); CB_PKRSDays.Name = "CB_PKRSDays"; - CB_PKRSDays.Size = new System.Drawing.Size(32, 23); + CB_PKRSDays.Size = new System.Drawing.Size(32, 25); CB_PKRSDays.TabIndex = 20; CB_PKRSDays.Visible = false; CB_PKRSDays.SelectedIndexChanged += UpdatePKRSdays; @@ -1246,7 +1249,7 @@ private void InitializeComponent() CHK_NSparkle.Location = new System.Drawing.Point(104, 3); CHK_NSparkle.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); CHK_NSparkle.Name = "CHK_NSparkle"; - CHK_NSparkle.Size = new System.Drawing.Size(59, 19); + CHK_NSparkle.Size = new System.Drawing.Size(61, 21); CHK_NSparkle.TabIndex = 18; CHK_NSparkle.Text = "Active"; CHK_NSparkle.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -1279,7 +1282,7 @@ private void InitializeComponent() NUD_ShadowID.Margin = new System.Windows.Forms.Padding(0, 1, 0, 0); NUD_ShadowID.Maximum = new decimal(new int[] { 127, 0, 0, 0 }); NUD_ShadowID.Name = "NUD_ShadowID"; - NUD_ShadowID.Size = new System.Drawing.Size(48, 23); + NUD_ShadowID.Size = new System.Drawing.Size(48, 25); NUD_ShadowID.TabIndex = 103; NUD_ShadowID.ValueChanged += UpdateShadowID; // @@ -1312,7 +1315,7 @@ private void InitializeComponent() NUD_Purification.Maximum = new decimal(new int[] { int.MaxValue, 0, 0, 0 }); NUD_Purification.Minimum = new decimal(new int[] { 100, 0, 0, int.MinValue }); NUD_Purification.Name = "NUD_Purification"; - NUD_Purification.Size = new System.Drawing.Size(48, 23); + NUD_Purification.Size = new System.Drawing.Size(48, 25); NUD_Purification.TabIndex = 103; NUD_Purification.ValueChanged += UpdatePurification; // @@ -1322,7 +1325,7 @@ private void InitializeComponent() CHK_Shadow.Location = new System.Drawing.Point(152, 3); CHK_Shadow.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); CHK_Shadow.Name = "CHK_Shadow"; - CHK_Shadow.Size = new System.Drawing.Size(68, 19); + CHK_Shadow.Size = new System.Drawing.Size(73, 21); CHK_Shadow.TabIndex = 16; CHK_Shadow.Text = "Shadow"; CHK_Shadow.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -1368,7 +1371,7 @@ private void InitializeComponent() Hidden_Met.Margin = new System.Windows.Forms.Padding(0); Hidden_Met.Name = "Hidden_Met"; Hidden_Met.Padding = new System.Windows.Forms.Padding(0, 16, 0, 0); - Hidden_Met.Size = new System.Drawing.Size(296, 391); + Hidden_Met.Size = new System.Drawing.Size(296, 502); Hidden_Met.TabIndex = 1; Hidden_Met.Text = "Met"; Hidden_Met.UseVisualStyleBackColor = true; @@ -1378,7 +1381,7 @@ private void InitializeComponent() CHK_AsEgg.AutoSize = true; CHK_AsEgg.Location = new System.Drawing.Point(104, 216); CHK_AsEgg.Name = "CHK_AsEgg"; - CHK_AsEgg.Size = new System.Drawing.Size(62, 19); + CHK_AsEgg.Size = new System.Drawing.Size(68, 21); CHK_AsEgg.TabIndex = 10; CHK_AsEgg.Text = "As Egg"; CHK_AsEgg.UseVisualStyleBackColor = true; @@ -1405,7 +1408,7 @@ private void InitializeComponent() CB_EggLocation.FormattingEnabled = true; CB_EggLocation.Location = new System.Drawing.Point(72, 19); CB_EggLocation.Name = "CB_EggLocation"; - CB_EggLocation.Size = new System.Drawing.Size(160, 23); + CB_EggLocation.Size = new System.Drawing.Size(160, 25); CB_EggLocation.TabIndex = 4; CB_EggLocation.SelectedIndexChanged += ValidateLocation; CB_EggLocation.Validating += ValidateComboBox; @@ -1418,7 +1421,7 @@ private void InitializeComponent() CAL_EggDate.MaxDate = new System.DateTime(2099, 12, 31, 0, 0, 0, 0); CAL_EggDate.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0); CAL_EggDate.Name = "CAL_EggDate"; - CAL_EggDate.Size = new System.Drawing.Size(136, 23); + CAL_EggDate.Size = new System.Drawing.Size(136, 25); CAL_EggDate.TabIndex = 5; CAL_EggDate.Value = new System.DateTime(2000, 1, 1, 0, 0, 0, 0); // @@ -1455,7 +1458,7 @@ private void InitializeComponent() FLP_Met.Location = new System.Drawing.Point(0, 16); FLP_Met.Margin = new System.Windows.Forms.Padding(0); FLP_Met.Name = "FLP_Met"; - FLP_Met.Size = new System.Drawing.Size(296, 375); + FLP_Met.Size = new System.Drawing.Size(296, 486); FLP_Met.TabIndex = 1; // // FLP_OriginGame @@ -1486,7 +1489,7 @@ private void InitializeComponent() CB_GameOrigin.Location = new System.Drawing.Point(104, 0); CB_GameOrigin.Margin = new System.Windows.Forms.Padding(0); CB_GameOrigin.Name = "CB_GameOrigin"; - CB_GameOrigin.Size = new System.Drawing.Size(136, 23); + CB_GameOrigin.Size = new System.Drawing.Size(136, 25); CB_GameOrigin.TabIndex = 1; CB_GameOrigin.SelectedIndexChanged += UpdateOriginGame; // @@ -1518,7 +1521,7 @@ private void InitializeComponent() CB_BattleVersion.Location = new System.Drawing.Point(104, 0); CB_BattleVersion.Margin = new System.Windows.Forms.Padding(0); CB_BattleVersion.Name = "CB_BattleVersion"; - CB_BattleVersion.Size = new System.Drawing.Size(136, 23); + CB_BattleVersion.Size = new System.Drawing.Size(136, 25); CB_BattleVersion.TabIndex = 1; CB_BattleVersion.SelectedValueChanged += CB_BattleVersion_SelectedValueChanged; // @@ -1553,7 +1556,7 @@ private void InitializeComponent() CB_MetLocation.Location = new System.Drawing.Point(104, 0); CB_MetLocation.Margin = new System.Windows.Forms.Padding(0); CB_MetLocation.Name = "CB_MetLocation"; - CB_MetLocation.Size = new System.Drawing.Size(160, 23); + CB_MetLocation.Size = new System.Drawing.Size(160, 25); CB_MetLocation.TabIndex = 2; CB_MetLocation.SelectedIndexChanged += ValidateLocation; CB_MetLocation.Validating += ValidateComboBox; @@ -1586,11 +1589,11 @@ private void InitializeComponent() // Label_Ball.Anchor = System.Windows.Forms.AnchorStyles.Right; Label_Ball.AutoSize = true; - Label_Ball.Location = new System.Drawing.Point(75, 1); + Label_Ball.Location = new System.Drawing.Point(73, 0); Label_Ball.Margin = new System.Windows.Forms.Padding(0); Label_Ball.Name = "Label_Ball"; Label_Ball.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3); - Label_Ball.Size = new System.Drawing.Size(29, 21); + Label_Ball.Size = new System.Drawing.Size(31, 23); Label_Ball.TabIndex = 2; Label_Ball.Text = "Ball:"; Label_Ball.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -1599,7 +1602,7 @@ private void InitializeComponent() // PB_Ball // PB_Ball.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; - PB_Ball.Location = new System.Drawing.Point(48, 0); + PB_Ball.Location = new System.Drawing.Point(46, 0); PB_Ball.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); PB_Ball.Name = "PB_Ball"; PB_Ball.Size = new System.Drawing.Size(24, 24); @@ -1615,7 +1618,7 @@ private void InitializeComponent() CB_Ball.Location = new System.Drawing.Point(104, 0); CB_Ball.Margin = new System.Windows.Forms.Padding(0); CB_Ball.Name = "CB_Ball"; - CB_Ball.Size = new System.Drawing.Size(136, 23); + CB_Ball.Size = new System.Drawing.Size(136, 25); CB_Ball.TabIndex = 3; CB_Ball.SelectedIndexChanged += ValidateComboBox2; CB_Ball.SelectedValueChanged += UpdateBall; @@ -1651,7 +1654,7 @@ private void InitializeComponent() CAL_MetDate.MaxDate = new System.DateTime(2099, 12, 31, 0, 0, 0, 0); CAL_MetDate.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0); CAL_MetDate.Name = "CAL_MetDate"; - CAL_MetDate.Size = new System.Drawing.Size(136, 23); + CAL_MetDate.Size = new System.Drawing.Size(136, 25); CAL_MetDate.TabIndex = 5; CAL_MetDate.Value = new System.DateTime(2000, 1, 1, 0, 0, 0, 0); // @@ -1684,7 +1687,7 @@ private void InitializeComponent() TB_MetLevel.Margin = new System.Windows.Forms.Padding(0); TB_MetLevel.Mask = "000"; TB_MetLevel.Name = "TB_MetLevel"; - TB_MetLevel.Size = new System.Drawing.Size(22, 23); + TB_MetLevel.Size = new System.Drawing.Size(22, 25); TB_MetLevel.TabIndex = 4; TB_MetLevel.Validated += Update255_MTB; // @@ -1694,7 +1697,7 @@ private void InitializeComponent() CHK_Fateful.Location = new System.Drawing.Point(131, 3); CHK_Fateful.Margin = new System.Windows.Forms.Padding(5, 3, 3, 3); CHK_Fateful.Name = "CHK_Fateful"; - CHK_Fateful.Size = new System.Drawing.Size(119, 19); + CHK_Fateful.Size = new System.Drawing.Size(127, 21); CHK_Fateful.TabIndex = 6; CHK_Fateful.Text = "Fateful Encounter"; CHK_Fateful.UseVisualStyleBackColor = true; @@ -1728,7 +1731,7 @@ private void InitializeComponent() TB_ObedienceLevel.Margin = new System.Windows.Forms.Padding(0); TB_ObedienceLevel.Mask = "000"; TB_ObedienceLevel.Name = "TB_ObedienceLevel"; - TB_ObedienceLevel.Size = new System.Drawing.Size(22, 23); + TB_ObedienceLevel.Size = new System.Drawing.Size(22, 25); TB_ObedienceLevel.TabIndex = 4; // // FLP_GroundTile @@ -1760,7 +1763,7 @@ private void InitializeComponent() CB_GroundTile.Location = new System.Drawing.Point(104, 0); CB_GroundTile.Margin = new System.Windows.Forms.Padding(0); CB_GroundTile.Name = "CB_GroundTile"; - CB_GroundTile.Size = new System.Drawing.Size(136, 23); + CB_GroundTile.Size = new System.Drawing.Size(136, 25); CB_GroundTile.TabIndex = 7; // // FLP_TimeOfDay @@ -1793,7 +1796,7 @@ private void InitializeComponent() CB_MetTimeOfDay.Location = new System.Drawing.Point(104, 0); CB_MetTimeOfDay.Margin = new System.Windows.Forms.Padding(0); CB_MetTimeOfDay.Name = "CB_MetTimeOfDay"; - CB_MetTimeOfDay.Size = new System.Drawing.Size(136, 23); + CB_MetTimeOfDay.Size = new System.Drawing.Size(136, 25); CB_MetTimeOfDay.TabIndex = 11; // // Hidden_Stats @@ -1804,7 +1807,7 @@ private void InitializeComponent() Hidden_Stats.Margin = new System.Windows.Forms.Padding(0); Hidden_Stats.Name = "Hidden_Stats"; Hidden_Stats.Padding = new System.Windows.Forms.Padding(0, 8, 0, 0); - Hidden_Stats.Size = new System.Drawing.Size(296, 391); + Hidden_Stats.Size = new System.Drawing.Size(296, 502); Hidden_Stats.TabIndex = 2; Hidden_Stats.Text = "Stats"; Hidden_Stats.UseVisualStyleBackColor = true; @@ -1819,7 +1822,7 @@ private void InitializeComponent() Stats.Location = new System.Drawing.Point(0, 8); Stats.Margin = new System.Windows.Forms.Padding(0); Stats.Name = "Stats"; - Stats.Size = new System.Drawing.Size(296, 383); + Stats.Size = new System.Drawing.Size(296, 494); Stats.StatDecreased = System.Drawing.Color.Blue; Stats.StatHyperTrained = System.Drawing.Color.LightGreen; Stats.StatIncreased = System.Drawing.Color.Red; @@ -1836,7 +1839,7 @@ private void InitializeComponent() Hidden_Moves.Location = new System.Drawing.Point(4, 5); Hidden_Moves.Margin = new System.Windows.Forms.Padding(0); Hidden_Moves.Name = "Hidden_Moves"; - Hidden_Moves.Size = new System.Drawing.Size(296, 391); + Hidden_Moves.Size = new System.Drawing.Size(296, 502); Hidden_Moves.TabIndex = 3; Hidden_Moves.Text = "Attacks"; Hidden_Moves.UseVisualStyleBackColor = true; @@ -1858,7 +1861,7 @@ private void InitializeComponent() CB_AlphaMastered.FormattingEnabled = true; CB_AlphaMastered.Location = new System.Drawing.Point(120, 328); CB_AlphaMastered.Name = "CB_AlphaMastered"; - CB_AlphaMastered.Size = new System.Drawing.Size(124, 23); + CB_AlphaMastered.Size = new System.Drawing.Size(124, 25); CB_AlphaMastered.TabIndex = 12; CB_AlphaMastered.SelectedIndexChanged += ValidateMove; // @@ -1969,7 +1972,7 @@ private void InitializeComponent() CB_RelearnMove4.FormattingEnabled = true; CB_RelearnMove4.Location = new System.Drawing.Point(32, 96); CB_RelearnMove4.Name = "CB_RelearnMove4"; - CB_RelearnMove4.Size = new System.Drawing.Size(124, 23); + CB_RelearnMove4.Size = new System.Drawing.Size(124, 25); CB_RelearnMove4.TabIndex = 9; CB_RelearnMove4.SelectedIndexChanged += ValidateMove; CB_RelearnMove4.Leave += ValidateComboBox2; @@ -1982,7 +1985,7 @@ private void InitializeComponent() CB_RelearnMove3.FormattingEnabled = true; CB_RelearnMove3.Location = new System.Drawing.Point(32, 72); CB_RelearnMove3.Name = "CB_RelearnMove3"; - CB_RelearnMove3.Size = new System.Drawing.Size(124, 23); + CB_RelearnMove3.Size = new System.Drawing.Size(124, 25); CB_RelearnMove3.TabIndex = 8; CB_RelearnMove3.SelectedIndexChanged += ValidateMove; CB_RelearnMove3.Leave += ValidateComboBox2; @@ -1995,7 +1998,7 @@ private void InitializeComponent() CB_RelearnMove2.FormattingEnabled = true; CB_RelearnMove2.Location = new System.Drawing.Point(32, 48); CB_RelearnMove2.Name = "CB_RelearnMove2"; - CB_RelearnMove2.Size = new System.Drawing.Size(124, 23); + CB_RelearnMove2.Size = new System.Drawing.Size(124, 25); CB_RelearnMove2.TabIndex = 7; CB_RelearnMove2.SelectedIndexChanged += ValidateMove; CB_RelearnMove2.Leave += ValidateComboBox2; @@ -2008,7 +2011,7 @@ private void InitializeComponent() CB_RelearnMove1.FormattingEnabled = true; CB_RelearnMove1.Location = new System.Drawing.Point(32, 24); CB_RelearnMove1.Name = "CB_RelearnMove1"; - CB_RelearnMove1.Size = new System.Drawing.Size(124, 23); + CB_RelearnMove1.Size = new System.Drawing.Size(124, 25); CB_RelearnMove1.TabIndex = 6; CB_RelearnMove1.SelectedIndexChanged += ValidateMove; CB_RelearnMove1.Leave += ValidateComboBox2; @@ -2109,7 +2112,7 @@ private void InitializeComponent() Hidden_Cosmetic.Controls.Add(FLP_CosmeticTop); Hidden_Cosmetic.Location = new System.Drawing.Point(4, 5); Hidden_Cosmetic.Name = "Hidden_Cosmetic"; - Hidden_Cosmetic.Size = new System.Drawing.Size(296, 391); + Hidden_Cosmetic.Size = new System.Drawing.Size(296, 502); Hidden_Cosmetic.TabIndex = 5; Hidden_Cosmetic.Text = "Cosmetic"; Hidden_Cosmetic.UseVisualStyleBackColor = true; @@ -2137,9 +2140,9 @@ private void InitializeComponent() FLP_PKMEditors.Controls.Add(BTN_Ribbons); FLP_PKMEditors.Controls.Add(BTN_Medals); FLP_PKMEditors.Controls.Add(BTN_History); - FLP_PKMEditors.Location = new System.Drawing.Point(56, 288); + FLP_PKMEditors.Location = new System.Drawing.Point(56, 286); FLP_PKMEditors.Name = "FLP_PKMEditors"; - FLP_PKMEditors.Size = new System.Drawing.Size(191, 27); + FLP_PKMEditors.Size = new System.Drawing.Size(210, 29); FLP_PKMEditors.TabIndex = 6; FLP_PKMEditors.WrapContents = false; // @@ -2151,7 +2154,7 @@ private void InitializeComponent() BTN_Ribbons.Location = new System.Drawing.Point(1, 1); BTN_Ribbons.Margin = new System.Windows.Forms.Padding(1); BTN_Ribbons.Name = "BTN_Ribbons"; - BTN_Ribbons.Size = new System.Drawing.Size(60, 25); + BTN_Ribbons.Size = new System.Drawing.Size(66, 27); BTN_Ribbons.TabIndex = 28; BTN_Ribbons.Text = "Ribbons"; BTN_Ribbons.UseVisualStyleBackColor = true; @@ -2162,10 +2165,10 @@ private void InitializeComponent() BTN_Medals.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; BTN_Medals.AutoSize = true; BTN_Medals.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - BTN_Medals.Location = new System.Drawing.Point(63, 1); + BTN_Medals.Location = new System.Drawing.Point(69, 1); BTN_Medals.Margin = new System.Windows.Forms.Padding(1); BTN_Medals.Name = "BTN_Medals"; - BTN_Medals.Size = new System.Drawing.Size(55, 25); + BTN_Medals.Size = new System.Drawing.Size(61, 27); BTN_Medals.TabIndex = 29; BTN_Medals.Text = "Medals"; BTN_Medals.UseVisualStyleBackColor = true; @@ -2176,10 +2179,10 @@ private void InitializeComponent() BTN_History.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; BTN_History.AutoSize = true; BTN_History.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - BTN_History.Location = new System.Drawing.Point(120, 1); + BTN_History.Location = new System.Drawing.Point(132, 1); BTN_History.Margin = new System.Windows.Forms.Padding(1); BTN_History.Name = "BTN_History"; - BTN_History.Size = new System.Drawing.Size(70, 25); + BTN_History.Size = new System.Drawing.Size(77, 27); BTN_History.TabIndex = 30; BTN_History.Text = "Memories"; BTN_History.UseVisualStyleBackColor = true; @@ -2425,7 +2428,7 @@ private void InitializeComponent() Hidden_OTMisc.Location = new System.Drawing.Point(4, 5); Hidden_OTMisc.Margin = new System.Windows.Forms.Padding(0); Hidden_OTMisc.Name = "Hidden_OTMisc"; - Hidden_OTMisc.Size = new System.Drawing.Size(296, 391); + Hidden_OTMisc.Size = new System.Drawing.Size(296, 515); Hidden_OTMisc.TabIndex = 4; Hidden_OTMisc.Text = "OT/Misc"; Hidden_OTMisc.UseVisualStyleBackColor = true; @@ -2445,10 +2448,11 @@ private void InitializeComponent() FLP_OTMisc.Controls.Add(FLP_ExtraBytes); FLP_OTMisc.Controls.Add(FLP_HomeTracker); FLP_OTMisc.Controls.Add(FLP_EncryptionConstant); + FLP_OTMisc.Controls.Add(FLP_ReceivedDate); FLP_OTMisc.Dock = System.Windows.Forms.DockStyle.Fill; FLP_OTMisc.Location = new System.Drawing.Point(0, 0); FLP_OTMisc.Name = "FLP_OTMisc"; - FLP_OTMisc.Size = new System.Drawing.Size(296, 391); + FLP_OTMisc.Size = new System.Drawing.Size(296, 515); FLP_OTMisc.TabIndex = 1; // // GB_OT @@ -2500,15 +2504,15 @@ private void InitializeComponent() TB_OT.Margin = new System.Windows.Forms.Padding(0); TB_OT.MaxLength = 12; TB_OT.Name = "TB_OT"; - TB_OT.Size = new System.Drawing.Size(94, 23); + TB_OT.Size = new System.Drawing.Size(94, 25); TB_OT.TabIndex = 3; TB_OT.TextChanged += RefreshFontWarningButton; TB_OT.MouseDown += UpdateNicknameClick; // // UC_OTGender // - UC_OTGender.AccessibleDescription = "Trainer Gender Pane"; - UC_OTGender.AccessibleName = "Trainer Gender Pane"; + UC_OTGender.AccessibleDescription = "Trainer Gender Pane (0)"; + UC_OTGender.AccessibleName = "Trainer Gender Pane (0)"; UC_OTGender.AccessibleRole = System.Windows.Forms.AccessibleRole.Graphic; UC_OTGender.AllowClick = true; UC_OTGender.BackgroundImage = (System.Drawing.Image)resources.GetObject("UC_OTGender.BackgroundImage"); @@ -2564,7 +2568,7 @@ private void InitializeComponent() CB_Country.Location = new System.Drawing.Point(104, 0); CB_Country.Margin = new System.Windows.Forms.Padding(0); CB_Country.Name = "CB_Country"; - CB_Country.Size = new System.Drawing.Size(126, 23); + CB_Country.Size = new System.Drawing.Size(126, 25); CB_Country.TabIndex = 21; CB_Country.SelectedIndexChanged += UpdateCountry; CB_Country.Validating += ValidateComboBox; @@ -2599,7 +2603,7 @@ private void InitializeComponent() CB_SubRegion.Location = new System.Drawing.Point(104, 0); CB_SubRegion.Margin = new System.Windows.Forms.Padding(0); CB_SubRegion.Name = "CB_SubRegion"; - CB_SubRegion.Size = new System.Drawing.Size(126, 23); + CB_SubRegion.Size = new System.Drawing.Size(126, 25); CB_SubRegion.TabIndex = 22; CB_SubRegion.Validating += ValidateComboBox; // @@ -2631,7 +2635,7 @@ private void InitializeComponent() CB_3DSReg.Location = new System.Drawing.Point(104, 0); CB_3DSReg.Margin = new System.Windows.Forms.Padding(0); CB_3DSReg.Name = "CB_3DSReg"; - CB_3DSReg.Size = new System.Drawing.Size(126, 23); + CB_3DSReg.Size = new System.Drawing.Size(126, 25); CB_3DSReg.TabIndex = 23; // // FLP_Handler @@ -2663,7 +2667,7 @@ private void InitializeComponent() CB_Handler.Location = new System.Drawing.Point(128, 0); CB_Handler.Margin = new System.Windows.Forms.Padding(0); CB_Handler.Name = "CB_Handler"; - CB_Handler.Size = new System.Drawing.Size(48, 23); + CB_Handler.Size = new System.Drawing.Size(48, 25); CB_Handler.TabIndex = 1; CB_Handler.SelectedIndexChanged += ChangeHandlerIndex; // @@ -2707,7 +2711,7 @@ private void InitializeComponent() TB_HT.Margin = new System.Windows.Forms.Padding(0); TB_HT.MaxLength = 12; TB_HT.Name = "TB_HT"; - TB_HT.Size = new System.Drawing.Size(94, 23); + TB_HT.Size = new System.Drawing.Size(94, 25); TB_HT.TabIndex = 2; TB_HT.WordWrap = false; TB_HT.TextChanged += UpdateNotOT; @@ -2715,8 +2719,8 @@ private void InitializeComponent() // // UC_HTGender // - UC_HTGender.AccessibleDescription = "Handling Trainer Gender Pane"; - UC_HTGender.AccessibleName = "Handling Trainer Gender Pane"; + UC_HTGender.AccessibleDescription = "Handling Trainer Gender Pane (0)"; + UC_HTGender.AccessibleName = "Handling Trainer Gender Pane (0)"; UC_HTGender.AccessibleRole = System.Windows.Forms.AccessibleRole.Graphic; UC_HTGender.AllowClick = true; UC_HTGender.BackgroundImage = (System.Drawing.Image)resources.GetObject("UC_HTGender.BackgroundImage"); @@ -2756,7 +2760,7 @@ private void InitializeComponent() CB_HTLanguage.Location = new System.Drawing.Point(104, 0); CB_HTLanguage.Margin = new System.Windows.Forms.Padding(0); CB_HTLanguage.Name = "CB_HTLanguage"; - CB_HTLanguage.Size = new System.Drawing.Size(126, 23); + CB_HTLanguage.Size = new System.Drawing.Size(126, 25); CB_HTLanguage.TabIndex = 4; // // FLP_ExtraBytes @@ -2788,7 +2792,7 @@ private void InitializeComponent() CB_ExtraBytes.Location = new System.Drawing.Point(128, 0); CB_ExtraBytes.Margin = new System.Windows.Forms.Padding(0); CB_ExtraBytes.Name = "CB_ExtraBytes"; - CB_ExtraBytes.Size = new System.Drawing.Size(64, 23); + CB_ExtraBytes.Size = new System.Drawing.Size(64, 25); CB_ExtraBytes.TabIndex = 1; CB_ExtraBytes.SelectedIndexChanged += UpdateExtraByteIndex; // @@ -2798,7 +2802,7 @@ private void InitializeComponent() TB_ExtraByte.Margin = new System.Windows.Forms.Padding(8, 0, 0, 0); TB_ExtraByte.Mask = "000"; TB_ExtraByte.Name = "TB_ExtraByte"; - TB_ExtraByte.Size = new System.Drawing.Size(32, 23); + TB_ExtraByte.Size = new System.Drawing.Size(32, 25); TB_ExtraByte.TabIndex = 2; TB_ExtraByte.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; TB_ExtraByte.Validated += UpdateExtraByteValue; @@ -2887,7 +2891,7 @@ private void InitializeComponent() // StatusView // StatusView.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; - StatusView.Location = new System.Drawing.Point(24, 342); + StatusView.Location = new System.Drawing.Point(24, 466); StatusView.Margin = new System.Windows.Forms.Padding(0); StatusView.Name = "StatusView"; StatusView.Size = new System.Drawing.Size(64, 64); @@ -2974,6 +2978,27 @@ private void InitializeComponent() Tab_OTMisc.Text = "OT/Misc"; Tab_OTMisc.UseVisualStyleBackColor = true; // + // CAL_ReceivedDateTime + // + CAL_ReceivedDateTime.CustomFormat = "yyyy-MM-dd HH:mm:ss tt"; + CAL_ReceivedDateTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + CAL_ReceivedDateTime.Location = new System.Drawing.Point(24, 0); + CAL_ReceivedDateTime.Margin = new System.Windows.Forms.Padding(24, 0, 0, 0); + CAL_ReceivedDateTime.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0); + CAL_ReceivedDateTime.Name = "CAL_ReceivedDateTime"; + CAL_ReceivedDateTime.Size = new System.Drawing.Size(229, 25); + CAL_ReceivedDateTime.TabIndex = 51; + // + // FLP_ReceivedDate + // + FLP_ReceivedDate.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + FLP_ReceivedDate.Controls.Add(CAL_ReceivedDateTime); + FLP_ReceivedDate.Location = new System.Drawing.Point(0, 384); + FLP_ReceivedDate.Margin = new System.Windows.Forms.Padding(0); + FLP_ReceivedDate.Name = "FLP_ReceivedDate"; + FLP_ReceivedDate.Size = new System.Drawing.Size(272, 29); + FLP_ReceivedDate.TabIndex = 52; + // // PKMEditor // AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -2981,7 +3006,7 @@ private void InitializeComponent() Controls.Add(StatusView); Controls.Add(TC_Editor); Name = "PKMEditor"; - Size = new System.Drawing.Size(400, 400); + Size = new System.Drawing.Size(400, 524); Hidden_TC.ResumeLayout(false); Hidden_Main.ResumeLayout(false); FLP_Main.ResumeLayout(false); @@ -3095,6 +3120,7 @@ private void InitializeComponent() FLP_EncryptionConstant.ResumeLayout(false); FLP_EncryptionConstant.PerformLayout(); TC_Editor.ResumeLayout(false); + FLP_ReceivedDate.ResumeLayout(false); ResumeLayout(false); } @@ -3318,5 +3344,7 @@ private void InitializeComponent() private System.Windows.Forms.FlowLayoutPanel FLP_HomeTracker; private System.Windows.Forms.FlowLayoutPanel FLP_EncryptionConstant; private StatusConditionView StatusView; + private System.Windows.Forms.DateTimePicker CAL_ReceivedDateTime; + private System.Windows.Forms.FlowLayoutPanel FLP_ReceivedDate; } } diff --git a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs index 1bc43fc92..3b16a4473 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs @@ -1934,8 +1934,9 @@ private void ToggleInterface(PKM t) PB_Favorite.Visible = t is IFavorite; PB_BattleVersion.Visible = FLP_BattleVersion.Visible = t is IBattleVersion; BTN_History.Visible = format >= 6 && !pb7; - BTN_Ribbons.Visible = format >= 3 && !pb7; + BTN_Ribbons.Visible = format >= 3; // pb7 has ribbons on HOME Meltan lol BTN_Medals.Visible = format is 6 or 7 && !pb7; + FLP_ReceivedDate.Visible = pb7; FLP_Country.Visible = FLP_SubRegion.Visible = FLP_3DSRegion.Visible = t is IRegionOrigin; FLP_OriginalNature.Visible = format >= 8; B_RelearnFlags.Visible = t is ITechRecord; diff --git a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.resx b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.resx index 6765bcea6..6af184167 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.resx +++ b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.resx @@ -1,7 +1,7 @@ - +