コード例 #1
0
        public static string AsText(eSupportedVehicels eSupport)
        {
            string enumDescripton = "null";

            switch (eSupport)
            {
            case eSupportedVehicels.RegularMotorcycle:
            {
                enumDescripton = "Regular Motorcycle";
                break;
            }

            case eSupportedVehicels.ElectricMotorcycle:
            {
                enumDescripton = "Electric Motorcycle";
                break;
            }

            case eSupportedVehicels.RegularCar:
            {
                enumDescripton = "Regular Car";
                break;
            }

            case eSupportedVehicels.ElectricCar:
            {
                enumDescripton = "Electric Car";
                break;
            }

            case eSupportedVehicels.Truck:
            {
                enumDescripton = "Truck";
                break;
            }
            }

            return(enumDescripton);
        }
コード例 #2
0
 private void getVehicleParams(out string o_Plate, out string o_ClientName, out string o_PhoneNumber, out string o_VehicleModel, out eSupportedVehicels o_SupportedVehicle)
 {
     try
     {
         o_Plate = getSomeName("Enter License Plate:");
         m_Grage.VehicleExits(o_Plate);
         o_ClientName       = getSomeName("Enter Owner Name:");
         o_PhoneNumber      = getPhoneNumber();
         o_VehicleModel     = getSomeName("Enter Vehicle Model Name");
         o_SupportedVehicle = chooseSupportedVehicle();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }