[Carradio\VOLVO\SC-805]

Size(310,410);  

Form {
	HexDigit(Code,"Code ",70,15,100,4);
	CheckBox(ResetCounter,"Обнулить счётчик попыток",65,45);
		
	Group("Информация",5,65,300,50)		 
    {
        Label(message," ",0,22);		 
    }
    	Group("Описание",5,120,300,220) 	 
    {
        Label(lb1,"Code calculator for VOLVO :",0,15);
    	Label(lb2,"Model:  SC-805",32,30);
    	Label(lb3,"Sec. Type:  CODE 1111-6666",32,45);
	Label(lb4,"Manufacturen: MITSUBISHI.",32,60);
	Label(lb5,"Partnumer:  VO0690  3533775-1  ",32,75);
    	Label(lb6,"MCU:   M38067HCD170FP",32,90);
	Label(lb7,"EEPROM: 3132 smd = 24C01 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,"volvo.bmp",210,10,0,0);
    {
        Label(msg," ",0,345);			 
    } 
}

OnShow {
	msg.Color=0x0000FF;			 
        msg.Bold=1;				 
	msg="http://www.eeprom.lg.ua";
        
	var1 = @0x00 & 0x0F;
	var2 = @0x04 & 0x0F;
	var3 = @0x08 & 0x0F;
	var4 = @0x0C & 0x0F;
	var1 = var1 << 12;
	var2 = var2 << 8;
	var3 = var3 << 4;
	Code = var1 | var2 | var3 | var4;

	ResetCounter = 1;
	if ( @0x10 = 0x03 ) { ResetCounter = 0;}
	if ( ResetCounter = 1 ) { message.Color = 0x0000FF; message.Bold = 1; message = "Обнулите счётчик попыток !!!";	ResetCounter = 1; }
    else
	{
	message.Color = 0xFF0000;
	message.Bold = 1;
	message = "Счётчик попыток OK.";
	ResetCounter = 0;
	}
    }
	
}

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

