[Dashboard\Smart\Service\Smart W451\Smart W451 95080 TPM]

Size(280,400); 

Form 
{
 
    Group("Информация",5,80,270,45) 
    {
        Label(Message," ",0,18);
    }
   Group("Reactivation no. 1",5,125,270,45)
    {
        Digit(oilkm1," ",5,18,50);
        Label(km1,"KM",70,20); 
Label(rt1,"Kilometer at Reactivation no. 1",100,20); 
    }
    Group("Reactivation no. 2",5,170,270,45)
    {
        Digit(oilkm2," ",5,18,50);
        Label(km2,"KM",70,20); 
Label(rt2,"Kilometer at Reactivation no. 2",100,20); 
    }

    Group("Reactivation no. 3",5,215,270,45)
    {
        Digit(oilkm3," ",5,18,50);
        Label(km3,"KM",70,20); 
Label(rt3,"Kilometer at Reactivation no. 3",100,20); 
    }
    Group("Reactivation no. 4",5,260,270,45)
    {
        Digit(oilkm4," ",5,18,50);
        Label(km4,"KM",70,20); 
Label(rt4,"Kilometer at Reactivation no. 4",100,20); 
    }
    Group("Reactivation no. 5",5,305,270,45)
    {
        Digit(oilkm5," ",5,18,50);
        Label(km5,"KM",70,20); 
Label(rt5,"Kilometer at Reactivation no. 5",100,20); 
    }

    Picture(Logo,"Smart.bmp",90,20,0,0);
}

OnShow 
{
    Message.Bold = 1;  
    Var0 = 1;
  
    if (Var0 = 0)
    {
        message.Color = 0x0000FF;
        Message = "Неверный дамп!";
   
    }
    else
    {

     
    message.Color = 0xFF0000;
    message.Bold = 1;
    message = "Дамп ОК. Введите новые значения.";
    
  


    }
  
   oilkm1 = ((@0x236 << 8) | @0x237)*16; 
   oilkm2 = ((@0x229 << 8) | @0x22a)*16; 
   oilkm3 = ((@0x21c << 8) | @0x21d)*16;
   oilkm4 = ((@0x20f << 8) | @0x210)*16; 
   oilkm5 = ((@0x202 << 8) | @0x203)*16;
 
}
    
OnApply
{
 

    Var1 = oilkm1; 

    Var2 = oilkm2; 

    Var3 = oilkm3; 

    Var4 = oilkm4; 

    Var5 = oilkm5; 

    Var1 = Var1/16; 
    Var2 = Var2/16; 
    Var3 = Var3/16; 
    Var4 = Var4/16; 
    Var5 = Var5/16;
 
    @0x236 = Var1 >> 8; 
    @0x237 = Var1 & 0xff; 
    @0x229 = Var2 >> 8; 
    @0x22a = Var2 & 0xff; 
    @0x21c = Var3 >> 8; 
    @0x21d = Var3 & 0xff; 
    @0x20f = Var4 >> 8; 
    @0x210 = Var4 & 0xff; 
    @0x202 = Var5 >> 8; 
    @0x203 = Var5 & 0xff; 
  
   message.Color = 0xFF0000;
       message.Bold = 1;
       message = "Новый пробег записан.";
}
      


    }
 
 













