Ejemplo n.º 1
0
 private void pictureBox1_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.X > 30 && e.X < 30 + 190 && e.Y > 120 && e.Y < 120 + 140)
     {
         if (this.textBox1.Text == "Admin" && this.textBox2.Text == "caini")
         {
             Meniu f = new Meniu(this);
             f.Show();
             this.Hide();
         }
         else
         {
             MessageBox.Show("Date incorecte");
         }
     }
     if (e.X > 445 && e.X < 445 + 190 && e.Y > 120 && e.Y < 120 + 140)
     {
         DialogResult dialog = MessageBox.Show("Sigur doriți să închideți aplicația?", "Atenție!", MessageBoxButtons.YesNo);
         if (dialog == DialogResult.Yes)
         {
             Application.Exit();
         }
     }
 }
Ejemplo n.º 2
0
 private void pictureBox1_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.X > 650 && e.X < 650 + 130 && e.Y > 370 && e.Y < 370 + 70)
     {
         meniu.Show();
         this.Hide();
     }
     if (e.X > 640 && e.X < 640 + 155 && e.Y > 290 && e.Y < 290 + 80)
     {
         frm.Show();
         this.Hide();
     }
     if (e.X > 640 && e.X < 640 + 155 && e.Y > 210 && e.Y < 210 + 80)
     {
         if (this.textBox1.Text == "" || this.textBox2.Text == "")
         {
             MessageBox.Show("Nu ați completat toate câmpurile!");
         }
         else
         {
             MessageBox.Show("Comanda a fost plasată cu succes!");
         }
     }
 }
Ejemplo n.º 3
0
 private void Form3_FormClosing(object sender, FormClosingEventArgs e)
 {
     frm.Show();
 }
Ejemplo n.º 4
0
 private void AccesoriiCatei_FormClosing(object sender, FormClosingEventArgs e)
 {
     meniu.Show();
     this.Hide();
 }