unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 =
class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
TAgentStatusLogger =
class(TObject)
private
saveTimer: TTimer;
public
procedure saveLogList(Sender: TObject);
constructor Create(LogFile:
string);
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
constructor TAgentStatusLogger.Create(LogFile:
string);
begin
inherited Create;
saveTimer:= TTimer.Create(
nil);
saveTimer.OnTimer:= saveLogList;
saveTimer.Interval:= 20;
saveTimer.Enabled:= True;
end;
procedure TAgentStatusLogger.saveLogList(Sender: TObject);
begin
Beep;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
TAgentStatusLogger.Create('
Hallo');
end;
end.