Beispiel #1
0
        private void loadIsoButton_Click(object sender, EventArgs e)
        {
            openISODialog.Filter          = "Colosseum or XD Game File|*.iso;*.zip";
            openISODialog.CheckFileExists = true;
            if (openISODialog.ShowDialog() == DialogResult.OK)
            {
                iso?.Dispose();
                isoExtractor?.Dispose();

                progressMessageLabel.Text = "Reading ISO...";

                if (OpenFile())
                {
                    iso = isoExtractor.ExtractISO();
                    switch (iso.Game)
                    {
                    case Game.Colosseum:
                    {
                        gamePictureBox.Image          = new Bitmap("Images/colo-logo.jpg");
                        gameExtractor                 = new ColoExtractor();
                        starterComboBox.SelectedItem  = "ESPEON";
                        starter2ComboBox.SelectedItem = "UMBREON";
                        // disable XD only options
                        foreach (Control ctrl in battleBingoTabPage.Controls)
                        {
                            ctrl.Enabled = false;
                        }
                        pokeSpotGroupBox.Enabled = false;
                        break;
                    }

                    case Game.XD:
                    {
                        gamePictureBox.Image         = new Bitmap("Images/xd-logo.jpg");
                        gameExtractor                = new XDExtractor(iso);
                        starterComboBox.SelectedItem = "EEVEE";
                        starter2Label.Visible        = false;
                        starter2ComboBox.Visible     = false;
                        break;
                    }

                    default:
                        return;
                    }
                    gameLabel.Text   = iso.Game.ToString();
                    regionLabel.Text = iso.Region.ToString();

                    progressMessageLabel.Text = "Successfully read ISO";
                }
            }
        }
 void ReleaseDesignerOutlets()
 {
     if (Bias != null)
     {
         Bias.Dispose();
         Bias = null;
     }
     if (CameraView != null)
     {
         CameraView.Dispose();
         CameraView = null;
     }
     if (Duration != null)
     {
         Duration.Dispose();
         Duration = null;
     }
     if (ISO != null)
     {
         ISO.Dispose();
         ISO = null;
     }
     if (NoCamera != null)
     {
         NoCamera.Dispose();
         NoCamera = null;
     }
     if (Offset != null)
     {
         Offset.Dispose();
         Offset = null;
     }
     if (Segments != null)
     {
         Segments.Dispose();
         Segments = null;
     }
 }