Changeset 81 for trunk/UCore.pas
- Timestamp:
- Jun 21, 2012, 12:21:50 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r80 r81 1 unit U MainModule;1 unit UCore; 2 2 3 3 {$mode delphi} … … 16 16 17 17 type 18 T MainModule = class;18 TCore = class; 19 19 20 20 { TWebSession } … … 25 25 procedure Footer; 26 26 public 27 MainModule: T MainModule;27 MainModule: TCore; 28 28 Database: TSqlDatabase; 29 29 SessionStorage: THTTPSessionStorageMySQL; … … 40 40 end; 41 41 42 { T MainModule }43 44 T MainModule = class(TDataModule)42 { TCore } 43 44 TCore = class(TDataModule) 45 45 WebApp1: TWebApp; 46 46 procedure WebApp1PageProduce(HandlerData: THTTPHandlerData); … … 74 74 75 75 var 76 MainModule: TMainModule;76 Core: TCore; 77 77 78 78 … … 162 162 163 163 164 { T MainModule }165 166 constructor T MainModule.Create(AOwner: TComponent);164 { TCore } 165 166 constructor TCore.Create(AOwner: TComponent); 167 167 begin 168 168 inherited; … … 195 195 end; 196 196 197 destructor T MainModule.Destroy;197 destructor TCore.Destroy; 198 198 begin 199 199 //SaveToRegistry; … … 244 244 end; 245 245 246 procedure T MainModule.Show(Content: string);246 procedure TCore.Show(Content: string); 247 247 begin 248 248 //HtmlDocument.Title := ; … … 308 308 end; 309 309 310 procedure T MainModule.WebApp1PageProduce(HandlerData: THTTPHandlerData);310 procedure TCore.WebApp1PageProduce(HandlerData: THTTPHandlerData); 311 311 var 312 312 FileName: string; … … 349 349 end; 350 350 351 procedure T MainModule.LoadFromRegistry;351 procedure TCore.LoadFromRegistry; 352 352 const 353 353 SectionGeneral = 'General'; … … 366 366 DatabasePassword := ReadString(SectionDatabase, 'DatabasePassword', 'password'); 367 367 FormatHTML := ReadBool(SectionGeneral, 'FormatHTML', False); 368 // MainModule.WebApp1.LogException := not ReadBool(SectionGeneral, 'ShowException', False);368 //Core.WebApp1.LogException := not ReadBool(SectionGeneral, 'ShowException', False); 369 369 NetworkAddress := ReadString(SectionHTTPServer, 'NetworkAddress', 'localhost'); 370 370 NetworkPort := ReadInteger(SectionHTTPServer, 'NetworkPort', 80); … … 375 375 end; 376 376 377 procedure T MainModule.SaveToRegistry;377 procedure TCore.SaveToRegistry; 378 378 const 379 379 SectionGeneral = 'General'; … … 392 392 WriteString(SectionDatabase, 'DatabasePassword', DatabasePassword); 393 393 WriteBool(SectionGeneral, 'FormatHTML', FormatHTML); 394 //WriteBool(SectionGeneral, 'ShowException', not MainModule.WebApp1.LogException);394 //WriteBool(SectionGeneral, 'ShowException', not Core.WebApp1.LogException); 395 395 WriteString(SectionHTTPServer, 'NetworkAddress', NetworkAddress); 396 396 WriteInteger(SectionHTTPServer, 'NetworkPort', NetworkPort); … … 401 401 end; 402 402 403 procedure T MainModule.Run;403 procedure TCore.Run; 404 404 begin 405 405 WebApp1.HTTPServer.DocumentRoot := ExtractFileDir(ParamStrUTF8(0)); … … 409 409 410 410 initialization 411 {$I U MainModule.lrs}411 {$I UCore.lrs} 412 412 413 413 end.
Note:
See TracChangeset
for help on using the changeset viewer.