12-25-2013, 01:14 PM
langsung saja kali ini tutorial simple untuk kalian cara Membuat Warna Trafik pada Project ( seperti pada gambar )
buat 2 shape pada project
tambahkan code dibawah pada type
buat procedure pada project
sisipkan code berikut pada request dan respons
request
respons
selamat mencoba
![[Image: 2xzf.gif]](https://images.weserv.nl/?url=s20.postimg.cc%2Frw9xjr85l%2F2xzf.gif)
buat 2 shape pada project
tambahkan code dibawah pada type
Code:
type
Procedure LedBlinkUpload;
Procedure LedBlinkDownload;
buat procedure pada project
Code:
procedure TForm1.LedBlinkUpload;
begin
shape1.Refresh;
if shape1.brush.color=clSilver then
begin
shape1.brush.color:=$0007F513;
end else
begin
shape1.brush.color:=clSilver;
end;
end;
procedure TForm1.LedBlinkDownload;
begin
shape2.Refresh;
if shape2.brush.color=clSilver then
begin
shape2.brush.color:=$000404DD;
end else
begin
shape2.brush.color:=clSilver;
end;
end;
sisipkan code berikut pada request dan respons
request
Code:
procedure TForm1.IndyTCPExecute(AThread: TIdMappedPortThread);
begin
LedBlinkUpload;
end;
respons
Code:
procedure TForm1.IndyTCPOutboundData(AThread: TIdMappedPortThread);
begin
LedBlinkDownload;
end;
selamat mencoba

[Only registered and activated users can see links Click here to register]