PERCOBAAN VII

MEMBUAT SKEMA PATROLI

 

1.    Tujuan.        Agar Bamasis mampu membuat laporan kondisi kontak senjata dengan musuh melalui map.

 


2.    Alat dan Bahan.

 

a.       Laptop;

b.       Aplikasi Delphi;

c.       Tool Edit;

d.       Tool Button; dan

e.       Tool Image.


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:=false; shape6.Visible:=true;

  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.

         

1)               Tampilan jika titik aman akan berwarna hijau.

         


 

2)               Tampilan jika titik memerlukan bantuan akan berwarna merah.



3)               Tampilan jika titik dalam keadaan waspada akan berwarna kuning.



 
          b.       Pembahasan.

 

Pada percobaan diatas Aplikasi ini menggunakan dua sisi, yaitu antara sisi Client dan Server. Dimana pada sisi Client dibutuhkan Aplikasi AnyDesk/TeamViewer untuk me-remote aplikasi Delphi ini pada komputer server. Setelah berhasil di remote, pasukan yang melaksanakan patroli dari titik ke titik melaporkan hasil patroli di masing-masing pos(titik) dengan status sebagai berikut :


1)    H (Hijau) : Aman

2)    K (Kuning) : Terjadi kontak tembak namun bisa diatasi.

3)    M (Merah) : Terjadi kontak tembak dan membutuhkan bala bantuan.


Pada saat sampai di Pos, pasukan yang me-remote aplikasi melalui AnyDesk memilih titik pos melalui ComboBox kemudian memasukan status kondisi melalui EditText. Kemudian Shape akan berubah warna sesuai dengan kondisi yang dipilih. Begitu juga pasukan yang berada di komputer Server akan dapat melihat status pergerakan pasukan.


6.       Kesimpulan

   

          Aplikasi Kontak Tembak ini dapat dikembangkan lebih lanjut sesuai dengan kebutuhan pasukan di lapangan. Diantaranya pembuatan aplikasi secara Mobile dari sisi pasukan agar tidak harus me-remote aplikasi pada komputer server serta pembuatan server. Aplikasi Kontak Tembak ini sangat berguna untuk melaporkan kondisi pasukan secara Real Time agar didapatkan kehandalan gerak dalam pemberian bantuan serta sebagai alat bagi Kodal pimpinan pasukan.