Add version diff check

BW vs B2W2 will prevent flags

Defer layout when adding controls (increase speed).
This commit is contained in:
Kaphotics 2016-07-24 15:04:04 -07:00
parent 794b1478a6
commit 0b95833b74

View file

@ -23,11 +23,17 @@ namespace PKHeX
for (int i = 0; i < Constants.Length; i++) for (int i = 0; i < Constants.Length; i++)
CB_Stats.Items.Add(i.ToString()); CB_Stats.Items.Add(i.ToString());
TLP_Flags.SuspendLayout();
TLP_Flags.Controls.Clear(); TLP_Flags.Controls.Clear();
TLP_Const.SuspendLayout();
TLP_Const.Controls.Clear(); TLP_Const.Controls.Clear();
addFlagList(getStringList("flags")); addFlagList(getStringList("flags"));
addConstList(getStringList("const")); addConstList(getStringList("const"));
TLP_Flags.ResumeLayout();
TLP_Const.ResumeLayout();
Util.TranslateInterface(this, Main.curlanguage); Util.TranslateInterface(this, Main.curlanguage);
CB_Stats.SelectedIndex = 0; CB_Stats.SelectedIndex = 0;
@ -293,8 +299,8 @@ namespace PKHeX
SaveFile s1 = SaveUtil.getVariantSAV(File.ReadAllBytes(TB_OldSAV.Text)); SaveFile s1 = SaveUtil.getVariantSAV(File.ReadAllBytes(TB_OldSAV.Text));
SaveFile s2 = SaveUtil.getVariantSAV(File.ReadAllBytes(TB_NewSAV.Text)); SaveFile s2 = SaveUtil.getVariantSAV(File.ReadAllBytes(TB_NewSAV.Text));
if (s1.GetType() != s2.GetType()) if (s1.GetType() != s2.GetType()) { Util.Alert("Save types are different.", $"S1: {s1.GetType()}", $"S2: {s2.GetType()}"); return; }
{ Util.Alert("Save types are different.", $"S1: {s1.GetType()}", $"S2: {s2.GetType()}"); return; } if (s1.Version != s2.Version) { Util.Alert("Save versions are different.", $"S1: {s1.Version}", $"S2: {s2.Version}"); return; }
string tbIsSet = ""; string tbIsSet = "";
string tbUnSet = ""; string tbUnSet = "";