Esempio n. 1
0
        void update_button_state()
        {
            export_wc3but.Enabled  = false;
            inject_wc3_but.Enabled = false;
            export_wcn.Enabled     = false;
            inject_wcn.Enabled     = false;
            export_me3_but.Enabled = false;
            inject_me3_but.Enabled = false;
            eon_em_but.Enabled     = false;
            decor_but.Enabled      = false;
            export_ect_but.Enabled = false;
            inject_ect_but.Enabled = false;
            export_eberry.Enabled  = false;
            inject_eberry.Enabled  = false;
            tvswarm_but.Enabled    = false;

            region_but.Enabled = false;

            toolStripMenuItem1.Enabled                       = false;
            exportOldSaveToolStripMenuItem.Enabled           = false;
            enableMysteryGiftMainScreenStripMenuItem.Enabled = false;
            fixSectionChecksumsToolStripMenuItem.Enabled     = false;

            switch (sav3file.game)
            {
            case 0:
                //Gamelabel.Text = "Ruby/Sapphire";
                export_me3_but.Enabled = true;
                inject_me3_but.Enabled = true;
                decor_but.Enabled      = true;
                export_eberry.Enabled  = true;
                inject_eberry.Enabled  = true;
                tvswarm_but.Enabled    = true;
                break;

            case 1:
                //Gamelabel.Text = "Emerald";
                export_wc3but.Enabled  = true;
                inject_wc3_but.Enabled = true;
                export_wcn.Enabled     = true;
                inject_wcn.Enabled     = true;
                export_me3_but.Enabled = true;
                inject_me3_but.Enabled = true;
                eon_em_but.Enabled     = true;
                decor_but.Enabled      = true;
                tvswarm_but.Enabled    = true;
                break;

            case 2:
                //Gamelabel.Text = "Fire Red/Leaf Green";
                export_wc3but.Enabled  = true;
                inject_wc3_but.Enabled = true;
                export_wcn.Enabled     = true;
                inject_wcn.Enabled     = true;
                tvswarm_but.Enabled    = false;
                break;

            default:
                //Gamelabel.Text = "Can't autodetect save game";
                break;
            }
            toolStripMenuItem1.Enabled                       = true;
            exportOldSaveToolStripMenuItem.Enabled           = true;
            enableMysteryGiftMainScreenStripMenuItem.Enabled = true;
            fixSectionChecksumsToolStripMenuItem.Enabled     = true;
            clearEggEventFlagToolStripMenuItem.Enabled       = sav3file.has_EggEvent_Flag();

            export_ect_but.Enabled = true;
            inject_ect_but.Enabled = true;

            if (sav3file.isjap == true)
            {
                region_lab.Text = "JAP";
            }
            else
            {
                region_lab.Text = "USA/EUR";
            }

            region_but.Enabled = true;
        }