-
Notifications
You must be signed in to change notification settings - Fork 1
/
WispPanelUserInfo.pas
114 lines (104 loc) · 2.99 KB
/
WispPanelUserInfo.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
unit WispPanelUserInfo;
interface
uses
SysUtils,
ExtCtrls,
CxLabel,
Controls,
Graphics,
Forms,
WispImageTools,
WispStyleManager,
WispConstantManager;
type
TWispPanelUserInfo = Class(TObject)
Private
LabelTitle: TcxLabel;
LabelUserFullName: TcxLabel;
LabelLoginTime: TcxLabel;
Public
PanelMain: TPanel;
Constructor Create(ParamParent: TWinControl;
ParamWidth, ParamHeigth, ParamLeft, ParamTop: integer);
Procedure SetUserFullName(ParamCaption: string);
Procedure SetLoginTimeInfo(ParamCaption: string);
End;
implementation
Constructor TWispPanelUserInfo.Create(ParamParent: TWinControl;
ParamWidth, ParamHeigth, ParamLeft, ParamTop: integer);
begin
// =====================================
PanelMain := TPanel.Create(ParamParent);
With PanelMain do
begin
Caption := '';
Parent := ParamParent;
ParentBackground := FALSE;
Color := Global_Singleton_Style.BgColor;
Height := ParamHeigth;
Width := ParamWidth;
Left := ParamLeft;
Top := ParamTop;
end;
// =============================
DrawBgImage(PanelMain);
// =====================================
LabelTitle := TcxLabel.Create(PanelMain);
with LabelTitle do
begin
Parent := PanelMain;
Left := 8;
Top := 8;
Caption := Global_Singleton_ConstantManager.GetLanguageConst('CurrentUser');
Height := 32;
Width := 256;
// ParentColor := FALSE;
Style.Font.Color := Global_Singleton_Style.TextColor;
Style.Font.Size := 10;
Style.Font.Name := Global_Singleton_Style.DefaultFont;
Transparent := TRUE;
end;
// =====================================
LabelUserFullName := TcxLabel.Create(PanelMain);
with LabelUserFullName do
begin
Parent := PanelMain;
Left := 8;
Top := 32;
Caption := 'Full name not found !';
Height := 32;
Width := 256;
// ParentColor := FALSE;
Style.Font.Color := Global_Singleton_Style.QuietTextColor;
Style.Font.Size := 16;
Style.Font.Name := Global_Singleton_Style.DefaultFont;
Transparent := TRUE;
end;
// =====================================
LabelLoginTime := TcxLabel.Create(PanelMain);
with LabelLoginTime do
begin
Parent := PanelMain;
Left := 8;
Top := 56;
Caption := '...';
Height := 16;
Width := 256;
// ParentColor := FALSE;
Style.Font.Color := Global_Singleton_Style.TextColor;
Style.Font.Size := 10;
Style.Font.Name := Global_Singleton_Style.DefaultFont;
Transparent := TRUE;
end;
end;
// =============================================================================
Procedure TWispPanelUserInfo.SetUserFullName(ParamCaption: string);
begin
LabelUserFullName.Caption := ParamCaption;
end;
// =============================================================================
Procedure TWispPanelUserInfo.SetLoginTimeInfo(ParamCaption: string);
begin
LabelLoginTime.Caption := ParamCaption;
end;
end.