Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /UserSessionUnit.pas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5 - (hide annotations) (download) (as text)
Tue Dec 29 08:41:54 2015 UTC (8 years, 3 months ago) by yamat0jp
File MIME type: text/x-pascal
File size: 1221 byte(s)
だんだんとできてきました
1 yamat0jp 1 unit UserSessionUnit;
2    
3     {
4 yamat0jp 2 This is a DataModule where you can add components or declare fields that are specific to
5 yamat0jp 1 ONE user. Instead of creating global variables, it is better to use this datamodule. You can then
6     access the it using UserSession.
7     }
8     interface
9    
10     uses
11 yamat0jp 2 IWUserSessionBase, SysUtils, Classes, Unit3;
12 yamat0jp 1
13     type
14     TPage = (Main,Info);
15    
16     TIWUserSession = class(TIWUserSessionBase)
17     procedure IWUserSessionBaseDestroy(Sender: TObject);
18 yamat0jp 2 procedure IWUserSessionBaseCreate(Sender: TObject);
19 yamat0jp 1 private
20 yamat0jp 2 FDM: TDataModule3;
21     function GetDM: TDataModule3;
22 yamat0jp 1 { Private declarations }
23     public
24     { Public declarations }
25 yamat0jp 2 FPage: TPage;
26 yamat0jp 1 user_number: integer;
27 yamat0jp 5 Thumbnail: Boolean;
28     Serial: integer;
29 yamat0jp 2 property DM: TDataModule3 read GetDM;
30 yamat0jp 1 end;
31    
32     implementation
33    
34     {$R *.dfm}
35    
36     { TIWUserSession }
37    
38 yamat0jp 2 function TIWUserSession.GetDM: TDataModule3;
39 yamat0jp 1 begin
40     if Assigned(FDM) = false then
41 yamat0jp 2 FDM:=TDataModule3.Create(nil);
42 yamat0jp 1 result:=FDM;
43     end;
44    
45 yamat0jp 2 procedure TIWUserSession.IWUserSessionBaseCreate(Sender: TObject);
46     begin
47     FPage:=Main;
48     end;
49    
50 yamat0jp 1 procedure TIWUserSession.IWUserSessionBaseDestroy(Sender: TObject);
51     begin
52     FreeAndNil(FDM);
53     end;
54    
55     end.
56    
57 yamat0jp 2

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26