[Dashboard\Citroen\Berlingo\BSI Berlingo D780949]
#b2.doc

Size(280,250); 

Form
{
     Group("Идентификация",5,5,180,50)
    {
        Label(vin," ",0,15);
        Label(log," ",0,30);
    }   
     
     Group("Информация",5,60,270,45)
    {
        Label(message," ",0,18);
        
    }
     Group("Описание",5,105,270,100) 
    {
        Label(lb4,"Калькулятор для BSI Citroen Berlingo.",0,20);
        Label(lb5,"D780949 internal EEPROM",0,35);
        Label(lb2,"Для выставления пробега равного 0",0,55);
        Label(lb3,"нажмите кнопку <Применить>.",0,70);
    }
     Picture(Picture1,"Citroen.bmp",200,2,0,0);
}

OnShow 
{
    Message.Bold = 1;
    Var0 = 0;
    Var1=(@0x00);
    Var2=(@0x01);
    if(Var1 = 0x56) { Var0 = 1;}
    if(Var2 = 0x46) { Var0 = Var0 + 1;}
    if(Var1 = 0x58) { Var0 = 1;}
    if(Var2 = 0x37) { Var0 = Var0 + 1;}

    if(Var0 != 2)
    {
        message.Color = 0x0000FF; 	
        Message = "Неверный дамп!";                           
    }
    else
    {
        vin = "VIN: "+#c.@0x00+#c.@0x01+#c.@0x02+#c.@0x03+#c.@0x04+#c.@0x05+#c.@0x06+#c.@0x07+#c.@0x08+#c.@0x09+#c.@0x0a+#c.@0x0b+#c.@0x0c+#c.@0x0d+#c.@0x0e+#c.@0x0f+#c.@0x10;
        log = "LOGIN: "+#c.@0x19+#c.@0x1a+#c.@0x1b+#c.@0x1c;
        message.Color = 0xFF0000;                    
        message = "Дамп ОК.";       
    }                          
}

OnApply
{
    Var0 = 0;
    Var1=(@0x00);
    Var2=(@0x01);
    if(Var1 = 0x56) { Var0 = 1;}
    if(Var2 = 0x46) { Var0 = Var0 + 1;}
    if(Var1 = 0x58) { Var0 = 1;}
    if(Var2 = 0x37) { Var0 = Var0 + 1;}

    if(Var0 != 2)


    {
        message.Color = 0x0000FF; 	
        Message = "Неверный дамп! Запмсь прекращена!";  
    }
    else
    {
        Var3 = 0xD0;
        while(Var3 != 0xDE)
        {
            @Var3 = 00;
            Var3 = Var3 + 1;
        }   
         
        message.Color = 0xFF0000;  
        message = "Пробег равен 0. Дамп ОК.";
    }
}





















