[Carradio\VW\PREMIUM IV  PU-1634A  VWZ9Z7]

Size(310,460);  

Form {

    	HexDigit(Code,"Code",70,15,100,4);
    	CheckBox(ResetCounter,"Обнулить счётчик попыток",65,45);
    	
	Group("Информация",5,120,300,40)	 
    {
        Label(message," ",0,18);		 
    }
    	Group("Описание",5,165,300,220) 	 
    {
        Label(lb1,"Code calculator for VW :",0,15);
    	Label(lb2,"Model:  PREMIUM IV  PU-1634A  VWZ9Z7",12,30);
    	Label(lb3,"Sec. Type:  CODE 0000-1999",32,45);
	Label(lb4,"Manufacturen:  CLARION.",32,60);
	Label(lb5,"Partnumer:  1J0 035 180C",32,75);
    	Label(lb6,"MCU: MB89677AR168 or AR169",32,90);
	Label(lb7,"EEPROM:  93C46 smd ",32,105);
    	Label(lb8,"Sec.loc.: EEPROM",32,120);
    	Label(lb9,"Autor:  telik@ukrwest.net   2008",0,200);
    	Label(lb10,"Enter code:   ",10,135);
    }
	Picture(Logo,"vw.bmp",230,10,0,0);
    {
        Label(msg," ",0,395);			
    } 
}

OnShow {
	msg.Color = 0xFF00FF;			
        msg.Bold=1;				
	msg="http://www.eeprom.lg.ua";	
        
	message.Bold = 1;  
    	var10 = 1;
    	if ( @0x7C != 0x5A ) { var10 = 0;}
    	if ( @0x7D != 0x5A ) { var10 = 0;}	
    	if ( var10 = 0 ) { message.Color = 0x0000FF; message = "Неверный дамп ! "; Code = 0; 
	}   
	else
    {
	var1 = @0x0E;
	var2 = @0x0F;
	var3 = @0x03 & 0x0F;
	var4 = @0x03 & 0xF0;
	var1 = var1 << 8;
	code = var1 | var2 ;
		
	ResetCounter = 0;
	if ( @0x0A = 0x00 ) { ResetCounter = 1;}
	if ( ResetCounter = 0 ) { message.Color = 0x0000FF; message.Bold = 1; message = "Обнулите счётчик попыток !!!";	ResetCounter = 1; }
    else
	{
	message.Color = 0xFF0000;
	message.Bold = 1;
	message = "Дамп ОК.  Счётчик попыток OK.";
	ResetCounter = 0;
	}
   }
}

OnApply {
	var10 = 1;
    	if ( @0x7C != 0x5A ) { var10 = 0;}
    	if ( @0x7D != 0x5A ) { var10 = 0;}	
    	if ( var10 = 0 ) { message.Color = 0x0000FF; message = "Неверный дамп !   Запись прекращена !"; Code = 0; 
	}   
	else
    {
	if (ResetCounter = 1) { @0x0A = 0x00; } 		
	message.Color = 0xFF0000;
        message.Bold = 1;
       	message = "Счётчик попыток успешно изменён.";
    }
}
