unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, ExtCtrls, StdCtrls, Buttons;
type
TForm1 =
class(TForm)
Starten: TBitBtn;
Schuss: TButton;
Ergebnis: TButton;
NeuStarten: TButton;
Timer1: TTimer;
Image1: TImage;
ProgressBar1: TProgressBar;
ProgressBar2: TProgressBar;
Beenden: TButton;
Durchlaufstoppen1: TButton;
Durchlaufstoppen2: TButton;
procedure StartenClick(Sender: TObject);
procedure BeendenClick(Sender: TObject);
procedure SchussClick(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure NeuStartenClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.StartenClick(Sender: TObject);
begin
{dartscheibe}
image1.canvas.brush.style:=bssolid;
image1.canvas.brush.style:=bssolid;
image1.canvas.brush.color:=clblack;
image1.canvas.ellipse(30,30,290,290);
image1.canvas.brush.style:=bssolid;
image1.canvas.brush.color:=clred;
image1.canvas.ellipse(50,50,270,270);
image1.canvas.brush.style:=bssolid;
image1.canvas.brush.color:=clblack;
image1.canvas.ellipse(70,70,250,250);
image1.canvas.brush.style:=bssolid;
image1.canvas.brush.color:=clred;
image1.canvas.ellipse(90,90,230,230);
image1.canvas.brush.style:=bssolid;
image1.canvas.brush.color:=clblack;
image1.canvas.ellipse(110,110,210,210);
image1.canvas.brush.style:=bssolid;
image1.canvas.brush.color:=clyellow;
image1.canvas.ellipse(130,130,190,190);
image1.canvas.brush.style:=bssolid;
image1.canvas.brush.color:=clblue;
image1.canvas.ellipse(150,150,170,170);
{pfeile}
image1.canvas.pen.width:=2;
image1.canvas.moveto(10,10);
image1.canvas.lineto(20,20);
image1.canvas.moveto(20,10);
image1.canvas.lineto(10,20);
image1.canvas.moveto(40,10);
image1.canvas.lineto(50,20);
image1.canvas.moveto(50,10);
image1.canvas.lineto(40,20);
image1.canvas.moveto(70,10);
image1.canvas.lineto(80,20);
image1.canvas.moveto(80,10);
image1.canvas.lineto(70,20);
end;
procedure TForm1.BeendenClick(Sender: TObject);
begin
close;
end;
procedure TForm1.SchussClick(Sender: TObject);
begin
Timer1.enabled:=true;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Timer1.enabled:=false;
end;
procedure TForm1.NeuStartenClick(Sender: TObject);
begin
with Image1.canvas
do
begin
{pfeile}
image1.canvas.pen.width:=2;
image1.canvas.moveto(10,10);
image1.canvas.lineto(20,20);
image1.canvas.moveto(20,10);
image1.canvas.lineto(10,20);
image1.canvas.moveto(40,10);
image1.canvas.lineto(50,20);
image1.canvas.moveto(50,10);
image1.canvas.lineto(40,20);
image1.canvas.moveto(70,10);
image1.canvas.lineto(80,20);
image1.canvas.moveto(80,10);
image1.canvas.lineto(70,20);
end;
end;
end.
end