private void ConvertPartNumber()
{
partNumberConverter pnc = new partNumberConverter();
ECUInfo ecuinfo = pnc.ConvertPartnumber(buttonEdit1.Text, 0);
lblCarModel.Text = "---";
lblECUType.Text = "---";
lblFuel.Text = "---";
lblCarType.Text = "---";
lblRating.Text = "--/--";
lblSoftwareID.Text = "---";
if (ecuinfo.CarMake != string.Empty)
{
lblCarModel.Text = ecuinfo.CarMake;
lblECUType.Text = ecuinfo.EcuType;
lblFuel.Text = ecuinfo.FuelType;
lblCarType.Text = ecuinfo.CarType;
lblSoftwareID.Text = ecuinfo.SoftwareID;
if (ecuinfo.HP > 0 || ecuinfo.TQ > 0)
{
lblRating.Text = ecuinfo.HP + " hp/" + ecuinfo.TQ + " Nm";
}
else
{
lblRating.Text = "";
}
if (System.IO.File.Exists(Path.Combine(Application.StartupPath, "Binaries\\" + buttonEdit1.Text + ".BIN")))
{
simpleButton2.Enabled = true;
simpleButton3.Enabled = true;
simpleButton4.Enabled = true;
}
else
{
simpleButton2.Enabled = false;
simpleButton3.Enabled = false;
simpleButton4.Enabled = false;
}
}
else
{
MessageBox.Show("The entered partnumber was not recognized by VAGEDCSuite");
}
}