Example #1
0
        private void randomButton_Click(object sender, EventArgs e)
        {
            playerTextBoxVisabillity(false);
            playerComboBoxVisabillity(false);

            player player1  = new player(playerNameTextBox1.Text, playerComboBox1.SelectedIndex + 1);
            player player2  = new player(playerNameTextBox2.Text, playerComboBox2.SelectedIndex + 1);
            player player3  = new player(playerNameTextBox3.Text, playerComboBox3.SelectedIndex + 1);
            player player4  = new player(playerNameTextBox4.Text, playerComboBox4.SelectedIndex + 1);
            player player5  = new player(playerNameTextBox5.Text, playerComboBox5.SelectedIndex + 1);
            player player6  = new player(playerNameTextBox6.Text, playerComboBox6.SelectedIndex + 1);
            player player7  = new player(playerNameTextBox7.Text, playerComboBox7.SelectedIndex + 1);
            player player8  = new player(playerNameTextBox8.Text, playerComboBox8.SelectedIndex + 1);
            player player9  = new player(playerNameTextBox9.Text, playerComboBox9.SelectedIndex + 1);
            player player10 = new player(playerNameTextBox10.Text, playerComboBox10.SelectedIndex + 1);
            player player11 = new player(playerNameTextBox11.Text, playerComboBox11.SelectedIndex + 1);
            player player12 = new player(playerNameTextBox12.Text, playerComboBox12.SelectedIndex + 1);

            arr4[0]  = (player)player1;
            arr4[1]  = (player)player2;
            arr4[2]  = (player)player3;
            arr4[3]  = (player)player4;
            arr4[4]  = (player)player5;
            arr4[5]  = (player)player6;
            arr4[6]  = (player)player7;
            arr4[7]  = (player)player8;
            arr4[8]  = (player)player9;
            arr4[9]  = (player)player10;
            arr4[10] = (player)player11;
            arr4[11] = (player)player12;

            quickSort(arr4, 0, 11);

            team1Label.Text = "TEAM 1";
            team2Label.Text = "TEAM 2";
            team3Label.Text = "TEAM 3";

            playerLabel1.Text  = arr4[0].name;
            playerLabel2.Text  = arr4[5].name;
            playerLabel3.Text  = arr4[8].name;
            playerLabel4.Text  = arr4[11].name;
            playerLabel5.Text  = arr4[1].name;
            playerLabel6.Text  = arr4[4].name;
            playerLabel7.Text  = arr4[7].name;
            playerLabel8.Text  = arr4[10].name;
            playerLabel9.Text  = arr4[2].name;
            playerLabel10.Text = arr4[3].name;
            playerLabel11.Text = arr4[6].name;
            playerLabel12.Text = arr4[9].name;

            playerLabelVisabillity(true);

            team1Label.Visible = true;
            team2Label.Visible = true;
            team3Label.Visible = true;

            teamPicBoxVisabillity(true);

            randomButton.Visible  = false;
            randomBottun2.Visible = true;
        }
Example #2
0
        private void randomButton5X5_Click(object sender, EventArgs e)
        {
            textBox1.Visible  = false;
            textBox2.Visible  = false;
            textBox3.Visible  = false;
            textBox4.Visible  = false;
            textBox5.Visible  = false;
            textBox6.Visible  = false;
            textBox7.Visible  = false;
            textBox8.Visible  = false;
            textBox9.Visible  = false;
            textBox10.Visible = false;
            textBox11.Visible = false;
            textBox12.Visible = false;
            textBox13.Visible = false;
            textBox14.Visible = false;
            textBox15.Visible = false;

            comboBox1.Visible  = false;
            comboBox2.Visible  = false;
            comboBox3.Visible  = false;
            comboBox4.Visible  = false;
            comboBox5.Visible  = false;
            comboBox6.Visible  = false;
            comboBox7.Visible  = false;
            comboBox8.Visible  = false;
            comboBox9.Visible  = false;
            comboBox10.Visible = false;
            comboBox11.Visible = false;
            comboBox12.Visible = false;
            comboBox13.Visible = false;
            comboBox14.Visible = false;
            comboBox15.Visible = false;

            player player1  = new player(textBox1.Text, comboBox1.SelectedIndex + 1);
            player player2  = new player(textBox2.Text, comboBox2.SelectedIndex + 1);
            player player3  = new player(textBox3.Text, comboBox3.SelectedIndex + 1);
            player player4  = new player(textBox4.Text, comboBox4.SelectedIndex + 1);
            player player5  = new player(textBox5.Text, comboBox5.SelectedIndex + 1);
            player player6  = new player(textBox6.Text, comboBox6.SelectedIndex + 1);
            player player7  = new player(textBox7.Text, comboBox7.SelectedIndex + 1);
            player player8  = new player(textBox8.Text, comboBox8.SelectedIndex + 1);
            player player9  = new player(textBox9.Text, comboBox9.SelectedIndex + 1);
            player player10 = new player(textBox10.Text, comboBox10.SelectedIndex + 1);
            player player11 = new player(textBox11.Text, comboBox11.SelectedIndex + 1);
            player player12 = new player(textBox12.Text, comboBox12.SelectedIndex + 1);
            player player13 = new player(textBox13.Text, comboBox13.SelectedIndex + 1);
            player player14 = new player(textBox14.Text, comboBox14.SelectedIndex + 1);
            player player15 = new player(textBox15.Text, comboBox15.SelectedIndex + 1);

            arr5[0]  = (player)player1;
            arr5[1]  = (player)player2;
            arr5[2]  = (player)player3;
            arr5[3]  = (player)player4;
            arr5[4]  = (player)player5;
            arr5[5]  = (player)player6;
            arr5[6]  = (player)player7;
            arr5[7]  = (player)player8;
            arr5[8]  = (player)player9;
            arr5[9]  = (player)player10;
            arr5[10] = (player)player11;
            arr5[11] = (player)player12;
            arr5[12] = (player)player13;
            arr5[13] = (player)player14;
            arr5[14] = (player)player15;

            quickSort(arr5, 0, 14);

            label1.Text  = arr5[0].name;
            label2.Text  = arr5[3].name;
            label3.Text  = arr5[8].name;
            label4.Text  = arr5[11].name;
            label5.Text  = arr5[14].name;
            label6.Text  = arr5[1].name;
            label7.Text  = arr5[4].name;
            label8.Text  = arr5[7].name;
            label9.Text  = arr5[10].name;
            label10.Text = arr5[13].name;
            label11.Text = arr5[2].name;
            label12.Text = arr5[5].name;
            label13.Text = arr5[6].name;
            label14.Text = arr5[9].name;
            label15.Text = arr5[12].name;

            label1.Visible  = true;
            label2.Visible  = true;
            label3.Visible  = true;
            label4.Visible  = true;
            label5.Visible  = true;
            label6.Visible  = true;
            label7.Visible  = true;
            label8.Visible  = true;
            label9.Visible  = true;
            label10.Visible = true;
            label11.Visible = true;
            label12.Visible = true;
            label13.Visible = true;
            label14.Visible = true;
            label15.Visible = true;

            pictureBox1.Visible  = true;
            pictureBox2.Visible  = true;
            pictureBox3.Visible  = true;
            pictureBox4.Visible  = true;
            pictureBox5.Visible  = true;
            pictureBox6.Visible  = true;
            pictureBox7.Visible  = true;
            pictureBox8.Visible  = true;
            pictureBox9.Visible  = true;
            pictureBox10.Visible = true;
            pictureBox11.Visible = true;
            pictureBox12.Visible = true;
            pictureBox13.Visible = true;
            pictureBox14.Visible = true;
            pictureBox15.Visible = true;

            randomButton5X5.Visible = false;
            locoHotbutton.Visible   = true;
        }