Пример #1
0
 public Form5(Form4 f)
 {
     InitializeComponent();
     form4 = f;
 }
Пример #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (comboBox1.Text != "(choose)" && comboBox2.Text != "(choose)")
            {
                Form4 form4 = new Form4();
                form4.Pokemon(pokemon);
                form4.Team(team);
                form4.TeamOp(teamOp);
                form4.Moves(moves);
                if (comboBox1.Text == txt1.Text)
                {
                    form4.Start1(comboBox1.Text, 0);
                }
                else if (comboBox1.Text == txt8.Text)
                {
                    form4.Start1(comboBox1.Text, 1);
                }
                else if (comboBox1.Text == txt15.Text)
                {
                    form4.Start1(comboBox1.Text, 2);
                }
                else if (comboBox1.Text == txt22.Text)
                {
                    form4.Start1(comboBox1.Text, 3);
                }
                else if (comboBox1.Text == txt29.Text)
                {
                    form4.Start1(comboBox1.Text, 4);
                }
                else if (comboBox1.Text == txt36.Text)
                {
                    form4.Start1(comboBox1.Text, 5);
                }

                if (comboBox2.Text == textBox1.Text)
                {
                    form4.Start2(comboBox2.Text, 0);
                }
                else if (comboBox2.Text == textBox2.Text)
                {
                    form4.Start2(comboBox2.Text, 1);
                }
                else if (comboBox2.Text == textBox3.Text)
                {
                    form4.Start2(comboBox2.Text, 2);
                }
                else if (comboBox2.Text == textBox4.Text)
                {
                    form4.Start2(comboBox2.Text, 3);
                }
                else if (comboBox2.Text == textBox5.Text)
                {
                    form4.Start2(comboBox2.Text, 4);
                }
                else if (comboBox2.Text == textBox6.Text)
                {
                    form4.Start2(comboBox2.Text, 5);
                }
                form4.Show();
                this.Visible = false;
            }
        }