diff options
Diffstat (limited to 'unit1.pas')
-rw-r--r-- | unit1.pas | 17 |
1 files changed, 3 insertions, 14 deletions
@@ -42,7 +42,6 @@ type procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
- procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure FormResize(Sender: TObject);
procedure MenuItem1Click(Sender: TObject);
procedure MenuItem2Click(Sender: TObject);
@@ -92,7 +91,9 @@ begin if Button1.Caption = 'erzeugen' then Feld.Erzeugen(Progressbar1)
else Feld.LoadFromFeld(GenThread.Feld);
Feld.Zeichnen;
- if Assigned(GenThread) then GenThread.destroy;
+ if Assigned(GenThread) then
+ GenThread.Free;
+ GenThread:=nil;
GenThread:=TGenerierungsThread.create(Spinedit1.Value,Spinedit2.Value,Progressbar1,nil,Checkbox1.Checked);
Button1.Caption:='noch eins';
Button1.Enabled:=false;
@@ -145,18 +146,6 @@ begin if assigned(GenThread) then GenThread.destroy;
end;
-procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState
- );
-var C: Char;
-begin
- if Key in [ord('c'),ord('x'),ord('y')] then
- begin
- C:=char(Key);
- Feld.OnKeyPress(Sender,C);
- Key:=0;
- end;
-end;
-
procedure TForm1.FormResize(Sender: TObject);
begin
Progressbar1.Width:=Form1.ClientWidth-Progressbar1.Left;
|