예제 #1
0
        private void UpdateDisplay()
        {
            if (entryBarrier.isLifted() == true)
            {
                lblEntryBarrier.Text = "True";
            }
            else
            {
                lblEntryBarrier.Text = "False";
            }

            if (entrySensor.IsCarOnSensor() == true)
            {
                lblEntrySensor.Text = "True";
            }
            else
            {
                lblEntrySensor.Text = "False";
            }

            if (exitBarrier.isLifted() == true)
            {
                lblExitBarrier.Text = "True";
            }
            else
            {
                lblExitBarrier.Text = "False";
            }

            if (exitSensor.IsCarOnSensor() == true)
            {
                lblExitSensor.Text = "True";
            }
            else
            {
                lblExitSensor.Text = "False";
            }

            if (fullSign.isLit() == true)
            {
                lblFullSign.Text = "True";
            }
            else
            {
                lblFullSign.Text = "False";
            }
            lblSpaces.Text = Convert.ToString(carPark.GetCurrentSpaces());

            lblTicketMachine.Text   = ticketMachine.GetMessage();
            lblTicketValidator.Text = ticketValidator.GetMessage();


            lstActiveTickets.Items.Clear();
            List <Ticket> tickets = activeTickets.GetTickets();

            foreach (Ticket ticket in tickets)
            {
                lstActiveTickets.Items.Add(Convert.ToString("#" + ticket.ticketNumber() + ":" + ticket.IsPaid()));
            }
        }
예제 #2
0
        private void UpdateDisplay()
        {
            if (entryBarrier.isLifted() == true)
            {
                lblEntryBarrier.Text = "True";
            }
            else
            {
                lblEntryBarrier.Text = "False";
            }
            if (entrySensor.IsCarOnSensor() == true)
            {
                lblEntrySensor.Text = "True";
            }
            else
            {
                lblEntrySensor.Text = "False";
            }

            if (exitBarrier.isLifted() == true)
            {
                lblExitBarrier.Text = "True";
            }
            else
            {
                lblExitBarrier.Text = "False";
            }

            if (exitSensor.IsCarOnSensor() == true)
            {
                lblExitSensor.Text = "True";
            }
            else
            {
                lblExitSensor.Text = "False";
            }

            if (fullSign.isLit() == true)
            {
                lblFullSign.Text = "True";
            }
            else
            {
                lblFullSign.Text = "False";
            }
            lblSpaces.Text = Convert.ToString(carPark.GetCurrentSpaces());
        }