[Dashboard\Mini\CAS 3 9S12DP512 ]



Size(280,330); 

Form
{
       Group("Пробег",5,10,110,50)
    {
        Digit(Distance," ",5,18,60);
        Label(lb1,"KM",80,20);
     }
    Group("Идентификация",5,65,270,60)
    {
        Label(fg," ",0,25);
    } 
    Group("Информация",5,130,270,45)
    {
        Label(message," ",0,18);
    }
    Group("Описание",5,180,270,100) 
    {
        Label(lb4,"Калькулятор пробега для Mini Cooper(CAS3).",0,20);
        Label(lb5,"MCU: 9S12DP512",0,35);
        Label(lb2,"Для установки пробега 0 ",0,55);
        Label(lb3,"нажмите кнопку <Применить>.",0,70);
    }
    Picture(Picture1,"Mini.bmp",130,6,0,0);
}




OnShow 
{
Message.Bold = 1;
    Var0 = 0;
    Var1 =(@0xba << 16) | (@0xb9 << 8) |@0xb8;
     
    if (@0x0 = @0xff) {Var0 = Var0 + 1;}
 
    if(Var0 != 0)
    {
        message.Color = 0x0000FF; 	
        Message = "Неверный дамп!";     
        Distance = 0;                   
    }
else
    {
        message.Color = 0xFF0000;                    
        message = "Дамп ОК. Введите новый пробег.";  
        Distance =  Var1;
        fg.Bold = 1;
        fg = "VIN: "+#c.@0xc84+#c.@0xc85+#c.@0xc86+#c.@0xc87+#c.@0xc88+#c.@0xc89+#c.@0xc8a+#c.@0xc8b+
        #c.@0xc8c+#c.@0xc8d+#c.@0xc8e+#c.@0xc8f+#c.@0xc90+#c.@0xc91+#c.@0xc92+#c.@0xc93+#c.@0xc94;
    }      



}

OnApply {
        Var0 = 0xb8;
        while (Var0 != 0xc0)
        {@Var0 = 0x00; Var0 = Var0 + 1;}
              
        message.Color = 0xFF0000;  
        message = "Установлен пробег 0. Дамп ОК.";
    }


}
