[Carradio\BECKER\MEXICO 2000  BE1431]

Size(310,470);  

Form {
    	HexDigit(Code,"Code ",70,15,100,4);
    	CheckBox(ResetCounter,"Обнулить счётчик попыток",82,80);
	//ComboBox(CodeRequest," PROD ",65,50,50,"On","Off");

	Group("Идентификация",5,105,300,45)	  
    {
        Label(sn," ",65,20); 			  
    }
	Group("Информация",5,155,300,50)		 
    {
        Label(message," ",0,22);			 
    }
    	Group("Описание",5,205,300,200) 		 
    {
        Label(lb1,"Code calculator for BECKER :",0,15);
    	Label(lb2,"Model:  MEXICO 2000",32,30);
    	Label(lb3,"Sec. Type:  CODE 4 dig",32,45);
	Label(lb4,"Manufacturen: BECKER.",32,60);
	Label(lb5,"Partnumer:  BE1431",32,75);
    	Label(lb6,"MCU:  80C31",32,90);
	Label(lb7,"EEPROM:  85C82",32,105);
	Label(lb8,"Sec.loc.: EEPROM",32,120);
    	Label(lb9,"Autor:  telik@ukrwest.net   2008",0,180);
    	Label(lb10,"Enter code: ",32,135);
    }
	Picture(Logo,"becker.bmp",210,10,0,0);
    {
        Label(msg," ",0,410);				
    } 
}

OnShow {
	msg.Color=0x0000FF;						 
        msg.Bold=1;							 
	msg="http://www.eeprom.lg.ua";	

	var1 = @0x1D ;
	var2 = @0x1E ;
	var3 = @0x1F ;
	var4 = @0x20 ;
	var5 = var1 ^ 0xAA ;
	var6 = var2 ^ 0xAA ;
	var7 = var3 ^ 0xAA ;
	var8 = var4 ^ 0xAA ;
	var5 = var5 & 0x0F ;
	var6 = var6 & 0x0F ;
	var7 = var7 & 0x0F ;
	var8 = var8 & 0x0F ;
	var5 = var5 << 12;
	var6 = var6 << 8;
	var7 = var7 << 4;

	sn = "Serial No.: "+#b.@0x71+#b.@0x72+#b.@0x73+#b.@0x74+#b.@0x75+#b.@0x76+#b.@0x77;
    	Code = var5 | var6 | var7 | var8 ;
	
	ResetCounter = 1;
	if (@0x26 != 0xA9)   { ResetCounter = 0;}
	if (ResetCounter = 0) 
	{	
	message.Color = 0x0000FF; 
	message.Bold = 1; 
	message = "Обнулите счётчик попыток !!!"; 
	ResetCounter = 1;
	}
    else
	{	 
	message.Color = 0xFF0000;
	message.Bold = 1;
	message = "Счётчик попыток OK.";
	ResetCounter = 0;
    }
}

OnApply {
	if(ResetCounter = 1) { @0x26 = 0xA9; }
	if(ResetCounter = 1) { @0x2C = 0xAA; }
	message.Color = 0xFF0000;
        message.Bold = 1;
       	message = "Счётчик попыток успешно изменён.";
}
