LCL-Android-Example: Makes the sqlite usage selectable

git-svn-id: trunk@39501 -
This commit is contained in:
sekelsenmat 2012-12-10 11:01:22 +00:00
parent 3d9f6e6c37
commit 7cc850d667
3 changed files with 15 additions and 8 deletions

View File

@ -43,9 +43,9 @@ object form1: Tform1
end end
object CheckBox1: TCheckBox object CheckBox1: TCheckBox
Left = 72 Left = 72
Height = 19 Height = 26
Top = 40 Top = 40
Width = 78 Width = 91
Caption = 'CheckBox1' Caption = 'CheckBox1'
TabOrder = 3 TabOrder = 3
end end
@ -71,7 +71,7 @@ object form1: Tform1
Left = 24 Left = 24
Height = 15 Height = 15
Top = 226 Top = 226
Width = 34 Width = 36
Caption = 'Label1' Caption = 'Label1'
Font.Color = clBlue Font.Color = clBlue
ParentColor = False ParentColor = False
@ -92,7 +92,7 @@ object form1: Tform1
Top = 128 Top = 128
Width = 140 Width = 140
AutoSize = False AutoSize = False
ItemHeight = 15 ItemHeight = 0
Items.Strings = ( Items.Strings = (
'Item1' 'Item1'
'Item2' 'Item2'

View File

@ -5,6 +5,7 @@ unit mainform;
{$ifdef Linux}{$ifdef CPUARM} {$ifdef Linux}{$ifdef CPUARM}
{$define Android} {$define Android}
{$endif}{$endif} {$endif}{$endif}
{.$define TEST_SQLITE}
interface interface
@ -219,8 +220,11 @@ end;
procedure Tform1.btnOpenFormClick(Sender: TObject); procedure Tform1.btnOpenFormClick(Sender: TObject);
begin begin
//Form2.Show; {$ifdef TEST_SQLITE}formsqlite.Show;
formsqlite.Show; {$else}
Form2.Show;
{$ENDIF}
DebugLn('Button3Click'); DebugLn('Button3Click');
end; end;

View File

@ -1,10 +1,13 @@
program nonandroidtest; program nonandroidtest;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
{.$define TEST_SQLITE}
uses uses
Interfaces, // this includes the LCL widgetset Interfaces, // this includes the LCL widgetset
Forms, mainform, secondform, sqliteform, customdrawndrawers, Forms, mainform, secondform,
{$ifdef TEST_SQLITE}sqliteform,{$ENDIF}
customdrawndrawers,
customdrawn_android; customdrawn_android;
{$R *.res} {$R *.res}
@ -14,7 +17,7 @@ begin
Application.Initialize; Application.Initialize;
Application.CreateForm(TForm1, Form1); Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm2, Form2); Application.CreateForm(TForm2, Form2);
Application.CreateForm(TformSqlite, formSqlite); {$ifdef TEST_SQLITE}Application.CreateForm(TformSqlite, formSqlite);{$ENDIF}
Application.Run; Application.Run;
end. end.