[US-Euro converter\Nissan\Armada 9S12H256 (1k78x)]

Size(280,290); 

Form 
{
    Group("Пробег",10,13,120,80)
    {
        Digit(Distance," ",5,18,70);
        Label(lbkm,"КМ",90,20);
        Digit(Constant," ",5,48,30);
        Label(lbc,"CONSTANT",50,50);
    }
    Group("Информация",5,100,270,45) 
    {
        Label(msg," ",0,18);
    }    
    Group("Описание",5,150,270,90) 
    {
        Label(lb1,"Конвертер mil-km для Nissan Armada.",0,20);
        Label(lb2,"Панель Visteon. Процессор 9S12H256 (1k78x).",0,40);

    }
    Picture(Logo,"Nissan.bmp",170,24,0,0);
    
}

OnShow 
{
        msg.Color = 0xFF0000;
        msg.Bold = 1;
        msg = "Дамп ОК. Введите новый пробег.";
        Constant = 128;
        Distance = ((@0xF4c << 4) + ((@0xF4d & 0xF0) >> 4)) * Constant;
    
}

OnApply 
{
	
 Var1 = Distance;

    Var0=0;
    Var4 =0xc35;
    Var5 =0xc36;
    Var6 =0xc39;

    if(@Var4 = 0xf2)   	            { Var0 = Var0 + 1;}	
    if(@Var5 = 0xf2) 		{ Var0 = Var0 + 1;}
    if(@Var6 = 0x03) 		{ Var0 = Var0 + 1;}

     if(Var0 != 3)

    {
        msg.Color = 0x0000FF;
        Msg = "Дамп неверен запись прекращена";
    }
    else
    {
    @Var6=0x02;

        msg.Color = 0xFF0000;
        msg = "Перевод в европу завершен.";
   }
}
