From a0b9d3beeb68e0213275d93c74b1137fd0afc017 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 10 Sep 2016 16:35:18 +0200 Subject: irgendwas gemacht --- raetsel.lpi | 11 ++++++-- raetsel.lpr | 3 ++- raetsel.lps | 83 +++++++++++++++++++++++++++++-------------------------------- unit1.lfm | 3 ++- unit1.pas | 19 +++++++++++++- unit2.lfm | 28 +++++++++++++++++++++ unit2.pas | 49 ++++++++++++++++++++++++++++++++++++ 7 files changed, 148 insertions(+), 48 deletions(-) create mode 100644 unit2.lfm create mode 100644 unit2.pas diff --git a/raetsel.lpi b/raetsel.lpi index 70967d1..4f62b02 100644 --- a/raetsel.lpi +++ b/raetsel.lpi @@ -32,7 +32,7 @@ - + @@ -41,9 +41,16 @@ + - + + + + + + + diff --git a/raetsel.lpr b/raetsel.lpr index 2f603cd..22187bf 100644 --- a/raetsel.lpr +++ b/raetsel.lpr @@ -7,7 +7,7 @@ uses cthreads, {$ENDIF}{$ENDIF} Interfaces, // this includes the LCL widgetset - Forms, Unit1 + Forms, unit1, Unit2 { you can add units after this }; {$R *.res} @@ -16,6 +16,7 @@ begin RequireDerivedFormResource:=True; Application.Initialize; Application.CreateForm(TForm1, Form1); + Application.CreateForm(TForm2, Form2); Application.Run; end. diff --git a/raetsel.lps b/raetsel.lps index 04c7bd4..d287696 100644 --- a/raetsel.lps +++ b/raetsel.lps @@ -3,7 +3,7 @@ - + @@ -11,16 +11,17 @@ - + + - - - + + + @@ -38,22 +39,35 @@ - + - + + + - - + - + + + + + + + + + + + + + - + @@ -63,53 +77,36 @@ - - + + - - + + - - + + - - + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - diff --git a/unit1.lfm b/unit1.lfm index e6d4251..8ec305b 100644 --- a/unit1.lfm +++ b/unit1.lfm @@ -3,6 +3,7 @@ object Form1: TForm1 Height = 240 Top = 197 Width = 320 - Caption = 'Form1' + Caption = 'Rätsel' + OnCreate = FormCreate LCLVersion = '1.6.0.4' end diff --git a/unit1.pas b/unit1.pas index 79a1d82..c1584cb 100644 --- a/unit1.pas +++ b/unit1.pas @@ -1,4 +1,4 @@ -unit Unit1; +unit unit1; {$mode objfpc}{$H+} @@ -8,7 +8,11 @@ uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, raetselFileUnit; type + + { TForm1 } + TForm1 = class(TForm) + procedure FormCreate(Sender: TObject); private { private declarations } public @@ -22,5 +26,18 @@ implementation {$R *.lfm} +uses + unit2; + +{ TForm1 } + +procedure TForm1.FormCreate(Sender: TObject); +begin + case form2.showmodal of + mrBuchstabenraetsel: ; + mrHochhausraetsel: ; + end; +end; + end. diff --git a/unit2.lfm b/unit2.lfm new file mode 100644 index 0000000..d067523 --- /dev/null +++ b/unit2.lfm @@ -0,0 +1,28 @@ +object Form2: TForm2 + Left = 1690 + Height = 240 + Top = 197 + Width = 320 + Caption = 'Form2' + ClientHeight = 240 + ClientWidth = 320 + LCLVersion = '1.6.0.4' + object Button1: TButton + Left = 80 + Height = 25 + Top = 16 + Width = 160 + Caption = 'Hochhausrätsel' + OnClick = Button1Click + TabOrder = 0 + end + object Button2: TButton + Left = 80 + Height = 25 + Top = 76 + Width = 160 + Caption = 'Buchstabenrätsel' + OnClick = Button2Click + TabOrder = 1 + end +end diff --git a/unit2.pas b/unit2.pas new file mode 100644 index 0000000..9403550 --- /dev/null +++ b/unit2.pas @@ -0,0 +1,49 @@ +unit Unit2; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls; + +type + + { TForm2 } + + TForm2 = class(TForm) + Button1: TButton; + Button2: TButton; + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + Form2: TForm2; + +const + mrHochhausraetsel = 314; + mrBuchstabenraetsel = 315; + +implementation + +{$R *.lfm} + +{ TForm2 } + +procedure TForm2.Button1Click(Sender: TObject); +begin + modalResult:=mrHochhausraetsel; +end; + +procedure TForm2.Button2Click(Sender: TObject); +begin + modalResult:=mrBuchstabenraetsel; +end; + +end. + -- cgit v1.2.3-70-g09d2