[Carradio\BMW\BUSINESS 22DC795_23F no immo]
Size(310,460);  

Form {
    	//HexDigit(Code,"Code ",70,15,100,4);
    	//CheckBox(ResetCounter,"Обнулить счётчик попыток",82,85);
	ComboBox(CodeRequest,"IMMO ",85,50,50,"On","Off");
	
	Group("Идентификация",5,75,300,40)	  
    {
        Label(sn," ",60,18); 			 
    }
	
    	Group("Информация",5,120,300,40)	 
    {
        Label(message," ",0,17);		 
    }
    	Group("Описание",5,165,300,220) 		 
    {
        Label(lb1,"Code calculator for BMW :",0,15);
    	Label(lb2,"Model:  BUSINESS 22DC795/23F wide",32,30);
    	Label(lb3,"Sec. Type:  IMMO",32,45);
	Label(lb4,"Manufacturen: PHILIPS.",32,60);
	Label(lb5,"Partnumer:  PH7950",32,75);
    	Label(lb6,"MCU: P83CE560EFB042",32,90);
	Label(lb7,"EEPROM:  24C16 ",32,105);
	Label(lb8,"Sec.loc.:  EEPROM",32,120);
    	Label(lb9,"Autor:  telik@ukrwest.net   2008",0,200);
    	Label(lb10,"   ",5,135);
	Label(lb11,"   ",5,150);
    }
	Picture(Logo,"bmw.bmp",210,10,0,0);
    {
        Label(msg," ",0,395);				 
    } 
}

OnShow {
        msg.Color=0x0000FF; msg.Bold=1; msg="http://www.eeprom.lg.ua";		  
        	  
    	Var0=1;
    	if(@0x04!=0x50) {Var0=0;}
    	if(@0x05!=0x48) {Var0=0;}
    	if(@0x06!=0x37) {Var0=0;}
    	if(@0x07!=0x39) {Var0=0;}
    	if(@0x08!=0x35) {Var0=0;}
    	if(@0x09!=0x30) {Var0=0;}	
    	if(Var0=0){message.Bold=1; message.Color=0x0000FF; message="Неверный дамп !";}
	else
	{
	if(@0x1A=0x02) {CodeRequest=0;}  
	if(@0x1A!=0x02) {CodeRequest=1;}
	sn="Serial No.:   "+#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+#c.@0x11;
    	message.Bold=1; message.Color=0xFF0000; message="Дамп ОК.";
   }
}

OnApply {
	Var0=1;
    	if(@0x04!=0x50) {Var0=0;}
    	if(@0x05!=0x48) {Var0=0;}
    	if(@0x06!=0x37) {Var0=0;}
    	if(@0x07!=0x39) {Var0=0;}
    	if(@0x08!=0x35) {Var0=0;}
    	if(@0x09!=0x30) {Var0=0;}	
    	if(Var0=0){message.Bold = 1; message.Color=0x0000FF; message="Неверный дамп !  Запись прекращена !";}
    else
    	{
	if(CodeRequest=0) {@0x1A=0x02;}
    	if(CodeRequest=1) {@0x1A=0x04;}
	message.Color=0xFF0000; message.Bold=1; message="Запрос  IMMO   успешно изменён.";
    }
}
