public partial class Form1 : Form
{
int click = 0;
int click2 = 0;
Est_de_Datos Cola = new Est_de_Datos();
public Form1()
{
InitializeComponent();
}
private void buttonRecibir_Click(object sender, EventArgs e)
{
click++;
buttonDarServicio.Visible = true;
if (click == 1)
{
picboxCarro1.Visible = true;
Cola.Agregar(1);
}
if (click == 2)
{
piboxCarro2.Visible = true;
Cola.Agregar(2);
}
if (click == 3)
{
picboxCarro3.Visible = true;
Cola.Agregar(3);
}
if (click > 3)
{
MessageBox.Show("Solo 3 autos por día jefe!","NO HAY MAS CUPO");
}
}
private void buttonDarServicio_Click(object sender, EventArgs e)
{
click2++;
if (click2 == 1)
{
picboxCarro1.Visible = false
MessageBox.Show("Al auto No. " + Cola.Eliminar() + " se le ha dado servicio" , "SERVICO LISTO");
piboxCarro2.Left += 200;
picboxCarro3.Left += 100;
}
if (click2 == 2)
{
piboxCarro2.Visible = false
MessageBox.Show("Al auto No. " + Cola.Eliminar() + " se le ha dado servicio" , "SERVICO LISTO");
picboxCarro3.Left += 350;
}
if (click2 == 3)
{
picboxCarro3.Visible = false;
MessageBox.Show("Al auto No. " + Cola.Eliminar() + " se le ha dado servicio" , "SERVICO LISTO");
}
if (click2 > 3)
MessageBox.Show("No quedan mas autos por atender");
}
}
}