-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathChatFMX.Frame.Message.Base.pas
67 lines (54 loc) · 1.48 KB
/
ChatFMX.Frame.Message.Base.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
unit ChatFMX.Frame.Message.Base;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls,
VK.API;
type
TFrameMessageBase = class(TFrame)
private
FVK: TCustomVK;
FVisibility: Boolean;
FMessageId: Int64;
FDate: TDateTime;
protected
procedure SetVK(const Value: TCustomVK); virtual;
procedure SetDate(const Value: TDateTime); virtual;
procedure SetVisibility(const Value: Boolean); virtual;
public
constructor Create(AOwner: TComponent; AVK: TCustomVK); reintroduce; virtual;
property VK: TCustomVK read FVK write SetVK;
property Visibility: Boolean read FVisibility write SetVisibility;
property MessageId: Int64 read FMessageId write FMessageId;
property Date: TDateTime read FDate write SetDate;
procedure Flash; virtual;
end;
implementation
{$R *.fmx}
{ TFrameMessageBase }
constructor TFrameMessageBase.Create(AOwner: TComponent; AVK: TCustomVK);
begin
inherited Create(AOwner);
Name := '';
FVK := AVK;
FVisibility := False;
end;
procedure TFrameMessageBase.Flash;
begin
//
end;
procedure TFrameMessageBase.SetDate(const Value: TDateTime);
begin
FDate := Value;
end;
procedure TFrameMessageBase.SetVisibility(const Value: Boolean);
begin
if FVisibility = Value then
Exit;
FVisibility := Value;
end;
procedure TFrameMessageBase.SetVK(const Value: TCustomVK);
begin
FVK := Value;
end;
end.