Exemple #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (v3 == null || v3.IsDisposed)
     {
         v3 = new Form5();
         v3.Show();
     }
 }
        private void yENİKAYITOLUŞTURToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form5 frm2 = new Form5();

            frm2.Show();
        }
Exemple #3
0
        private void button3_Click(object sender, EventArgs e)
        {
            Form5 f = new Form5(textBox1.Text, textBox2.Text);

            f.Show();
        }
        private void SUBMIT_Click(object sender, EventArgs e)
        {
            if (RNO.Text != "" & NAME.Text != "" & ADDRESS.Text != "" & MOB.Text != "" & EMAIL.Text != "" & BGROUP.Text != "")
            {
                str = BGROUP.Text;

                com.Connection = con;

                com.CommandText = "insert into registration(RNO,NAME,ADDRESS,MOB,EMAIL,BGROUP) values ('" + RNO.Text + "','" + NAME.Text + "','" + ADDRESS.Text + "','" + MOB.Text + "','" + EMAIL.Text + "','" + BGROUP.Text + "')";
                com.ExecuteNonQuery();
              //          com.Dispose();
                // MessageBox.Show("record inserted");
            }
            else
            {
                MessageBox.Show("Plzzz insert all entries ");
            }
            //            /*      com.CommandText = "select count(RNO) into  cnt  from reg where BGROUP=" + BGROUP.Text + "";
            //com.Connection = con;

               // com.CommandText = "select *  from REG where BGROUP='" + str + "' ";

            Form5 ob = new Form5();
            ob.passvalue(con, str);
            ob.Show();
            Hide();

              //  Session.Add("BGROUP", str);
        }
Exemple #5
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (plateau.plo.Count() == 0)
            {
                System.IO.File.WriteAllText(@"svg.txt", Convert.ToString(mapi + 1));
                if (mapi + 1 == 6)
                {
                    Form5 Form5 = new Form5();
                    Form5.Show();
                    this.Hide();
                    timer1.Enabled = false;
                }
                else if (mapi + 1 < 8)
                {
                    Form1 Form1 = new Form1(mapi + 1, plateau.player[0].nbBombe, plateau.player[0].porteBombe, plateau.player[0].point);
                    Form1.Show();
                    this.Hide();
                    timer1.Enabled = false;
                }
            }
            if (plateau.player.Count() == 0 && mapi != 7)
            {
                Form3 Form3 = new Form3();
                Form3.Show();
                this.Hide();
                timer1.Enabled = false;
            }
            if (plateau.player.Count() == 1 && mapi == 7)
            {
                if (pointP1 == 100 && pointP2 == 100)
                {
                    timer1.Stop();
                    MessageBox.Show("egaliter");
                    Form2 Form2 = new Form2();
                    Form2.Show();
                    this.Hide();
                }
                else if (pointP1 == 100)
                {
                    timer1.Stop();
                    MessageBox.Show("P1 Win");
                    Form2 Form2 = new Form2();
                    Form2.Show();
                    this.Hide();
                }
                else if (pointP2 == 100)
                {
                    timer1.Stop();
                    MessageBox.Show("P2 Win");
                    Form2 Form2 = new Form2();
                    Form2.Show();
                    this.Hide();
                }
                else
                {
                    Form1 Form1 = new Form1(7, 1, 1, pointP1, pointP2);
                    Form1.Show();
                    this.Hide();
                    timer1.Enabled = false;
                }
            }
            int i = 0;

            while (plateau.boom.Count() > i)
            {
                plateau.boom[i].time--;
                if (plateau.boom[i] != null && plateau.boom[i].time < 0)
                {
                    plateau.defla(plateau.boom[i]);
                    plateau.boom.Remove(plateau.boom[i]);
                }
                i++;
            }
            i = 0;
            while (plateau.defl.Count() > i)
            {
                int j = 0;
                while (j < plateau.player.Count)
                {
                    if (plateau.defl[i].getDeflagration(plateau.player[j].pos.x, plateau.player[j].pos.y))
                    {
                        if (j == 0)
                        {
                            pointP2 += 10;
                        }
                        else if (j == 1)
                        {
                            pointP1 += 10;
                        }
                        plateau.player.Remove(plateau.player[j]);
                    }
                    j++;
                }
                j = 0;
                int m = 1;
                while (j < plateau.plo.Count())
                {
                    if (plateau.defl[i].getDeflagration(plateau.plo[j].pos.x, plateau.plo[j].pos.y))
                    {
                        plateau.plo.Remove(plateau.plo[j]);
                        plateau.player[0].point += 10 * m;
                        m++;
                    }
                    j++;
                }

                if (plateau.defl[i] != null && plateau.defl[i].time < 1)
                {
                    plateau.defl.Remove(plateau.defl[i]);
                }
                else
                {
                    plateau.defl[i].time--;
                }
                i++;
            }
            for (int k = 0; k < plateau.plo.Count(); k++)
            {
                int l = 0;
                while (l < plateau.player.Count())
                {
                    if ((plateau.player[l].pos.x == plateau.plo[k].pos.x && plateau.player[l].pos.y == plateau.plo[k].pos.y))
                    {
                        plateau.player.Remove(plateau.player[l]);
                    }
                    l++;
                }
                plateau.plo[k].ia(plateau);
            }
            affGame();
        }
Exemple #6
0
        private void bunifuFlatButton2_Click(object sender, EventArgs e)
        {
            Form5 frm5 = new Form5();

            frm5.Show();
        }
        private void button3_Click(object sender, EventArgs e)
        {
            Form5 form5 = new Form5();

            form5.Show();
        }