procedure Tform1.Button1Click(Sender: TObject);
begin
try
with f_pesan.ZConSMS do
begin
Connected := False;
HostName :=Ehostname.Text;
User := Euser.Text;
Port := StrToInt(Eport.text);
Database := Edatabase.Text;
Password := Epassword.Text;
Protocol:=Eprotocol.Text;
Connected := True;
f_pesan.ZQkirimpesan.Active:=True;
f_pesan.ZQpesanmasuk.Active:=True;
f_pesan.ZQterkirim.Active:=True;
f_pesan.ZQgagal.Active:=True;
f_pesan.ZQtersimpan.Active:=True;
f_qr_sms_terkirim.ZQterkirim.Active:=True;
f_qr_sms_masuk.ZQpesanmasuk.Active:=True;
f_qr_sms_gagal.ZQgagal.Active:=True;
f_qr_sms_tersimpan.ZQtersimpan.Active:=True;
f_kontak.ZQkontak.Active:=True;
f_kontak.ZQgrub.Active:=True;
Clocalhost.Checked:=True;
MessageDlg('Koneksi ke localhost, Sukses !',mtInformation,[mbYes],0);
exit;
end;
except
f_pesan.ZConSMS.Connected := False;
Clocalhost.Checked:=False;
if (MessageDlg('Tidak bisa melanjutkan proses, koneksi ke Localhost terputus.'+#13+
'Periksa konfigurasi localhost atau server localhost mati!'+#13+
''+#13+
'Aktifkan control localhost sekarang?'
,mtError,[mbYes,mbNo],0)=mryes) then
begin
ShowMessage('Xampp!');
exit;
end else;
Application.Terminate;
exit;
end;
end;
begin
try
with f_pesan.ZConSMS do
begin
Connected := False;
HostName :=Ehostname.Text;
User := Euser.Text;
Port := StrToInt(Eport.text);
Database := Edatabase.Text;
Password := Epassword.Text;
Protocol:=Eprotocol.Text;
Connected := True;
f_pesan.ZQkirimpesan.Active:=True;
f_pesan.ZQpesanmasuk.Active:=True;
f_pesan.ZQterkirim.Active:=True;
f_pesan.ZQgagal.Active:=True;
f_pesan.ZQtersimpan.Active:=True;
f_qr_sms_terkirim.ZQterkirim.Active:=True;
f_qr_sms_masuk.ZQpesanmasuk.Active:=True;
f_qr_sms_gagal.ZQgagal.Active:=True;
f_qr_sms_tersimpan.ZQtersimpan.Active:=True;
f_kontak.ZQkontak.Active:=True;
f_kontak.ZQgrub.Active:=True;
Clocalhost.Checked:=True;
MessageDlg('Koneksi ke localhost, Sukses !',mtInformation,[mbYes],0);
exit;
end;
except
f_pesan.ZConSMS.Connected := False;
Clocalhost.Checked:=False;
if (MessageDlg('Tidak bisa melanjutkan proses, koneksi ke Localhost terputus.'+#13+
'Periksa konfigurasi localhost atau server localhost mati!'+#13+
''+#13+
'Aktifkan control localhost sekarang?'
,mtError,[mbYes,mbNo],0)=mryes) then
begin
ShowMessage('Xampp!');
exit;
end else;
Application.Terminate;
exit;
end;
end;
No comments:
Post a Comment