Ejemplo n.º 1
0
        private void DecodeVIN()
        {
            textEdit1.Text     = textEdit1.Text.ToUpper();
            lblBody.Text       = "---";
            lblCarModel.Text   = "---";
            lblEngineType.Text = "---";
            lblMakeyear.Text   = "---";
            lblPlant.Text      = "---";
            lblSeries.Text     = "---";
            lblTurbo.Text      = "---";
            lblChecksum.Text   = "Not verified";

            VINCarInfo carinfo = VINDecoder.DecodeVINNumber(textEdit1.Text);

            lblBody.Text       = carinfo.Body;
            lblCarModel.Text   = carinfo.CarModel.ToString();
            lblEngineType.Text = carinfo.EngineType.ToString();
            lblMakeyear.Text   = carinfo.Makeyear.ToString();
            lblPlant.Text      = carinfo.PlantInfo;
            lblSeries.Text     = carinfo.Series;
            lblTurbo.Text      = carinfo.TurboModel.ToString().Replace("_", "-");
            lblGearbox.Text    = carinfo.GearboxDescription;
            if (carinfo.CalculatedChecksum != '*')
            {
                lblChecksum.Text = carinfo.CalculatedChecksum == textEdit1.Text[8] ? "Valid" : "WRONG! Expected: " + carinfo.CalculatedChecksum + " but found: " + textEdit1.Text[8];
            }
        }
Ejemplo n.º 2
0
        public VINCarInfo DecodeVINNumber(string VINNumber)
        {
            // Pos 1-3 World Manufacturer Identifier
            // Pos 1 Geographical Area: Y=Northern Europe
            // Pos 2 Country: S=Sweden K=Finland
            // Pos 3 Car Manuacturer: 3=Saab Automobile AB
            //
            VINCarInfo _carInfo = new VINCarInfo();

            if (VINNumber.StartsWith("YK1") || // finland
                VINNumber.StartsWith("YS3"))   // sweden
            {
                _carInfo.Makeyear           = DecodeMakeyear(VINNumber);
                _carInfo.CarModel           = DecodeCarModel(VINNumber);
                _carInfo.EngineType         = DecodeEngineType(VINNumber, _carInfo.CarModel, _carInfo.Makeyear);
                _carInfo.PlantInfo          = DecodePlantInfo(VINNumber);
                _carInfo.Series             = DecodeSeries(VINNumber, _carInfo.CarModel, _carInfo.Makeyear);
                _carInfo.Body               = DecodeBodyType(VINNumber);
                _carInfo.TurboModel         = DecodeTurboModel(_carInfo.EngineType, _carInfo.CarModel, _carInfo.Makeyear);
                _carInfo.GearboxDescription = DecodeTransmissionType(VINNumber);
                _carInfo.Valid              = true;
            }
            else if (VINNumber.StartsWith("YSC")) // Cadillac
            {
                _carInfo.Makeyear           = DecodeMakeyear(VINNumber);
                _carInfo.CarModel           = VINCarModel.CadillacBTS;
                _carInfo.EngineType         = DecodeEngineType(VINNumber, _carInfo.CarModel, _carInfo.Makeyear);
                _carInfo.PlantInfo          = DecodePlantInfo(VINNumber);
                _carInfo.Series             = DecodeSeries(VINNumber, _carInfo.CarModel, _carInfo.Makeyear);
                _carInfo.Body               = DecodeBodyType(VINNumber);
                _carInfo.TurboModel         = VINTurboModel.Unknown;
                _carInfo.GearboxDescription = DecodeTransmissionType(VINNumber);
                _carInfo.Valid              = true;

                /*
                 * Engines:
                 * 1.9 L Fiat turbodiesel I4 16v, 150 hp (110 kW)
                 * 1.9 L Fiat turbodiesel I4 16v, 180 hp (132 kW) (2007-)
                 * 2.0 L Ecotec LK9 I4, mid-pressure turbo, 175 hp (129 kW)
                 * 2.0 L Ecotec LK9 I4, high-pressure turbo, 210 hp (154 kW)
                 * 2.0 T FlexPower 200 hp (147 kW)
                 * 2.8 L HFV6 V6, turbo, 250 hp (184 kW)
                 */
            }

            else if (VINNumber.StartsWith("W0L")) // Opel
            {
                _carInfo.Makeyear           = DecodeMakeyear(VINNumber);
                _carInfo.CarModel           = DecodeCarModelOpel(VINNumber);
                _carInfo.EngineType         = VINEngineType.Z20NET;
                _carInfo.PlantInfo          = "";
                _carInfo.Series             = DecodeSeries(VINNumber, _carInfo.CarModel, _carInfo.Makeyear);
                _carInfo.Body               = DecodeBodyType(VINNumber);
                _carInfo.TurboModel         = DecodeTurboModel(_carInfo.EngineType, _carInfo.CarModel, _carInfo.Makeyear);
                _carInfo.GearboxDescription = DecodeTransmissionType(VINNumber);
                _carInfo.Valid              = true;
            }
            return(_carInfo);
        }
Ejemplo n.º 3
0
        private void DecodeVIN()
        {
            lblBody.Text       = "---";
            lblCarModel.Text   = "---";
            lblEngineType.Text = "---";
            lblMakeyear.Text   = "---";
            lblPlant.Text      = "---";
            lblSeries.Text     = "---";
            lblTurbo.Text      = "---";
            VINDecoder decoder = new VINDecoder();
            VINCarInfo carinfo = decoder.DecodeVINNumber(textEdit1.Text);

            lblBody.Text       = carinfo.Body;
            lblCarModel.Text   = carinfo.CarModel.ToString();
            lblEngineType.Text = carinfo.EngineType.ToString();
            lblMakeyear.Text   = carinfo.Makeyear.ToString();
            lblPlant.Text      = carinfo.PlantInfo;
            lblSeries.Text     = carinfo.Series;
            lblTurbo.Text      = carinfo.TurboModel.ToString().Replace("_", "-");
            lblGearbox.Text    = carinfo.GearboxDescription;
        }
Ejemplo n.º 4
0
        public VINCarInfo DecodeVINNumber(string VINNumber)
        {
            // Pos 1-3 World Manufacturer Identifier
            // Pos 1 Geographical Area: Y=Northern Europe
            // Pos 2 Country: S=Sweden K=Finland
            // Pos 3 Car Manuacturer: 3=Saab Automobile AB
            //
            VINCarInfo _carInfo = new VINCarInfo();
            if (VINNumber.StartsWith("YK1") || // finland
                VINNumber.StartsWith("YS3"))  // sweden
            {
                _carInfo.Makeyear = DecodeMakeyear(VINNumber);
                _carInfo.CarModel = DecodeCarModel(VINNumber);
                _carInfo.EngineType = DecodeEngineType(VINNumber, _carInfo.CarModel, _carInfo.Makeyear);
                _carInfo.PlantInfo = DecodePlantInfo(VINNumber);
                _carInfo.Series = DecodeSeries(VINNumber, _carInfo.CarModel, _carInfo.Makeyear);
                _carInfo.Body = DecodeBodyType(VINNumber);
                _carInfo.TurboModel = DecodeTurboModel(_carInfo.EngineType, _carInfo.CarModel, _carInfo.Makeyear);
                _carInfo.GearboxDescription = DecodeTransmissionType(VINNumber);
                _carInfo.Valid = true;
            }
            else if (VINNumber.StartsWith("YSC")) // Cadillac
            {
                _carInfo.Makeyear = DecodeMakeyear(VINNumber);
                _carInfo.CarModel = VINCarModel.CadillacBTS;
                _carInfo.EngineType = DecodeEngineType(VINNumber, _carInfo.CarModel, _carInfo.Makeyear);
                _carInfo.PlantInfo = DecodePlantInfo(VINNumber);
                _carInfo.Series = DecodeSeries(VINNumber, _carInfo.CarModel, _carInfo.Makeyear);
                _carInfo.Body = DecodeBodyType(VINNumber);
                _carInfo.TurboModel  = VINTurboModel.Unknown;
                _carInfo.GearboxDescription = DecodeTransmissionType(VINNumber);
                _carInfo.Valid = true;
                /*
                Engines:
                1.9 L Fiat turbodiesel I4 16v, 150 hp (110 kW)
                1.9 L Fiat turbodiesel I4 16v, 180 hp (132 kW) (2007-)
                2.0 L Ecotec LK9 I4, mid-pressure turbo, 175 hp (129 kW)
                2.0 L Ecotec LK9 I4, high-pressure turbo, 210 hp (154 kW)
                2.0 T FlexPower 200 hp (147 kW)
                2.8 L HFV6 V6, turbo, 250 hp (184 kW)
                */
            }

            else if (VINNumber.StartsWith("W0L")) // Opel
            {
                _carInfo.Makeyear = DecodeMakeyear(VINNumber);
                _carInfo.CarModel = DecodeCarModelOpel(VINNumber);
                _carInfo.EngineType = VINEngineType.Z20NET;
                _carInfo.PlantInfo = "";
                _carInfo.Series = DecodeSeries(VINNumber, _carInfo.CarModel, _carInfo.Makeyear);
                _carInfo.Body = DecodeBodyType(VINNumber);
                _carInfo.TurboModel = DecodeTurboModel(_carInfo.EngineType, _carInfo.CarModel, _carInfo.Makeyear);
                _carInfo.GearboxDescription = DecodeTransmissionType(VINNumber);
                _carInfo.Valid = true;
            }
            return _carInfo;
        }