Ejemplo n.º 1
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Are you sure", "       ⤾(o_o)⤿", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         LORA l = new LORA();
         this.Hide();
         l.ShowDialog();
         this.Close();
     }
 }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Player.Name1 = textBox1.Text;
            Player.Name2 = textBox2.Text;
            Player.Name3 = textBox3.Text;
            Player.Name4 = textBox4.Text;
            Player.Name5 = textBox5.Text;


            //for class
            Player.NumberOfPlayer = Convert.ToInt32(numericUpDown1.Value);

            //MessageBox.Show(p.Name1+p.Name2+p.Name3+p.Name4+p.Name5, "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning);

            //Check if name is empty
            if ((textBox1.Text == "" && textBox1.Visible == true))
            {
                MessageBox.Show("Unesite ime za Player 1", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else if ((textBox2.Text == "" && textBox2.Visible == true))
            {
                MessageBox.Show("Unesite ime za Player 2", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else if ((textBox3.Text == "" && textBox3.Visible == true))
            {
                MessageBox.Show("Unesite ime za Player 3", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else if ((textBox4.Text == "" && textBox4.Visible == true))
            {
                MessageBox.Show("Unesite ime za Player 4", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else if ((textBox5.Text == "" && textBox5.Visible == true))
            {
                MessageBox.Show("Unesite ime za Player 5", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                //Form Open
                if (numericUpDown1.Value >= 1)
                {
                    if (comboBox1.Text == "KANASTA")
                    {
                        Form2 a = new Form2();
                        this.Hide();
                        a.ShowDialog();
                        this.Close();
                    }
                    if (comboBox1.Text == "LORA")
                    {
                        LORA l = new LORA();
                        this.Hide();
                        l.ShowDialog();
                        this.Close();
                    }
                }
                else
                {
                    MessageBox.Show("Select number of players", "Information", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                }
            }
        }