Beispiel #1
0
 private void button_jucator_Click(object sender, EventArgs e)
 {
     if (this.textBox_pass.Text == "player" && this.textBox_nume.Text.Trim() != "")
     {
         string nume_user = this.textBox_nume.Text;
         GLOBAL.globalusername = nume_user;
         this.Hide();
         Joc jf = new Joc();
         jf.ShowDialog();
         this.Close();
     }
     else
     {
         MessageBox.Show("Please enter a valid password and name!");
     }
 }
Beispiel #2
0
 private void button_jucator_Click(object sender, EventArgs e)
 {
     if (this.textBox_pass.Text == "jucator" && this.textBox_nume.Text.Trim() != "")
     {
         string nume_user = this.textBox_nume.Text;
         GLOBAL.globalusername = nume_user;
         this.Hide();
         Joc jf = new Joc();
         jf.ShowDialog();
         this.Close();
     }
     else
     {
         MessageBox.Show("Introduceti o parola si un nume valid!");
     }
 }
Beispiel #3
0
 public void drop(int i, DragEventArgs e)
 {
     draged_picture = new MemoryStream();
     pictureBoxes[i].Image.Save(draged_picture, pictureBoxes[i].Image.RawFormat);
     //-----------------------------------------------------------------------------
     pictureBoxes[i].Image = (Bitmap)e.Data.GetData(DataFormats.Bitmap, true);
     //-----------------------------------------------------------------------------
     draged_pictureBox.Image = Image.FromStream(draged_picture);
     //-----------------------------------------------------------------------------
     if (gameOver())
     {
         updDB();
         Joc joc_form = new Joc();
         joc_form.dataGridView1.DataSource = clasament.getClasament();
         MessageBox.Show("Victory");
         this.Close();
     }
 }