コード例 #1
0
        private void selectEncounterComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            string encounterFileIndex = selectEncounterComboBox.SelectedIndex.ToString("D4");

            currentFile = new EncounterFileHGSS(new FileStream(encounterFileFolder + "\\" + encounterFileIndex, FileMode.Open));
            SetupControls();
        }
コード例 #2
0
        private void importEncounterFileButton_Click(object sender, EventArgs e)
        {
            /* Prompt user to select .wld file */
            OpenFileDialog of = new OpenFileDialog();

            of.Filter = "Wild Encounters File (*.wld)|*.wld";
            if (of.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }

            /* Update encounter file object in memory */
            currentFile = new EncounterFileHGSS(new FileStream(of.FileName, FileMode.Open));

            /* Update controls */
            SetupControls();
        }