unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
Edit1: TEdit;
Edit2: TEdit;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Panel1: TPanel;
GroupBox2: TGroupBox;
Label3: TLabel;
Label4: TLabel;
ListBox1: TListBox;
Timer1: TTimer;
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
type
liste:Record
zeit:real;
end;
var
Form1: TForm1;
teamname: string;
zeit: real;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
try
teamname := Edit1.Text;
zeit := StrToFloat(Edit2.Text);
Listbox1.Items.add('Team ' + teamname + ' Zeit: ' + FloatToStr(zeit));
except
ShowMessage('Eingabe ist nicht korrekt! Bitte korrigieren!');
end;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
t:integer;
begin
For t:=0 to Listbox1.Items.count-1 do
Liste.Zeit:=ListBox1.Items[t];
end;
end.