[Carradio\RENAULT\RENRCD200-00  FD0306]
Size(310,470);  

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

	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 RENAULT :",0,15);
    	Label(lb2,"Model:  RENRCD200-00  FD0306",32,30);
    	Label(lb3,"Sec. Type:  CODE 0000-9999",32,45);
	Label(lb4,"Manufacturen:  VDO.",32,60);
	Label(lb5,"Partnumer:  RNRC256   8200 354 517",32,75);
    	Label(lb6,"MCU:  92CD541F-6CD3",32,90);
	Label(lb7,"EEPROM:  24C64 smd",32,105);
	Label(lb8,"Sec.loc.: EEPROM",32,120);
    	Label(lb9,"Autor:  telik@ukrwest.net   2008",0,180);
    	Label(lb10,"Enter code: для подтв. кода нажать кн. 6",5,135);
    }
	Picture(Logo,"renault.bmp",210,10,0,0);
    {
        Label(msg," ",0,410);				 
    } 
}


OnShow {
	msg.Color=0x0000FF;						 
        msg.Bold=1;							 
	msg="http://www.eeprom.lg.ua";				
        
	message.Bold = 1;  
    	var10 = 0; 
    	if (@0xF27 = 0x50) { var10 = 1;}
    	if (@0xF28 = 0x30) { var10 = var10 + 1;}
    	if (@0xF29 = 0x49) { var10 = var10 + 1;}	
    	if (var10 != 3) {message.Color = 0x0000FF; message = "Неверный дамп ! "; Code = 0;}
    else
    	{ 
	var1=@0x74;
	var2=@0x73;	
	var1 = var1 << 8;
		
	var0 = @0x77;
	if(var0 != 0x00) { ResetCounter = 1; message.Color = 0xFF0000;
	message.Color = 0x0000FF;
    	message.Bold = 1;
    	message = "Обнулите счётчик попыток !!!";}     
	else
	{
	message.Color = 0xFF0000;
    	message.Bold = 1;
    	message = "Дамп ОК.";
	} 	

	sn = "Serial No.: "+#c.@0x111a+#c.@0x111b+#c.@0x111c+#c.@0x111e+#c.@0x111f+#c.@0x1120+#c.@0x1121+#c.@0x1122+#c.@0x1123+#c.@0x1124;
    	Code = var1 |var2;
	}
   }
}

OnApply {
	var10 = 0; 
    	if (@0xF27 = 0x50) { var10 = 1;}
    	if (@0xF28 = 0x30) { var10 = var10 + 1;}
    	if (@0xF29 = 0x49) { var10 = var10 + 1;}	
    	if (var10 != 3) {message.Color = 0x0000FF; message = "Неверный дамп !  Запись прекращена !"; Code = 0;}
    else
    	{ 
	if(ResetCounter = 1) { @0x77 = 0x00; } 
	message.Color = 0xFF0000;
        message.Bold = 1;
       	message = "Счётчик попыток успешно изменён.";
    	}
}
