PKHeX.CodeGenerator.loaddata C# (CSharp) Method

loaddata() private method

private loaddata ( ) : bool
return bool
        private bool loaddata()
        {
            if (CB_Source.SelectedIndex == 0)
            {
                if (tabdata != null)
                {
                    byte[] pkx = tabdata;
                    newdata = new byte[232];
                    Array.Copy(PKX.encryptArray(pkx), newdata, 232);
                }
                else
                    return false;

            }
            else if (CB_Source.SelectedIndex == 1)
            {
                newdata = new byte[0xE8];
                Array.Copy(m_parent.savefile,
                    SaveGame.Box                   // Box Offset
                        + CB_Box.SelectedIndex * (232 * 30) // Box Shift
                        + CB_Slot.SelectedIndex * 232,      // Slot Shift
                    newdata, 0, 0xE8);

                if (!newdata.SequenceEqual(new byte[0xE8])) return true;

                System.Media.SystemSounds.Exclamation.Play();
                return false;
            }
            else if (CB_Source.SelectedIndex == 2)
            {
                // Wondercard
                newdata = new byte[0x108];
                // Wondercard #
                int wcn = CB_Slot.SelectedIndex;
                // copy from save, the chosen wondercard offset, to new data
                Array.Copy(m_parent.savefile, SaveGame.Wondercard + wcn * 0x108 + 0x100, newdata, 0, 0x108);
                byte[] zerodata = new byte[0x108];
                if (!newdata.SequenceEqual(zerodata)) return true;

                System.Media.SystemSounds.Exclamation.Play();
                return false;
            }
            return true;
        }
        private void changeDataSource(object sender, EventArgs e)