Пример #1
0
        private void convert_Click(object sender, EventArgs e)
        {
            if (textBox2.Text == "" && (radioButton1.Checked || radioButton2.Checked))
            {
                MessageBox.Show("Please enter an Extract Path!");
            }
            else if (textBox3.Text == "" && radioButton3.Checked)
            {
                MessageBox.Show("Please enter an Cyber Sav File Path!");
            }
            else if ((maskedTextBox1.Text == "" || maskedTextBox2.Text == "") && radioButton3.Checked)
            {
                MessageBox.Show("Please enter valid Box numbers!");
            }
            else if (textBox1.Text == "")
            {
                MessageBox.Show("Please enter an Importable!");
            }
            else
            {
                string importable = textBox1.Text;

                List <PKHeX.WinForms.Pokemon> pokemon = extractImportable(importable);

                if (pokemon.Count > 30 && radioButton2.Checked)
                {
                    MessageBox.Show("Only 30 Pokemon fit into a Box!");
                }
                else
                {
                    Main form = new Main(pokemon, textBox2.Text, radioButton1.Checked, textBox3.Text, radioButton3.Checked, maskedTextBox1.Text, maskedTextBox2.Text, checkBox1.Checked, gen7Check.Checked, CB_Native.Checked);
                    form.Form1_Load(null, null);
                    form.Close();
                    MessageBox.Show("Done!");
                }
            }
        }
Пример #2
0
        private void convert_Click(object sender, EventArgs e)
        {
            if (textBox2.Text == "" && (radioButton1.Checked || radioButton2.Checked))
            {
                MessageBox.Show("Please enter an Extract Path!");
            }
            else if (textBox3.Text == "" && radioButton3.Checked)
            {
                MessageBox.Show("Please enter an Cyber Sav File Path!");
            }
            else if ((maskedTextBox1.Text == "" || maskedTextBox2.Text == "") && radioButton3.Checked)
            {
                MessageBox.Show("Please enter valid Box numbers!");
            }
            else if (textBox1.Text == "")
            {
                MessageBox.Show("Please enter an Importable!");
            }
            else
            {
                string importable = textBox1.Text;

                List<Pokemon> pokemon = extractImportable(importable);

                if (pokemon.Count > 30 && radioButton2.Checked)
                {
                    MessageBox.Show("Only 30 Pokemon fit into a Box!");
                }
                else
                {
                    Main form = new Main(pokemon, textBox2.Text, radioButton1.Checked, textBox3.Text, radioButton3.Checked, maskedTextBox1.Text, maskedTextBox2.Text, checkBox1.Checked, gen7Check.Checked);
                    form.Form1_Load(null, null);
                    form.Close();
                    MessageBox.Show("Done!");
                }
            }
        }