Exemplo n.º 1
0
        public void PrintLicensePlates(int i_UserChoice, Dictionary <string, Treatment> i_TreatmentList, bool i_DisplayAll)
        {
            Treatment.eStatus wantedStatus = (Treatment.eStatus)i_UserChoice;

            foreach (Treatment current in i_TreatmentList.Values)
            {
                if (current.Status == wantedStatus || i_DisplayAll)
                {
                    Console.WriteLine(current.Vehicle.LicensePlate);
                }
            }
        }
Exemplo n.º 2
0
        private void changeVehicleTreatmentStatus()
        {
            int    userChoice;
            string licensePlate;

            Treatment.eStatus statusOptions          = new Treatment.eStatus();
            string            PartOfOptionsHeaderMsg = string.Format("to which treatment status you want to change");

            UI.GetVehicleLicensePlate(m_Garage, out licensePlate);
            userChoice = UI.GetSpecificEnumInput(PartOfOptionsHeaderMsg, statusOptions);

            m_Garage.TreatmentList[licensePlate].CheckEqualStatus((Treatment.eStatus)userChoice);
            m_Garage.TreatmentList[licensePlate].Status = (Treatment.eStatus)userChoice;
        }
Exemplo n.º 3
0
        private void displayVehiclesInGarageLicensePlates()
        {
            Treatment.eStatus statusOptions = new Treatment.eStatus();
            eDisplayOption    displayOption = new eDisplayOption();
            int    displayChoice;
            int    userChoice             = 0;
            string displayOptionMsg       = string.Format("how to want to filter your search");
            string PartOfOptionsHeaderMsg = string.Format("which vehicels you want to see");
            bool   displayAll             = false;

            displayChoice = UI.GetSpecificEnumInput(displayOptionMsg, displayOption);
            if ((eDisplayOption)displayChoice == eDisplayOption.AllVehicles)
            {
                displayAll = true;
            }
            else
            {
                userChoice = UI.GetSpecificEnumInput(PartOfOptionsHeaderMsg, statusOptions);
            }

            UI.PrintLicensePlates(userChoice, m_Garage.TreatmentList, displayAll);
        }
Exemplo n.º 4
0
 public void ChangeStatus(string i_LicensePlate, Treatment.eStatus i_newStatus)
 {
     m_TreatmentList[i_LicensePlate].Status = i_newStatus;
 }