Beispiel #1
0
        private void btnCarExitsCarPark2_Click(object sender, EventArgs e)
        {
            carPark.CarExitedCarPark2();
            exitSensor2.CarLeftSensor2();
            btnCarExitsCarPark2.Visible = false;

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

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

            if (ActiveLeft2() == false)
            {
                btnCarArrivesAtEntrance2.Visible = true;
            }

            if (ActiveLeft() == false)
            {
                btnCarArrivesAtEntrance.Visible = true;
            }
            UpdateDisplay();
        }