-
Notifications
You must be signed in to change notification settings - Fork 10
/
DW.CORE.UserSession.pas
129 lines (101 loc) · 3.47 KB
/
DW.CORE.UserSession.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
unit DW.CORE.UserSession;
interface
uses
Classes, DW.VCL.DataModule, DW.CORE.DWApplication;
type
TDWUserSessionClass = class of TDWUserSession;
TDWUserSession = class(TDWDataModule)
private
// FMainForm: TDWForm;
// FOnCreate: TNotifyEvent;
// FForms:TList;
// FCallbacks: TDWCallBacks;
// FActiveForm: TDWForm;
// procedure SetMainForm(const Value: TDWForm);
// procedure SetOnCreate(const Value: TNotifyEvent);
// procedure SetActiveForm(const Value: TDWForm);
protected
// FUserCode: String;
// FLogonTime: TDateTime;
// FLastRequest: TDateTime; // Last request time stamp
FRequestCount: Integer; // Count the requests
// FIP: String; // Client IP Adress (beware of proxies)
FLoginChallenge: String; // Used for secure login
// FConfigPort: String; // Used for configuration process
// FConfigTempDir: String; // Used for configuration process
// FConfigHasLogo: Boolean; // Used for configuration process
// FTempVar: Integer; // Currently used for anti-spam
public
// constructor Create(AOwner: TComponent); override;
// constructor Create(AOwner: TComponent); override;
// constructor Create(aDWAplication: TDWApplication); overload;
// destructor Destroy; override;
// property CallBacks:TDWCallBacks read FCallbacks;
property RequestCount: Integer read FRequestCount write FRequestCount;
// property LastRequest: TDateTime read FLastRequest write FLastRequest;
// property IP: String read FIP write FIP;
property LoginChallenge: String read FLoginChallenge write FLoginChallenge;
// property ActiveForm:TDWForm read FActiveForm write SetActiveForm;
published
// property UserCode: String read FUserCode write FUserCode;
// property LogonTime: TDateTime read FLogonTime write FLogonTime;
// property ConfigPort: String read FConfigPort write FConfigPort;
// property ConfigTempDir: String read FConfigTempDir write FConfigTempDir;
// property ConfigHasLogo: Boolean read FConfigHasLogo write FConfigHasLogo;
// property TempVar: Integer read FTempVar write FTempVar;
// property MainForm:TDWForm read FMainForm write SetMainForm;
// property OnCreate:TNotifyEvent read FOnCreate write SetOnCreate;
end;
implementation
uses System.RTLConsts;
//
// {$R *.dfm}
{ TAppSrvSessionData }
{ constructor TDWUserSession.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
// if not OldCreateOrder then
// DoCreate;
// FForms:= TList.Create;
// FTempVar := -1;
// if Assigned(FOnCreate) then
// FOnCreate(Self);
end; }
(* destructor TDWUserSession.Destroy;
//var
// I: Integer;
begin
{ TODO 1 -oDELCIO -cVERIFY : Chech Memory leak }
{ for I := 0 to FForms.Count -1 do
begin
if Assigned(FForms[I]) then
TDWForm(FForms[I]).Free;
end;
FForms.Free;
FMainForm.Free; }
inherited;
end; *)
(* procedure TDWUserSession.SetActiveForm(const Value: TDWForm);
begin
FActiveForm := Value;
end;
procedure TDWUserSession.SetMainForm(const Value: TDWForm);
begin
FMainForm := Value;
end;
procedure TDWUserSession.SetOnCreate(const Value: TNotifyEvent);
begin
FOnCreate:= Value;
end; *)
{ TDWUserSession }
(* constructor TDWUserSession.Create(aDWAplication: TDWApplication);
begin
inherited Create(aDWAplication);
end; *)
{ constructor TDWUserSession.Create(AOwner: TComponent);
begin
inherited CreateNew(AOwner, -1);
end; }
initialization
// RegisterClass(TDWUserSession);
end.