Пример #1
0
        void Inject_ect_butClick(object sender, EventArgs e)
        {
            //if (sav3file.has_mystery_event == true || sav3file.game == 1)
            //{
            if (sav3file.game == 1)
            {
                MessageBox.Show("Mystery Event was removed from non Japanese Emerald.\n\tYou can still inject the data at your own risk.");
            }
            string path     = null;
            int    filesize = FileIO.load_file(ref ectfile, ref path, ectfilter);

            if (filesize == ECT.SIZE_ECT)
            {
                sav3file.set_ECT(ectfile);
                sav3file.update_section_chk(0);
                MessageBox.Show("e-card Trainer injected.");
                FileIO.save_data(sav3file.Data, savfilter);
            }
            else if (filesize == -1)
            {
                ;
            }
            else
            {
                MessageBox.Show("Invalid file size.");
            }
            //}else
            //{
            //	MessageBox.Show("Save file does not have Mystery Event enabled.");
            //}
        }