Changeset 76 for trunk/ZdechovNET.lpr


Ignore:
Timestamp:
Apr 29, 2012, 9:44:14 PM (13 years ago)
Author:
chronos
Message:
  • Upraveno: Třída WebApp typu TCustomApplication je nyní použita jako komponenta namísto aplikační třídy.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ZdechovNET.lpr

    r71 r76  
    77  cthreads,
    88  {$ENDIF}
    9   UCore, USqlDatabase, SysUtils, Contnrs,
    10   UContactPage, UUser, UHTTPSessionMySQL, UHTTPSessionFile,
     9  UCore, USqlDatabase, SysUtils, Contnrs, Forms,
     10  UUser, UHTTPSessionMySQL, UHTTPSessionFile,
    1111  UCommon, UHTTPServer, UHTTPServerTCP, UHTTPServerCGI, UTCPServer, UPool,
    12   UMemoryStreamEx, UMIMEType, UPageList, Interfaces, UMainModule, UWebApp,
    13   UInternetPage, UHostingPage, UHistoryPage, UDocumentsPage, UVoIPPage,
    14   ULinksPage, UPlansPage, UServerInfoPage, UWebCamPage, UUserControlPage,
    15   UNetworkPage, UAboutPage;
     12  UMemoryStreamEx, UMIMEType, UPageList, Interfaces, UMainModule, UWebApp;
    1613
    1714begin
    18   with Application do
    19   try
     15  with Application do begin
    2016    Initialize;
    21     MainModule := TMainModule.Create(nil);
     17    MainModule := TMainModule.Create(Application);
    2218    MainModule.Run;
    23     RegisterPage(TInternetPage, InternetPage, 'internet');
    24     RegisterPage(THostingPage, HostingPage, 'hosting');
    25     RegisterPage(THistoryPage, HistoryPage, 'historie');
    26     RegisterPage(TDocumentsPage, DocumentsPage, 'dokumenty');
    27     RegisterPage(TVoIPPage, VoIPPage, 'voip');
    28     RegisterPage(TLinksPage, LinksPage, 'odkazy');
    29     RegisterPage(TContactPage, ContactPage, 'kontakt');
    30     RegisterPage(TServerInfoPage, ServerInfoPage, 'serverinfo');
    31     RegisterPage(TWebCamPage, WebCamPage, 'kamery');
    32     //RegisterPage(TUserControlPage, UserControlPage, 'uzivatel');
    33     RegisterPage(TPlansPage, PlansPage, 'plany');
    34     RegisterPage(TNetworkPage, NetworkPage, 'sit');
    35     RegisterPage(TAboutPage, AboutPage, '');
    36     //RegisterPage(TUserControlPage, UserControlPage, '');
    37     ServerType := stCGI;
    38     if ServerType = stTCP then begin
    39       THTTPServerTCP(HTTPServer).Socket.Address := MainModule.NetworkAddress;
    40       THTTPServerTCP(HTTPServer).Socket.Port := MainModule.NetworkPort;
    41       THTTPServerTCP(HTTPServer).MaxConnection := MainModule.MaxConnections;
    42     end;
    4319    Run;
    44   finally
    45     MainModule.Free;
    4620  end;
    4721end.
Note: See TracChangeset for help on using the changeset viewer.