예제 #1
0
        private void btnCarEntersCarPark2_Click(object sender, EventArgs e)
        {
            carPark.CarEnteredCarPark2();
            entrySensor2.CarLeftSensor2();
            btnCarEntersCarPark2.Visible = false;
            if (carPark.IsFull() == true)
            {
                btnCarArrivesAtEntrance2.Visible = false;
            }
            else
            {
                btnCarArrivesAtEntrance2.Visible = true;
            }

            if (ActiveRight() == false)
            {
                btnCarArrivesAtExit.Visible = true;
            }

            if (ActiveRight2() == false)
            {
                btnCarArrivesAtExit2.Visible = true;
            }
            UpdateDisplay();
        }