예제 #1
0
        private void CarExitsCarPark(object sender, EventArgs e)
        {
            carPark.CarExitedCarPark();
            exitSensor.CarLeftSensor();
            btnCarExitsCarPark.Visible = false;

            if ((carPark.IsEmpty() == false) || (carPark.HasSpace() == true))
            {
                btnCarArrivesAtExit.Visible = true;
            }

            if (carPark.IsEmpty() == true)
            {
                btnCarArrivesAtExit.Visible = false;
            }
            else
            {
                btnCarArrivesAtExit.Visible = true;
            }

            if (ActiveLeft() == false)
            {
                btnCarArrivesAtEntrance.Visible = true;
            }
            UpdateDisplay();
        }
예제 #2
0
        private void CarExitsCarPark(object sender, EventArgs e)
        {
            carPark.CarExitedCarPar();
            exitSensor.CarLeftSensor();

            btnCarExitsCarPark.Visible      = false;
            btnCarArrivesAtEntrance.Visible = !btnCarEntersCarPark.Visible && !btnDriverPressesForTicket.Visible;
            btnCarArrivesAtExit.Visible     = !carPark.IsEmpty();

            UpdateDisplay();
        }
예제 #3
0
        private void CarExitsCarPark(object sender, EventArgs e)
        {
            btnCarExitsCarPark.Visible      = false;
            btnCarArrivesAtExit.Visible     = true;
            btnCarArrivesAtEntrance.Visible = true;

            exitSensor.CarLeftSensor();
            btnCarArrivesAtExit.Visible = !carPark.IsEmpty();

            UpdateDisplay(true);
        }
예제 #4
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();
        }