unit Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdFTP;
type
TfrmMain =
class(TForm)
lblUsername: TLabel;
lblPasswort: TLabel;
txtPasswort: TEdit;
txtUsername: TEdit;
chbUserSpeichern: TCheckBox;
btnStart: TButton;
btnCancel: TButton;
lblError: TLabel;
ftp: TIdFtp;
procedure btnCancelClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure txtUsernameChange(Sender: TObject);
procedure txtPasswortChange(Sender: TObject);
procedure btnStartClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
frmMain: TfrmMain;
implementation
{$R *.dfm}
procedure TfrmMain.btnCancelClick(Sender: TObject);
begin
frmMain.Close();
end;
procedure TfrmMain.btnStartClick(Sender: TObject);
begin
try
ftp.Username := txtUsername.Text;
ftp.Password := txtPasswort.Text;
ftp.Port := 21;
ftp.Host := '
ajc-bk.dyndns.org';
ftp.Connect();
except
//lblError.Text = '';
end;
end;
procedure TfrmMain.FormCreate(Sender: TObject);
begin
txtUsername.Font.Style := [fsItalic];
txtPasswort.Font.Style := [fsItalic];
frmMain.chbUserSpeichern.Checked := true;
end;
procedure TfrmMain.txtPasswortChange(Sender: TObject);
begin
txtPasswort.Font.Style := [];
txtPasswort.PasswordChar := '
*';
end;
procedure TfrmMain.txtUsernameChange(Sender: TObject);
begin
txtUsername.Font.Style := [];
end;
end.