Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /UserSessionUnit.pas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8 - (hide annotations) (download) (as text)
Thu Dec 31 08:51:02 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     TIWUserSession = class(TIWUserSessionBase)
15     procedure IWUserSessionBaseDestroy(Sender: TObject);
16 yamat0jp 2 procedure IWUserSessionBaseCreate(Sender: TObject);
17 yamat0jp 1 private
18 yamat0jp 2 FDM: TDataModule3;
19     function GetDM: TDataModule3;
20 yamat0jp 1 { Private declarations }
21     public
22     { Public declarations }
23 yamat0jp 7 FPage: Boolean;
24 yamat0jp 1 user_number: integer;
25 yamat0jp 8 FThumbnail: Boolean;
26 yamat0jp 5 Serial: integer;
27 yamat0jp 2 property DM: TDataModule3 read GetDM;
28 yamat0jp 1 end;
29    
30     implementation
31    
32     {$R *.dfm}
33    
34     { TIWUserSession }
35    
36 yamat0jp 2 function TIWUserSession.GetDM: TDataModule3;
37 yamat0jp 1 begin
38     if Assigned(FDM) = false then
39 yamat0jp 2 FDM:=TDataModule3.Create(nil);
40 yamat0jp 1 result:=FDM;
41     end;
42    
43 yamat0jp 2 procedure TIWUserSession.IWUserSessionBaseCreate(Sender: TObject);
44     begin
45 yamat0jp 7 FPage := true;
46 yamat0jp 8 FThumbnail:=true;
47 yamat0jp 2 end;
48    
49 yamat0jp 1 procedure TIWUserSession.IWUserSessionBaseDestroy(Sender: TObject);
50     begin
51     FreeAndNil(FDM);
52     end;
53    
54     end.
55    
56 yamat0jp 2

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