summaryrefslogtreecommitdiff
path: root/unit1.pas
diff options
context:
space:
mode:
Diffstat (limited to 'unit1.pas')
-rw-r--r--unit1.pas36
1 files changed, 29 insertions, 7 deletions
diff --git a/unit1.pas b/unit1.pas
index c1584cb..795ecf3 100644
--- a/unit1.pas
+++ b/unit1.pas
@@ -5,18 +5,22 @@ unit unit1;
interface
uses
- Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, raetselFileUnit;
+ Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
+ raetselunit;
type
- { TForm1 }
+ { tForm1 }
- TForm1 = class(TForm)
+ tForm1 = class(tForm)
procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure FormShow(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
+ raetsel: tRaetsel;
end;
var
@@ -29,15 +33,33 @@ implementation
uses
unit2;
-{ TForm1 }
+// tForm1 **********************************************************************
-procedure TForm1.FormCreate(Sender: TObject);
+procedure tForm1.formCreate(sender: tObject);
begin
+ application.createForm(tForm2, form2);
case form2.showmodal of
- mrBuchstabenraetsel: ;
- mrHochhausraetsel: ;
+ mrBuchstabenraetsel:
+ raetsel:=tBuchstabenRaetsel.create(form1);
+ mrHochhausraetsel:
+ raetsel:=tHochhausRaetsel.create(form1);
+ else begin
+ raetsel:=nil;
+ application.terminate;
+ end;
end;
end;
+procedure tForm1.FormDestroy(Sender: TObject);
+begin
+ raetsel.free;
+end;
+
+procedure tForm1.FormShow(Sender: TObject);
+begin
+ if assigned(raetsel) then
+ raetsel.zeichnen;
+end;
+
end.