コード例 #1
0
        private void button7_Click(object sender, EventArgs e)
        {
            if (Chs.PositionChasseursEncours != -1)
            {
                if (MessageBox.Show("Voulez vous vraiment supprimer cett chasseur?", "Suppretion", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    Chs.Supprimer();
                    if (Chs.PositionChasseursEncours != -1)
                    {
                        Afficherch(Chs.ChasseursEncours);
                        position();
                    }

                    else
                    {
                        textBox1.Clear();
                        textBox2.Clear(); textBox4.Clear();
                        textBox3.Clear(); textBox5.Clear();
                        button7.Enabled = false;
                        button6.Enabled = false;
                        position();
                    }

                    if (Chs.NombreChasseursParticipant <= 1)
                    {
                        buttonposF();
                        button8.Enabled = false;
                    }
                    else
                    {
                        if (Chs.NombreChasseursParticipant == 2)
                        {
                            button8.Enabled = false;
                            buttonposF();
                            button2.Enabled = true;
                            button3.Enabled = true;
                        }
                        else
                        {
                            buttonposT(); button8.Enabled = true;
                        }
                    }
                }
            }
            position();
        }
コード例 #2
0
        private void button7_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Vous voulez vraiment supprimer le chasseur en cours?", "Suppression chasseur!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
            {
                Chs.Supprimer();
            }
            if (Chs.posChasseurEncours != -1)
            {
                AfficherChasseur(Chs.ChasseurEncours);
            }
            else
            {
                EtatInitiale();
            }

            label6.Text = EnregistrementEncours();
        }