unit Unit1;
procedure TForm1.ftp_faxWorkBegin(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCountMax: Integer);
begin
Application.ProcessMessages;
ProgressBar1.Position := 0;
ProgressBar1.Max := AWorkCountMax;
showmessage('
Start Upload, AWorkCountMax: ' + InttoStr(AWorkCountMax));
end;
procedure TForm1.ftp_faxWork(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCount: Integer);
begin
Application.ProcessMessages;
Form1.ProgressBar1.Position := AWorkCount;
showmessage('
Work, AWorkCount: ' + InttoStr(AWorkCount));
end;
procedure TForm1.ftp_faxWorkEnd(Sender: TObject; AWorkMode: TWorkMode);
begin
ProgressBar1.Max := 100;
ProgressBar1.Position := 0;
end;
ftp_fax.Intercept := IdLogEvent1;
ftp_fax.Host := ftp_fax_host;
ftp_fax.Username := ftp_fax_username;
ftp_fax.Password := ftp_fax_password;
Application.ProcessMessages;
ftp_fax.Connect(true,-1);
ftp_fax.Put(fax_xip_filename,fax_xip_filename);
ftp_fax.Disconnect;
Form1.Refresh;