[Carradio\BLAUPUNKT\SANTA MONICA CD30 BP0175  panel]

Size(310,460);  

Form {
    	HexDigit(Code,"Code ",70,15,100,4);
	ComboBox(CodeRequest,"Запрос кода",72,45,50,"Off","On");
    	//CheckBox(ResetCounter,"Обнулить счётчик попыток",82,80);
	
	Group("Информация",5,110,300,50)		 
    {
        Label(message," ",0,22);			 
    }
    	Group("Описание",5,165,300,220) 		 
    {
        Label(lb1,"Code calculator for  BLAUPUNKT :",0,15);
    	Label(lb2,"Model:  SANTA MONICA CD30 BP0175  panel",32,30);
    	Label(lb3,"Sec. Type:  CODE 0000-9999",32,45);
	Label(lb4,"Manufacturen:  BLAUPUNKT.",32,60);
	Label(lb5,"Partnumer:  7 640 175 510 ",32,75);
    	Label(lb6,"MCU: D17717GC (8609800050) ",32,90);
	Label(lb7,"EEPROM:  24C04 smd",32,105);
	Label(lb8,"Sec.loc.: EEPROM",32,120);
    	Label(lb9,"Autor:  telik@ukrwest.net   2008",0,200);
    	Label(lb10,"Enter code: ",32,135);
    }
	Picture(Logo,"blaupunkt.bmp",210,18,0,0);
    {
        Label(msg," ",0,395);				 
    } 
}

OnShow {
	msg.Color=0x0000FF;				 
        msg.Bold=1;					 
	msg="http://www.eeprom.lg.ua";		  
        
	message.Bold = 1;  
    	var10 = 1;
    	if ( @0x15 != @0x25 ) { var10 = 0;}	
    	if ( var10 = 0 ) { message.Color = 0x0000FF; message = "Неверный дамп ! "; Code = 0; 
	}   
	else
    {
	var1 = @0x15 ;
	var2 = @0x16 ;
	var3 = var1 ^ 0xAA ;
	var4 = var2 ^ 0xAA ;
	var3 = var3 << 8;
	code = var3 | var4 ;

	Var5 = 0;
	if ( @0x13 != 0xFF ) { var5 = 1; }		 
	message.Color = 0xFF0000; message = "Дамп ОК.";
    	CodeRequest = var5;
    }
}

OnApply {
	var10 = 1;
    	if ( @0x15 != @0x25 ) { var10 = 0;}	
	if ( var10 = 0 ) {message.Color = 0x0000FF; message = "Неверный дамп !  Запись прекращена !"; Code = 0;
	}
	else
    {
	if(CodeRequest = 1) { @0x13 = 0xAE; }
	if(CodeRequest = 1) { @0x23 = 0xAE; }
	if(CodeRequest = 1) { @0x33 = 0xAE; }
	if(CodeRequest = 0) { @0x13 = 0xFF; }
	if(CodeRequest = 0) { @0x23 = 0xFF; }
	if(CodeRequest = 0) { @0x33 = 0xFF; }
	message.Color = 0xFF0000;
        message.Bold = 1;
       	message = "Запрос кода успешно изменён.";
    }
}
