unit milkfz;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdActns,
FMX.MediaLibrary.Actions, FMX.StdCtrls, FMX.ScrollBox, FMX.Memo,
System.Actions, FMX.ActnList, FMX.TabControl, FMX.Objects, FMX.Layouts,System.IOUtils,
FMX.Controls.Presentation, Data.DbxSqlite, Data.FMTBcd, Data.DB, Data.SqlExpr,
System.Rtti, System.Bindings.Outputs, Fmx.Bind.Editors, Data.Bind.EngExt,
Fmx.Bind.DBEngExt, Data.Bind.Components, Data.Bind.DBScope;
type
TForm1 =
class(TForm)
TabControl1: TTabControl;
home: TTabItem;
eins: TTabItem;
ToolBar1: TToolBar;
GridPanelLayout1: TGridPanelLayout;
Button1: TButton;
Image1: TImage;
ActionList1: TActionList;
ChangeTabAction1: TChangeTabAction;
ToolBar2: TToolBar;
Image2: TImage;
Memo1: TMemo;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
SpeedButton3: TSpeedButton;
TakePhotoFromLibraryAction1: TTakePhotoFromLibraryAction;
ChangeTabAction2: TChangeTabAction;
KfzConnection: TSQLConnection;
ItemTable: TSQLDataSet;
BindSourceDB1: TBindSourceDB;
BindingsList1: TBindingsList;
LinkControlToField1: TLinkControlToField;
procedure TakePhotoFromLibraryAction1DidFinishTaking(Image: TBitmap);
procedure KfzConnectionBeforeConnect(Sender: TObject);
procedure KfzConnectionAfterConnect(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.fmx}
procedure TForm1.KfzConnectionAfterConnect(Sender: TObject);
begin
kfzConnection.ExecuteDirect('
CREATE TABLE IF NOT EXISTS Item (ShopItem TEXT NOT NULL)');
end;
procedure TForm1.KfzConnectionBeforeConnect(Sender: TObject);
begin
KfzConnection.Params.Values['
ColumnMetadataSupported'] := '
False';
KfzConnection.Params.Values['
Database'] :=
TPath.Combine(TPath.GetDocumentsPath, '
kfz.s3db');
end;
procedure TForm1.TakePhotoFromLibraryAction1DidFinishTaking(Image: TBitmap);
begin
Image1.Bitmap.Assign(Image);
Image2.Bitmap.Assign(Image);
end;
end.