Exemplo n.º 1
0
 public void CarExitedCarPark()
 {
     ticketValidator.ClearMessage();
     if (fullsign.isLit() == true)
     {
         fullsign.SetLit(false);
     }
     exitBarrier.Lower();
     currentSpaces++;
 }
        private void UpdateDisplay()
        {
            lblEntryBarrier.Text    = Convert.ToString(entryBarrier.IsLifted());
            lblExitBarrier.Text     = Convert.ToString(exitBarrier.IsLifted());
            lblEntrySensor.Text     = Convert.ToString(entrySensor.isCarOnSensor());
            lblExitSensor.Text      = Convert.ToString(exitSensor.isCarOnSensor());
            lblFullSign.Text        = Convert.ToString(fullSign.isLit());
            lblSpaces.Text          = Convert.ToString(carPark.getCurrentSpaces());
            lblTicketMachine.Text   = Convert.ToString(ticketMachine.getMessage());
            lblTicketValidator.Text = Convert.ToString(ticketValidator.getMessage());

            if (activeTickets.GetTickets().Count != 0)
            {
                lstActiveTickets.Items.Clear();

                for (int i = 0; i < activeTickets.GetTickets().Count; i++)
                {
                    lstActiveTickets.Items.Add(activeTickets.GetTickets()[i].getName());
                }
            }
            else
            {
                lstActiveTickets.Items.Clear();
            }
        }
Exemplo n.º 3
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()));
            }
        }
Exemplo n.º 4
0
 public void CarExitedCarPark()
 {
     exitSensor.CarLeftSensor();
     if (fullsign.isLit() == true)
     {
         fullsign.SetLit();
     }
     exitBarrier.Lower();
 }
Exemplo n.º 5
0
        public void carExitedCarPark()
        {
            currentSpaces--;
            exitBarrier.Lower();
            if (fullSign.isLit() == true)
            {
                fullSign.setLit(false);
            }

            ticketValidator.clearMessage();
        }
Exemplo n.º 6
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());
        }