-
Notifications
You must be signed in to change notification settings - Fork 37
/
Frames.ScanResult.pas
90 lines (78 loc) · 2.3 KB
/
Frames.ScanResult.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
unit Frames.ScanResult;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls,
FMX.Objects, FMX.Layouts, FMX.Controls.Presentation,
Data.Bind.EngExt, Fmx.Bind.DBEngExt, System.Rtti, System.Bindings.Outputs,
Fmx.Bind.Editors, Data.Bind.Components, Data.Bind.DBScope
, FrameStand, System.Actions, FMX.ActnList, FMX.StdActns,
FMX.MediaLibrary.Actions, Fmx.Bind.Navigator
;
type
TScanResultFrame = class(TFrame)
ResultLayout: TLayout;
ResultLabel: TLabel;
KindLabel: TLabel;
BindSourceDB1: TBindSourceDB;
BindingsList1: TBindingsList;
InfoBottomLayout: TLayout;
TimeStampLabel: TLabel;
LinkPropertyToFieldText: TLinkPropertyToField;
LinkPropertyToFieldText2: TLinkPropertyToField;
LinkPropertyToFieldText3: TLinkPropertyToField;
ShareButton: TButton;
ActionList1: TActionList;
ShareAction: TShowShareSheetAction;
FrameLayout: TLayout;
InfoTopLayout: TLayout;
Label1: TLabel;
ScanCountLabel: TLabel;
LinkPropertyToFieldText4: TLinkPropertyToField;
BackgroundRectangle: TRectangle;
FrameImage: TImage;
LinkPropertyToFieldBitmap: TLinkPropertyToField;
ActionsLayout: TGridLayout;
DeleteButton: TButton;
DeleteAction: TAction;
procedure FrameClick(Sender: TObject);
procedure ShareActionBeforeExecute(Sender: TObject);
procedure DeleteActionExecute(Sender: TObject);
private
{ Private declarations }
[FrameInfo] FI: TFrameInfo<TScanResultFrame>;
protected
public
{ Public declarations }
procedure AfterConstruction; override;
end;
implementation
{$R *.fmx}
uses
System.Messaging
, Data.Main
;
procedure TScanResultFrame.AfterConstruction;
begin
inherited;
TMessageManager.DefaultManager.SubscribeToMessage(THardwareBackMessage
, procedure(const Sender: TObject; const M: TMessage)
begin
FI.Hide;
end
);
end;
procedure TScanResultFrame.DeleteActionExecute(Sender: TObject);
begin
BindSourceDB1.DataSet.Delete;
FI.Hide;
end;
procedure TScanResultFrame.FrameClick(Sender: TObject);
begin
FI.Hide;
end;
procedure TScanResultFrame.ShareActionBeforeExecute(Sender: TObject);
begin
ShareAction.TextMessage := MainDM.DataTable.FieldByName('Value').AsString;
end;
end.