diff options
author | Erich Eckner <git@eckner.net> | 2020-08-16 22:08:56 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-08-16 22:08:56 +0200 |
commit | 534c68b3fbe69e2a7146c7c0e7dbad76fe111f1b (patch) | |
tree | 27b53ae4a72ba7936a79add9da41685921d467b2 | |
parent | 7d6d481a288697be65a1947679236f666ae155f8 (diff) | |
download | Slitherlink-534c68b3fbe69e2a7146c7c0e7dbad76fe111f1b.tar.xz |
-rw-r--r-- | Slitherlink.lpi | 19 | ||||
-rw-r--r-- | unit1.lfm | 36 | ||||
-rw-r--r-- | unit1.pas | 17 |
3 files changed, 29 insertions, 43 deletions
diff --git a/Slitherlink.lpi b/Slitherlink.lpi index 137ad83..c00d10d 100644 --- a/Slitherlink.lpi +++ b/Slitherlink.lpi @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="9"/>
+ <Version Value="11"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
@@ -14,21 +14,17 @@ <i18n>
<EnableI18N LFM="False"/>
</i18n>
- <VersionInfo>
- <StringTable ProductVersion=""/>
- </VersionInfo>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
- <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
- <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
- <local>
- <FormatVersion Value="1"/>
- </local>
+ <FormatVersion Value="2"/>
+ <Modes Count="1">
+ <Mode0 Name="default"/>
+ </Modes>
</RunParams>
<RequiredPackages Count="1">
<Item1>
@@ -69,7 +65,7 @@ </Linking>
</CompilerOptions>
<Debugging>
- <Exceptions Count="3">
+ <Exceptions Count="4">
<Item1>
<Name Value="EAbort"/>
</Item1>
@@ -79,6 +75,9 @@ <Item3>
<Name Value="EFOpenError"/>
</Item3>
+ <Item4>
+ <Name Value="RunError(232)"/>
+ </Item4>
</Exceptions>
</Debugging>
</CONFIG>
@@ -9,9 +9,8 @@ object Form1: TForm1 OnActivate = FormActivate
OnCreate = FormCreate
OnDestroy = FormDestroy
- OnKeyDown = FormKeyDown
OnResize = FormResize
- LCLVersion = '1.6.2.0'
+ LCLVersion = '2.0.10.0'
object Button1: TButton
Left = 0
Height = 25
@@ -24,7 +23,7 @@ object Form1: TForm1 end
object SpinEdit1: TSpinEdit
Left = 72
- Height = 21
+ Height = 24
Hint = 'Breite'
Top = 2
Width = 56
@@ -37,7 +36,7 @@ object Form1: TForm1 end
object SpinEdit2: TSpinEdit
Left = 136
- Height = 21
+ Height = 24
Hint = 'Höhe'
Top = 2
Width = 56
@@ -50,7 +49,7 @@ object Form1: TForm1 end
object SpinEdit3: TSpinEdit
Left = 200
- Height = 21
+ Height = 24
Hint = 'Höhe'
Top = 2
Width = 56
@@ -62,7 +61,7 @@ object Form1: TForm1 Value = 16
end
object ProgressBar1: TProgressBar
- Left = 584
+ Left = 612
Height = 21
Top = 2
Width = 100
@@ -70,7 +69,7 @@ object Form1: TForm1 TabOrder = 4
end
object Button2: TButton
- Left = 340
+ Left = 368
Height = 25
Top = 0
Width = 48
@@ -80,7 +79,7 @@ object Form1: TForm1 TabOrder = 5
end
object Button3: TButton
- Left = 392
+ Left = 420
Height = 25
Top = 0
Width = 48
@@ -90,7 +89,7 @@ object Form1: TForm1 TabOrder = 6
end
object Button4: TButton
- Left = 444
+ Left = 472
Height = 25
Top = 0
Width = 67
@@ -100,7 +99,7 @@ object Form1: TForm1 TabOrder = 7
end
object Button5: TButton
- Left = 515
+ Left = 543
Height = 25
Top = 0
Width = 64
@@ -113,29 +112,28 @@ object Form1: TForm1 Left = 260
Height = 21
Top = 4
- Width = 100
+ Width = 103
Caption = 'geschlossen'
OnChange = CheckBox1Change
- OnKeyDown = FormKeyDown
PopupMenu = PopupMenu1
TabOrder = 9
end
object Timer1: TTimer
Interval = 100
OnTimer = Timer1Timer
- top = 32
+ Top = 32
end
object OpenDialog1: TOpenDialog
- left = 32
- top = 32
+ Left = 32
+ Top = 32
end
object SaveDialog1: TSaveDialog
- left = 64
- top = 32
+ Left = 64
+ Top = 32
end
object PopupMenu1: TPopupMenu
- left = 96
- top = 32
+ Left = 96
+ Top = 32
object MenuItem1: TMenuItem
Caption = 'füllen'
OnClick = MenuItem1Click
@@ -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;
|