Esempio n. 1
0
        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)
        {
            carPark.CarEnteredCarPark();
            entrySensor.CarLeftSensor();

            btnCarEntersCarPark.Visible     = false;
            btnCarArrivesAtEntrance.Visible = carPark.HasSpace();
            btnCarArrivesAtExit.Visible     = !btnCarEntersCarPark.Visible && !btnDriverPressesForTicket.Visible;
            btnCarArrivesAtExit.Visible     = true;

            UpdateDisplay();
        }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
 public void CarLeftSensor()
 {
     carPark.CarEnteredCarPark();
     this.carOnSensor = false;
 }
        public override void CarLeftSensor()
        {
            base.CarLeftSensor();

            carPark.CarEnteredCarPark();
        }
Esempio n. 6
0
 public override void CarLeftSensor(CarPark carPark)
 {
     carOnSensor = false;
     carPark.CarEnteredCarPark();
 }
Esempio n. 7
0
 private void CarEntersCarPark(object sender, EventArgs e)
 {
     carPark.CarEnteredCarPark();
     UpdateDisplay();
 }