Changeset 81 for trunk/UCore.pas


Ignore:
Timestamp:
Jun 21, 2012, 12:21:50 PM (12 years ago)
Author:
chronos
Message:
  • Přejmenování jednotky UMainModule na UCore.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r80 r81  
    1 unit UMainModule;
     1unit UCore;
    22
    33{$mode delphi}
     
    1616
    1717type
    18   TMainModule = class;
     18  TCore = class;
    1919
    2020  { TWebSession }
     
    2525    procedure Footer;
    2626  public
    27     MainModule: TMainModule;
     27    MainModule: TCore;
    2828    Database: TSqlDatabase;
    2929    SessionStorage: THTTPSessionStorageMySQL;
     
    4040  end;
    4141
    42   { TMainModule }
    43 
    44   TMainModule = class(TDataModule)
     42  { TCore }
     43
     44  TCore = class(TDataModule)
    4545    WebApp1: TWebApp;
    4646    procedure WebApp1PageProduce(HandlerData: THTTPHandlerData);
     
    7474
    7575var
    76   MainModule: TMainModule;
     76  Core: TCore;
    7777
    7878
     
    162162
    163163
    164 { TMainModule }
    165 
    166 constructor TMainModule.Create(AOwner: TComponent);
     164{ TCore }
     165
     166constructor TCore.Create(AOwner: TComponent);
    167167begin
    168168  inherited;
     
    195195end;
    196196
    197 destructor TMainModule.Destroy;
     197destructor TCore.Destroy;
    198198begin
    199199  //SaveToRegistry;
     
    244244end;
    245245
    246 procedure TMainModule.Show(Content: string);
     246procedure TCore.Show(Content: string);
    247247begin
    248248  //HtmlDocument.Title := ;
     
    308308end;
    309309
    310 procedure TMainModule.WebApp1PageProduce(HandlerData: THTTPHandlerData);
     310procedure TCore.WebApp1PageProduce(HandlerData: THTTPHandlerData);
    311311var
    312312  FileName: string;
     
    349349end;
    350350
    351 procedure TMainModule.LoadFromRegistry;
     351procedure TCore.LoadFromRegistry;
    352352const
    353353  SectionGeneral = 'General';
     
    366366    DatabasePassword := ReadString(SectionDatabase, 'DatabasePassword', 'password');
    367367    FormatHTML := ReadBool(SectionGeneral, 'FormatHTML', False);
    368     //MainModule.WebApp1.LogException := not ReadBool(SectionGeneral, 'ShowException', False);
     368    //Core.WebApp1.LogException := not ReadBool(SectionGeneral, 'ShowException', False);
    369369    NetworkAddress := ReadString(SectionHTTPServer, 'NetworkAddress', 'localhost');
    370370    NetworkPort := ReadInteger(SectionHTTPServer, 'NetworkPort', 80);
     
    375375end;
    376376
    377 procedure TMainModule.SaveToRegistry;
     377procedure TCore.SaveToRegistry;
    378378const
    379379  SectionGeneral = 'General';
     
    392392    WriteString(SectionDatabase, 'DatabasePassword', DatabasePassword);
    393393    WriteBool(SectionGeneral, 'FormatHTML', FormatHTML);
    394     //WriteBool(SectionGeneral, 'ShowException', not MainModule.WebApp1.LogException);
     394    //WriteBool(SectionGeneral, 'ShowException', not Core.WebApp1.LogException);
    395395    WriteString(SectionHTTPServer, 'NetworkAddress', NetworkAddress);
    396396    WriteInteger(SectionHTTPServer, 'NetworkPort', NetworkPort);
     
    401401end;
    402402
    403 procedure TMainModule.Run;
     403procedure TCore.Run;
    404404begin
    405405  WebApp1.HTTPServer.DocumentRoot := ExtractFileDir(ParamStrUTF8(0));
     
    409409
    410410initialization
    411   {$I UMainModule.lrs}
     411  {$I UCore.lrs}
    412412
    413413end.
Note: See TracChangeset for help on using the changeset viewer.