private void CarEntersCarPark(object sender, EventArgs e) { carPark.CarEnteredCarPark(); entrySensor.CarLeftSensor(); btnCarEntersCarPark.Visible = false; if (carPark.IsFull() == true) { btnCarArrivesAtEntrance.Visible = false; } else { btnCarArrivesAtEntrance.Visible = true; } if (ActiveRight() == false) { btnCarArrivesAtExit.Visible = true; } if (ActiveRight2() == false) { btnCarArrivesAtExit2.Visible = true; } UpdateDisplay(); }
private void CarEntersCarPark(object sender, EventArgs e) { entrySensor.CarLeftSensor(carPark); if (!entrySensor.IsCarOnSensor()) { lblTicketMachine.Text = ticketMachine.ClearMessage(""); if (carPark.IsFull()) { fullSign.SetLit(1); } else { fullSign.SetLit(0); } btnCarArrivesAtEntrance.Visible = true; btnCarEntersCarPark.Visible = false; if (!(btnCarArrivesAtExit.Visible || btnDriverEntersTicket.Visible || btnCarExitsCarPark.Visible)) { btnCarArrivesAtExit.Visible = true; } } UpdateDisplay(); }
private void CarEntersCarPark(object sender, EventArgs e) { entrySensor.CarLeftSensor(); btnCarEntersCarPark.Visible = false; if (!carPark.IsFull()) { btnCarArrivesAtEntrance.Visible = true; } btnCarArrivesAtExit.Visible = true; UpdateDisplay(); }
private void CarEntersCarPark(object sender, EventArgs e) { carPark.CarEnteredCarPark(entryBarrier, ticketMachine, entrySensor, fullSign); btnCarArrivesAtEntrance.Visible = true; btnDriverPressesForTicket.Visible = false; btnCarEntersCarPark.Visible = false; btnCarArrivesAtExit.Visible = true; lblchip.Text = ""; if (carPark.IsFull() == true) { btnCarArrivesAtEntrance.Visible = false; btnDriverPressesForTicket.Visible = false; btnCarEntersCarPark.Visible = false; } if (carPark.IsEmpty() == false) { btnCarArrivesAtExit.Visible = true; } UpdateDisplay(); }