예제 #1
0
 private void pictureBox1_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.X > 40 && e.X < 40 + 160 && e.Y > 95 && e.Y < 95 + 60)
     {
         VizualizareCaini f = new VizualizareCaini(this);
         f.Show();
         this.Hide();
     }
     if (e.X > 40 && e.X < 40 + 160 && e.Y > 175 && e.Y < 175 + 60)
     {
         AccesoriiCatei f = new AccesoriiCatei(this);
         f.Show();
         this.Hide();
     }
     if (e.X > 40 && e.X < 40 + 160 && e.Y > 15 && e.Y < 15 + 60)
     {
         AdaugaCaine f = new AdaugaCaine(this);
         f.Show();
         this.Hide();
     }
     if (e.X > pictureBox1.Width - 120 && e.X < pictureBox1.Width - 120 + 160 && e.Y > 5 && e.Y < 5 + 60)
     {
         Application.Exit();
     }
 }
예제 #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!");
         }
     }
 }