PERCOBAAN 7

     POLTEKAD KODIKLATAD
JURUSAN TELEKOMUNIKASI




MEMBUAT SKEMA PATROLI
MENGGUNAKAN DELPHI XE 8










Disusun Oleh :

Sertu Mohamad Andryan Prabowo               NIM 202308023-E



PROGRAM STUDI DIPLOMA 4 ANGKATAN VIII
TEKNIK TELEKOMUNIKASI MILITER
SEMESTER III
TAHUN 2024



Batu,               September  2024



PERCOBAAN 7
MEMBUAT SKEMA PATROLI
MENGGUNAKAN DELPHI XE 8




1. Tujuan : Agar Bamasis mampu membuat skema patroli menggunakan Delphi XE 8



2. Alat dan Bahan : 

a.    Laptop

b.    Aplikasi Delphi

c.    Tshape

d.    Tbutton

e.    Timage

f.    Tedit



3. Dasar Teori :

    a.                Tshape adalah salah satu komponen visual dalam Delphi yang digunakan untuk menggambar bentuk geometris sederhana seperti persegi panjang, lingkaran, elips, atau garis di dalam sebuah form atau container lainnya. TShape sangat berguna untuk membuat elemen visual yang sederhana.







    b.            TButton digunakan untuk membuat tombol (button) di antarmuka pengguna. TButton memungkinkan pengguna untuk memicu suatu aksi atau perintah ketika tombol tersebut diklik. Tombol sangat berguna dalam aplikasi Delphi untuk menjalankan berbagai macam perintah.





    

    c.          TImage merujuk pada komponen atau kontrol yang digunakan untuk menampilkan dan mengelola gambar dalam aplikasi.dengan format .jpg, .gif, .bmp dan sebagainya. Komponen Image terdapat pada Tab Additional.







d.             T Edit Dalam Delphi 8, fungsi t edit biasanya merujuk pada komponen TEdit, yang digunakan untuk membuat kontrol input teks di antarmuka pengguna. Komponen ini memungkinkan pengguna untuk mengetikkan teks atau memodifikasi teks yang sudah ada.







4. Langkah-langkah Percobaan

    a.    Flowchart













b.    Coding

unit Unit1;


interface


uses

  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,

  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls,

  Vcl.Imaging.pngimage;


type

  TForm1 = class(TForm)

    Image1: TImage;

    Shape1: TShape;

    Shape2: TShape;

    Shape3: TShape;

    Shape4: TShape;

    Shape5: TShape;

    Shape6: TShape;

    Shape7: TShape;

    Shape8: TShape;

    Shape9: TShape;

    Shape10: TShape;

    Shape11: TShape;

    Shape12: TShape;

    Shape13: TShape;

    Shape14: TShape;

    Shape15: TShape;

    Shape16: TShape;

    Shape17: TShape;

    Shape18: TShape;

    Shape19: TShape;

    Shape20: TShape;

    Shape21: TShape;

    Shape22: TShape;

    Shape23: TShape;

    Shape24: TShape;

    Shape25: TShape;

    Shape26: TShape;

    Shape27: TShape;

    Shape28: TShape;

    Shape29: TShape;

    Shape30: TShape;

    Shape31: TShape;

    Shape32: TShape;

    Shape33: TShape;

    Shape34: TShape;

    Shape35: TShape;

    Shape36: TShape;

    Edit1: TEdit;

    Button1: TButton;

    procedure Button1Click(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;


var

  Form1: TForm1;


implementation


{$R *.dfm}


procedure TForm1.Button1Click(Sender: TObject);

begin

if edit1.text='11' then

begin

  shape1.Visible:=true; shape2.visible:=false; shape3.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='12' then

begin

  shape1.Visible:=false; shape2.visible:=true; shape3.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='13' then

begin

  shape1.Visible:=false; shape2.visible:=false; shape3.Visible:=true;

  edit1.Text:='';

end;

if edit1.text='21' then

begin

  shape4.Visible:=true; shape5.visible:=false; shape6.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='22' then

begin

  shape4.Visible:=false; shape5.visible:=true; shape6.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='23' then

begin

  shape4.Visible:=false; shape5.visible:=true; shape6.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='31' then

begin

  shape7.Visible:=true; shape8.visible:=false; shape9.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='32' then

begin

  shape7.Visible:=false; shape8.visible:=true; shape9.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='33' then

begin

  shape7.Visible:=false; shape8.visible:=false; shape9.Visible:=true;

  edit1.Text:='';

end;

if edit1.text='41' then

begin

  shape10.Visible:=true; shape11.visible:=false; shape12.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='42' then

begin

  shape10.Visible:=false; shape11.visible:=true; shape12.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='43' then

begin

  shape10.Visible:=false; shape11.visible:=false; shape12.Visible:=true;

  edit1.Text:='';

end;

if edit1.text='51' then

begin

  shape13.Visible:=true; shape14.visible:=false; shape15.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='52' then

begin

  shape13.Visible:=false; shape14.visible:=true; shape15.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='53' then

begin

  shape13.Visible:=false; shape14.visible:=false; shape15.Visible:=true;

  edit1.Text:='';

end;

if edit1.text='61' then

begin

  shape16.Visible:=true; shape17.visible:=false; shape18.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='62' then

begin

  shape16.Visible:=false; shape17.visible:=true; shape18.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='63' then

begin

  shape16.Visible:=false; shape17.visible:=false; shape18.Visible:=true;

  edit1.Text:='';

end;

if edit1.text='71' then

begin

  shape19.Visible:=true; shape20.visible:=false; shape21.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='72' then

begin

  shape19.Visible:=false; shape20.visible:=true; shape21.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='73' then

begin

  shape19.Visible:=false; shape20.visible:=false; shape21.Visible:=true;

  edit1.Text:='';

end;

if edit1.text='81' then

begin

  shape22.Visible:=true; shape23.visible:=false; shape24.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='82' then

begin

  shape22.Visible:=false; shape23.visible:=true; shape24.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='83' then

begin

  shape22.Visible:=false; shape23.visible:=false; shape24.Visible:=true;

  edit1.Text:='';

end;

if edit1.text='91' then

begin

  shape25.Visible:=true; shape26.visible:=false; shape27.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='92' then

begin

  shape25.Visible:=false; shape26.visible:=true; shape27.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='93' then

begin

  shape25.Visible:=false; shape26.visible:=false; shape27.Visible:=true;

  edit1.Text:='';

end;

if edit1.text='101' then

begin

  shape28.Visible:=true; shape29.visible:=false; shape30.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='102' then

begin

  shape28.Visible:=false; shape29.visible:=true; shape30.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='103' then

begin

  shape28.Visible:=false; shape29.visible:=false; shape30.Visible:=true;

  edit1.Text:='';

end;

if edit1.text='111' then

begin

  shape31.Visible:=true; shape32.visible:=false; shape33.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='112' then

begin

  shape31.Visible:=false; shape32.visible:=true; shape33.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='113' then

begin

  shape31.Visible:=false; shape32.visible:=false; shape33.Visible:=true;

  edit1.Text:='';

end;

if edit1.text='121' then

begin

  shape34.Visible:=true; shape35.visible:=false; shape36.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='122' then

begin

  shape34.Visible:=false; shape35.visible:=true; shape36.Visible:=false;

  edit1.Text:='';

end;

if edit1.text='123' then

begin

  shape34.Visible:=false; shape35.visible:=false; shape36.Visible:=true;

  edit1.Text:='';

end;

end;


end.



5. Hasil dan Pembahasan

    a.    Hasil











b.   Pembahasan

 

1)               TImage adalah komponen visual yang digunakan untuk menampilkan gambar pada form. Komponen ini memungkinkan gambar dari berbagai format (seperti BMP, JPG, PNG, dan GIF) ditampilkan dalam aplikasi.

2)               Tshape adalah salah satu komponen visual dalam Delphi yang digunakan untuk menggambar bentuk geometris sederhana seperti persegi panjang, lingkaran, elips, atau garis di dalam sebuah form atau container lainnya. TShape sangat berguna untuk membuat elemen visual yang sederhana.

3)               TButton digunakan untuk membuat tombol (button) di antarmuka pengguna. TButton memungkinkan pengguna untuk memicu suatu aksi atau perintah ketika tombol tersebut diklik. Tombol sangat berguna dalam aplikasi Delphi untuk menjalankan berbagai macam perintah.



6. Kesimpulan

         

          Dengan memanfaatkan komponen TImage, TShape, dan TButton,  sebuah aplikasi untuk mengelola proses produksi, seperti pabrik dodol, dapat dikembangkan dengan mudah dan efektif. TImage digunakan untuk menampilkan visualisasi proses atau status produksi secara real-time, sementara TShape membantu memvisualisasikan elemen-elemen penting dalam proses produksi, seperti wadah, alur produksi, atau indikator visual lainnya. TButton berfungsi sebagai kontrol bagi pengguna untuk memulai, menghentikan, atau mengatur ulang proses.

 

          Aplikasi yang dirancang dengan komponen ini mampu menghentikan proses secara otomatis jika ukuran atau parameter yang diatur tidak sesuai dengan yang diprogram, sehingga menghindari kesalahan produksi. Hal ini membuat sistem menjadi lebih andal dan efisien. Penggunaan komponen-komponen tersebut memungkinkan tercapainya kecepatan, ketepatan, efektivitas, dan efisiensi dalam produksi dodol atau proses produksi lainnya. Dengan demikian, sistem ini sangat cocok diterapkan dalam lingkungan industri yang membutuhkan kontrol otomatis untuk meningkatkan kualitas dan kuantitas produksi secara optimal.