Changeset 137


Ignore:
Timestamp:
Sep 9, 2022, 1:16:58 AM (2 years ago)
Author:
chronos
Message:
  • Added: Robots page.
  • Modified: Canonical URL for webcams.
  • Modified: Removed compiler mode delphi as it is already set in project.
  • Modified: Updated Common package.
  • Modified: Use Generics.Collections instead of fgl.
Location:
trunk
Files:
8 added
3 deleted
109 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/UWebObjects.pas

    r132 r137  
    11unit UWebObjects;
    22
    3 {$mode delphi}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, UHtmlClasses, UXmlClasses, SpecializedDictionary, fgl;
     6  Classes, SysUtils, UHtmlClasses, UXmlClasses, SpecializedDictionary,
     7  Generics.Collections;
    98
    109type
     
    3433  { TQueryFormItemList }
    3534
    36   TQueryFormItemList = class(TFPGObjectList<TQueryFormItem>)
     35  TQueryFormItemList = class(TObjectList<TQueryFormItem>)
    3736    function FindByName(AValue: string): TQueryFormItem;
    3837  end;
     
    4948  end;
    5049
    51   TQueryFormGroups = class(TFPGObjectList<TQueryFormGroup>)
     50  TQueryFormGroups = class(TObjectList<TQueryFormGroup>)
    5251  end;
    5352
     
    5756  end;
    5857
    59   TQueryActions = class(TFPGObjectList<TQueryAction>)
     58  TQueryActions = class(TObjectList<TQueryAction>)
    6059  end;
    6160
  • trunk/Application/UWebSession.pas

    r130 r137  
    11unit UWebSession;
    2 
    3 {$mode delphi}
    42
    53interface
     
    7068begin
    7169  with TModuleBase(ModuleManager.FindModuleByName('Base')) do
    72   if Assigned(GeneratePage) then GeneratePage(Self, Page)
     70  if Assigned(OnGeneratePage) then OnGeneratePage(Self, Page)
    7371    else GeneratePageDefault(Self, Page);
    7472end;
  • trunk/Common/UUtils.pas

    r81 r137  
    11unit UUtils;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
     
    1715function HumanDate(Date: TDateTime): string;
    1816function PagesList(URL: string; Page, TotalCount, CountPerPage: Integer): string;
     17
    1918
    2019implementation
     
    137136end;
    138137
    139 
    140 initialization
    141 
    142 finalization
    143 
    144138end.
  • trunk/Modules/Base/UModuleBase.pas

    r107 r137  
    11unit UModuleBase;
    2 
    3 {$mode delphi}
    42
    53interface
     
    1715  private
    1816    PageAdmin: TWebPage;
    19     FGeneratePage: TGeneratePageEvent;
     17    FOnGeneratePage: TGeneratePageEvent;
    2018  public
    2119    Session: TWebSession;
     
    2927    procedure Uninstall; override;
    3028    procedure Upgrade; override;
    31     property GeneratePage: TGeneratePageEvent read FGeneratePage write FGeneratePage;
     29    property OnGeneratePage: TGeneratePageEvent read FOnGeneratePage write FOnGeneratePage;
    3230  end;
    3331
     
    5351destructor TModuleBase.Destroy;
    5452begin
    55   inherited Destroy;
     53  inherited;
    5654end;
    5755
  • trunk/Modules/Finance/UModuleFinance.pas

    r132 r137  
    11unit UModuleFinance;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Modules/Finance/UPageFinance.pas

    r101 r137  
    11unit UPageFinance;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2321  WebPageFinance: TWebPageFinance;
    2422
     23
    2524implementation
    2625
     
    3130procedure TWebPageFinance.DataModuleProduce(HandlerData: THTTPHandlerData);
    3231begin
    33 
    3432end;
    3533
  • trunk/Modules/IS/UModuleIS.pas

    r105 r137  
    11unit UModuleIS;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Modules/Network/UModuleNetwork.pas

    r132 r137  
    11unit UModuleNetwork;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Modules/Network/UPageNetwork.pas

    r101 r137  
    11unit UPageNetwork;
    2 
    3 {$mode delphi}
    42
    53interface
     
    1917  WebPageNetwork: TWebPageNetwork;
    2018
     19
    2120implementation
    2221
  • trunk/Modules/News/UModuleNews.pas

    r107 r137  
    11unit UModuleNews;
    2 
    3 {$mode delphi}
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, UModularSystem, SpecializedDictionary, UModuleBase, UNews,
    9   UHTTPServer, UModuleUser;
     6  Classes, SysUtils, UModularSystem, UModuleBase, UNews, UHTTPServer, UModuleUser;
    107
    118type
     
    8279var
    8380  DbRows: TDbRows;
    84   Data: TDictionaryStringString;
    8581begin
    8682  try
    8783    DbRows := TDbRows.Create;
    88     Data := TDictionaryStringString.Create;
    8984
    9085    Core.CommonDatabase.Query(DbRows,
     
    125120    '  ADD CONSTRAINT `News_ibfk_1` FOREIGN KEY (`Category`) REFERENCES `NewsCategory` (`Id`);');
    126121  finally
    127     Data.Free;
    128122    DbRows.Free;
    129123  end;
    130   inherited Install;
     124  inherited;
    131125end;
    132126
     
    135129  DbRows: TDbRows;
    136130begin
    137   inherited Uninstall;
     131  inherited;
    138132  try
    139133    DbRows := TDbRows.Create;
  • trunk/Modules/News/UNews.pas

    r132 r137  
    11unit UNews;
    22
    3 {mode delphi}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, USqlDatabase, UModuleUser, UUtils, fgl, UWebSession,
    9   UHTTPServer, UModuleBase, SpecializedList;
     6  Classes, SysUtils, USqlDatabase, UModuleUser, UUtils, Generics.Collections, UWebSession,
     7  UHTTPServer, UModuleBase, UCommon;
    108
    119type
     
    1917  end;
    2018
    21   TNewsSettingItems = class(TFPGObjectList<TNewsSettingItem>)
     19  TNewsSettingItems = class(TObjectList<TNewsSettingItem>)
    2220  end;
    2321
     
    4442
    4543
    46 
    4744implementation
    4845
     
    9188  J: Integer;
    9289  Author: string;
    93   Enclosures: TListString;
     90  Enclosures: TStringArray;
    9491begin
    9592  //global Database, NewsCategoryNames, NewsCountPerCategory, UploadedFilesFolder;
     
    128125      if DbRows[I].Values['Enclosure'] <> '' then begin
    129126        Output := Output + '<br />Přílohy: ';
    130         try
    131           Enclosures := TListString.Create;
    132           Enclosures.Explode(DbRows[I].Values['Enclosure'], ';', StrToStr);
    133           for J := 0 to Enclosures.Count - 1  do begin
    134             if FileExists(UploadedFilesFolder + Enclosures[J]) then
    135               Output := Output + ' <a href="' + UploadedFilesFolder + Enclosures[J] +
    136               '">' + Enclosures[J] + '</a>';
    137           end;
    138         finally
    139           Enclosures.Free;
     127        Enclosures := Explode(';', DbRows[I].Values['Enclosure']);
     128        for J := 0 to Length(Enclosures) - 1  do begin
     129          if FileExists(UploadedFilesFolder + Enclosures[J]) then
     130            Output := Output + ' <a href="' + UploadedFilesFolder + Enclosures[J] +
     131            '">' + Enclosures[J] + '</a>';
    140132        end;
    141133      end;
  • trunk/Modules/Portal/UModulePortal.pas

    r132 r137  
    11unit UModulePortal;
    2 
    3 {$mode delphi}
    42
    53interface
     
    6361  BeforeStart;
    6462  ModuleBase := TModuleBase(Manager.FindModuleByName('Base'));
    65   ModuleBase.GeneratePage := GeneratePage;
     63  ModuleBase.OnGeneratePage := GeneratePage;
    6664  WebPagePortal := TWebPagePortal.Create(nil);
    6765  ModuleBase.Pages.RegisterPage(WebPagePortal, '');
  • trunk/Modules/Portal/UPagePortal.pas

    r132 r137  
    11unit UPagePortal;
    2 
    3 {$mode delphi}
    42
    53interface
     
    3230var
    3331  WebPagePortal: TWebPagePortal;
     32
    3433
    3534implementation
  • trunk/Modules/System/UModuleSystem.pas

    r105 r137  
    11unit UModuleSystem;
    2 
    3 {$mode delphi}
    42
    53interface
     
    6361destructor TModuleSystem.Destroy;
    6462begin
    65   inherited Destroy;
     63  inherited;
    6664end;
    6765
     
    7472  try
    7573    DbRows := TDbRows.Create;
    76     Core.CommonDatabase.Select(DbRows, 'SystemModule', 'Name, Installed');
     74    Core.CommonDatabase.Select(DbRows, 'SystemModule', '`Name`, `Installed`');
    7775    for I := 0 to DbRows.Count - 1 do
    7876    with DbRows[I] do begin
     
    102100  try
    103101    DbRows := TDbRows.Create;
    104   Core.CommonDatabase.Query(DbRows,
    105     'CREATE TABLE IF NOT EXISTS `SystemModule` (' +
    106     '  `Id` int(11) NOT NULL AUTO_INCREMENT,' +
    107     '  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
    108     '  `Title` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
    109     '  `Creator` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
    110     '  `Version` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
    111     '  `License` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
    112     '  `Installed` int(11) NOT NULL,' +
    113     '  `Description` text COLLATE utf8_czech_ci NOT NULL,' +
    114     '  `Dependencies` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
    115     '  PRIMARY KEY (`Id`)' +
    116     ') ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;');
     102    Core.CommonDatabase.Query(DbRows,
     103      'CREATE TABLE IF NOT EXISTS `SystemModule` (' +
     104      '  `Id` int(11) NOT NULL AUTO_INCREMENT,' +
     105      '  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
     106      '  `Title` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
     107      '  `Creator` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
     108      '  `Version` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
     109      '  `License` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
     110      '  `Installed` int(11) NOT NULL,' +
     111      '  `Description` text COLLATE utf8_czech_ci NOT NULL,' +
     112      '  `Dependencies` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
     113      '  PRIMARY KEY (`Id`)' +
     114      ') ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;');
    117115  finally
    118116    DbRows.Free;
    119117  end;
    120118  UpdateModuleList;
    121   inherited Install;
     119  inherited;
    122120end;
    123121
     
    126124  DbRows: TDbRows;
    127125begin
    128   inherited Uninstall;
     126  inherited;
    129127  try
    130128    DbRows := TDbRows.Create;
     
    137135procedure TModuleSystem.Upgrade;
    138136begin
    139   inherited Upgrade;
     137  inherited;
    140138end;
    141139
  • trunk/Modules/TV/UModuleTV.pas

    r132 r137  
    11unit UModuleTV;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Modules/TV/UPageTV.pas

    r105 r137  
    11unit UPageTV;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2422var
    2523  WebPageTV: TWebPageTV;
     24
    2625
    2726implementation
  • trunk/Modules/TV/UPlaylist.pas

    r99 r137  
    11unit UPlaylist;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Modules/User/UModuleUser.pas

    r132 r137  
    11unit UModuleUser;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Modules/User/UUser.pas

    r108 r137  
    11unit UUser;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
     
    4947  end;
    5048
     49
    5150implementation
    5251
  • trunk/Modules/User/UUserControlPage.pas

    r105 r137  
    11unit UUserControlPage;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2725var
    2826  UserControlPage: TUserControlPage;
     27
    2928
    3029implementation
  • trunk/Modules/ZdechovNET/UAboutPage.pas

    r135 r137  
    103103end;
    104104
    105 initialization
    106 
    107105end.
    108106
  • trunk/Modules/ZdechovNET/UIPTVPage.pas

    r135 r137  
    44
    55uses
    6   Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UModuleUser, fgl;
     6  Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UModuleUser,
     7  Generics.Collections;
    78
    89type
     
    1819  { TChannels }
    1920
    20   TChannels = class(TFPGObjectList<TChannel>)
     21  TChannels = class(TObjectList<TChannel>)
    2122    function AddNew(Name: string; Groups: TChannelGroups): TChannel;
    2223    function GetNamesByGroup(Group: TChannelGroup): string;
  • trunk/Modules/ZdechovNET/UModuleZdechovNET.pas

    r135 r137  
    44
    55uses
    6   Classes, SysUtils, UModularSystem, UWebPage,
     6  Classes, SysUtils, UModularSystem, UWebPage, URobotsPage,
    77  UWebSession, DateUtils, UModuleBase, UModuleUser, UIPTVPage,
    88  UInternetPage, UHostingPage, UHistoryPage, UDocumentsPage, UVoIPPage,
     
    3030    AboutPage: TAboutPage;
    3131    IPTVPage: TIPTVPage;
     32    RobotsPage: TRobotsPage;
    3233    procedure Footer(Session: TWebSession);
    3334    procedure GeneratePage(ASession: TWebSession; Page: TWebPage);
     
    3637    ModuleBase: TModuleBase;
    3738    ModuleUser: TModuleUser;
     39    Raw: Boolean;
    3840    constructor Create(Owner: TComponent); override;
    3941    destructor Destroy; override;
     
    7476  BeforeStart;
    7577  ModuleBase := TModuleBase(Manager.FindModuleByName('Base'));
    76   ModuleBase.GeneratePage := GeneratePage;
     78  ModuleBase.OnGeneratePage := GeneratePage;
    7779  ModuleUser := TModuleUser(Manager.FindModuleByName('User'));
    7880  with ModuleBase, Pages do begin
    79     //GeneratePage := GeneratePage;
     81    //OnGeneratePage := OnGeneratePage;
    8082    InternetPage := TInternetPage.Create(nil);
    8183    InternetPage.ModuleUser := ModuleUser;
     
    120122    IPTVPage.ModuleUser := ModuleUser;
    121123    RegisterPage(IPTVPage, 'televize');
     124    RobotsPage := TRobotsPage.Create(nil);
     125    RobotsPage.ModuleUser := ModuleUser;
     126    RegisterPage(RobotsPage, 'robots.txt');
    122127  end;
    123128  AfterStart;
     
    156161    UnregisterPage(ProjectsPage);
    157162    FreeAndNil(ProjectsPage);
     163    UnregisterPage(RobotsPage);
     164    FreeAndNil(RobotsPage);
    158165  end;
    159166  ModuleBase := nil;
     
    242249begin
    243250  inherited;
    244   ModuleBase.GeneratePage := nil;
     251  ModuleBase.OnGeneratePage := nil;
    245252  try
    246253    DbRows := TDbRows.Create;
     
    348355begin
    349356  with ASession do begin
    350     HtmlDocument.ContentLanguage := 'cs';
    351     GlobalTitle := 'ZděchovNET';
    352     HtmlDocument.Styles.Add(NavigationLink('/Style/' + TCore(MainModule).Style + '/Style.css'));
    353     HtmlDocument.Scripts.Add(NavigationLink('/Style/' + TCore(MainModule).Style + '/Global.js'));
    354     HtmlDocument.Scripts.Add(NavigationLink('/Style/' + TCore(MainModule).Style + '/jquery.js'));
     357    if Page.Raw then begin
     358      Response.Content.WriteString(THtmlString(HtmlDocument.Body.SubItems[0]).Text);
     359    end else begin
     360      HtmlDocument.ContentLanguage := 'cs';
     361      GlobalTitle := 'ZděchovNET';
     362      HtmlDocument.Styles.Add(NavigationLink('/Style/' + TCore(MainModule).Style + '/Style.css'));
     363      HtmlDocument.Scripts.Add(NavigationLink('/Style/' + TCore(MainModule).Style + '/Global.js'));
     364      HtmlDocument.Scripts.Add(NavigationLink('/Style/' + TCore(MainModule).Style + '/jquery.js'));
    355365
    356366      TitleTag := THtmlString.Create;
     
    370380      end;
    371381    end;
     382  end;
    372383end;
    373384
  • trunk/Modules/ZdechovNET/UWebCamPage.pas

    r135 r137  
    1414    procedure DataModuleProduce(HandlerData: THTTPHandlerData);
    1515  private
     16    ImageWidth: Integer;
     17    ImageHeight: Integer;
     18    function GetAll(HandlerData: THTTPHandlerData): string;
     19    function GetSingle(HandlerData: THTTPHandlerData; Id: Integer): string;
    1620    function GetVideoArchive(Id: string): string;
    1721  public
     
    3539procedure TWebCamPage.DataModuleProduce(HandlerData: THTTPHandlerData);
    3640var
    37   RefreshInterval: Integer;
    38   WebCamImage: string;
    3941  DbRows: TDbRows;
    4042  I: Integer;
    4143  CameraId: Integer;
    42   IdParam: string;
    43   LastFileDate: string;
    44   ImageWidth, ImageHeight: Integer;
    45   ImageWidthThumb, ImageHeightThumb: Integer;
     44  SubPageName: string;
     45  Value: Integer;
     46  NotFound: Boolean;
    4647begin
    4748  with TWebSession(HandlerData) do begin
     
    4950    with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin
    5051      Text := '';
     52      CameraId := -1;
     53      NotFound := False;
     54      if Request.Path.Count >= 2 then begin
     55        SubPageName := Request.Path[1];
     56        if TryStrToInt(SubPageName, Value) then
     57          CameraId := Value else
     58          NotFound := True;
     59      end;
     60      if not NotFound then begin
    5161    //for I := 0 to HandlerData.Request.Query.Count - 1 do
    5262      //Text := Text + HandlerData.Request.Query[I] + ' ';
     
    5464      //HandlerData.Request.Query.Values['W'] := 'dsd';
    5565      //HandlerData.Request.Query.Values['H'] := 'dsd';
    56       if HandlerData.Request.Query.SearchKey('Id') = -1 then CameraId := -1
    57         else CameraId := StrToInt(HandlerData.Request.Query.Values['Id']);
    5866      if (HandlerData.Request.Query.SearchKey('W') = -1) then begin
    5967        ImageWidth := 640;
     
    6270      end;
    6371
    64       if CameraId >= 0 then IdParam := '&amp;Id=' + IntToStr(CameraId)
    65         else IdParam := '';
    6672      Text := Text + '<table style="width: 100%"><tr><td style="width: 20%" valign="top">' +
    6773        '<strong>Velikost</strong><br/>' +
    68         '<a href="?W=160' + IdParam + '">Malá</a><br/> ' +
    69         '<a href="?W=320' + IdParam + '">Menší</a><br/> ' +
    70         '<a href="?W=640' + IdParam + '">Střední</a><br/> ' +
    71         '<a href="?W=1024' + IdParam + '">Větší</a><br/> ' +
    72         '<a href="?W=1280' + IdParam + '">Velká</a><br/><br/>';
     74        '<a href="?W=160">Malá</a><br/> ' +
     75        '<a href="?W=320">Menší</a><br/> ' +
     76        '<a href="?W=640">Střední</a><br/> ' +
     77        '<a href="?W=1024">Větší</a><br/> ' +
     78        '<a href="?W=1280">Velká</a><br/><br/>';
    7379
    7480      Text := Text + '<strong>Místní kamery</strong><br/>';
    75       Text := Text + '<a href="?W=' + IntToStr(ImageWidth) + '">Všechny</a><br/>';
     81      Text := Text + MakeLink('Všechny', NavigationLink('/kamery/?W=' + IntToStr(ImageWidth))) + '<br/>';
    7682      try
    7783        DbRows := TDbRows.Create;
    7884        Database.Query(DbRows, 'SELECT * FROM `Webcam` WHERE `Enabled`=1');
    7985        for I := 0 to DbRows.Count - 1 do begin
    80           Text := Text + '<a href="?Id=' + DbRows[I].Values['Id'] + '&amp;W=' + IntToStr(ImageWidth) +
    81           '">' + DbRows[I].Values['Name'] + '</a><br/>';
     86          Text := Text + MakeLink(DbRows[I].Values['Name'], NavigationLink(
     87            '/kamery/' + DbRows[I].Values['Id'] + '/?W=' + IntToStr(ImageWidth))) + '<br/>';
    8288        end;
    8389      finally
     
    9298
    9399      if CameraId = -1 then begin
    94         try
    95           DbRows := TDbRows.Create;
    96           Database.Query(DbRows, 'SELECT * FROM `Webcam` WHERE `Enabled`=1');
    97           ImageWidthThumb := 160;
    98           for I := 0 to DbRows.Count - 1 do begin
    99             ImageHeightThumb := Round(ImageWidthThumb * StrToInt(DbRows[I].Values['Height']) / StrToInt(DbRows[I].Values['Width']));
    100             WebCamImage := 'images/webcam/' + DbRows[I].Values['ImageName'];
    101             Text := Text + '<span align="center" valign="middle" style="vertical-align: middle;">' + //DbRows[I].Values['Name'] + '<br/>' +
    102               '<a href="?Id=' + DbRows[I].Values['Id'] + '&W=' + IntToStr(ImageWidth) + '">' +
    103               '<img name="theImage" src="' + NavigationLink('/' + WebCamImage) + '" width="' +
    104             IntToStr(ImageWidthThumb) + '" height="' + IntToStr(ImageHeightThumb) + '" alt="' +
    105             DbRows[I].Values['Name'] + '"/></a></span> ';
    106           end;
    107         finally
    108           DbRows.Free;
    109         end;
    110       end else
    111       try
    112         DbRows := TDbRows.Create;
    113         Database.Query(DbRows, 'SELECT * FROM `Webcam` WHERE (`Id`=' +
    114           IntToStr(CameraId) + ') AND (`Enabled`=1)');
    115         if DbRows.Count > 0 then begin
    116 
    117           WebCamImage := 'images/webcam/' + DbRows[0].Values['ImageName'];
    118           RefreshInterval := StrToInt(DbRows[0].Values['ImagePeriod']);
    119           CameraId := StrToInt(DbRows[0].Values['Id']);
    120           ImageHeight := Round(ImageWidth * StrToInt(DbRows[0].Values['Height']) / StrToInt(DbRows[0].Values['Width']));
    121 
    122           if FileExists(WebCamImage) then begin
    123             DateTimeToString(LastFileDate, 'hh:mm:ss d.m.yyyy', FileDateToDateTime(FileAge(WebCamImage)));
    124             Text := Text + '<script language="JavaScript">' + #13#10 +
    125             '  var ImageURL= "' + NavigationLink('/' + WebCamImage) + '";' + #13#10 +
    126             '' + #13#10 +
    127             '// Force an immediate image load' + #13#10 +
    128             'var theTimer = setTimeout("reloadImage()", 1);' + #13#10 +
    129             '' + #13#10 +
    130              'function reloadImage()' + #13#10 +
    131             '{' + #13#10 +
    132             '  theDate = new Date();' + #13#10 +
    133             '  var url = ImageURL;' + #13#10 +
    134             '  url += "?dummy=";' + #13#10 +
    135             '  url += theDate.getTime().toString(10);' + #13#10 +
    136             '  // The above dummy cgi-parameter enforce a bypass of the browser image cache.' + #13#10 +
    137             '  // Here we actually load the image' + #13#10 +
    138             '  document.theImage.src = document.theImageTemp.src;' + #13#10 +
    139             '  document.theImageTemp.src = url;' + #13#10 +
    140             '' + #13#10 +
    141             '  // Reload the image every defined period' + #13#10 +
    142             '  theTimer = setTimeout("reloadImage()", ' + IntToStr(RefreshInterval * 1000) + ');' + #13#10 +
    143             '}' + #13#10 +
    144             '</script>' + #13#10 +
    145 
    146             '<br /><div align="center">' + DbRows[0].Values['Name'] + '<br/>' +
    147             '<img name="theImageTemp" src="' + NavigationLink('/' + WebCamImage) + '" width="0" height="0" alt="Temp image"/>' +
    148             '<img name="theImage" src="' + NavigationLink('/' + WebCamImage) + '" width="' + IntToStr(ImageWidth) +
    149             '" height="' + IntToStr(ImageHeight) + '" alt="' +
    150             DbRows[0].Values['Name'] + '"/></div>';
    151           end else Text := Text + '<br />Obrázek nenalezen.<br /><br />';
    152           Text := Text + '<br/><div align="center">';
    153           if LastFileDate <> '' then Text := Text + 'Aktualizace: <span id="lasttime">' +
    154             LastFileDate + '</span>, ';
    155           Text := Text + 'Perioda: ' + IntToStr(RefreshInterval) + ' sekund, Typ: ' + DbRows[0].Values['DeviceType'] + '<br />' +
    156             '<br/>' + DbRows[0].Values['Description'];
    157           Text := Text + GetVideoArchive(DbRows[0].Values['Id']) + '</div>';
    158         end else Text := Text + '<br />Id kamery nenalezeno.<br/><br>';
    159       finally
    160         DbRows.Free;
    161       end;
     100        Text := Text + GetAll(HandlerData);
     101      end else begin
     102        Text := Text + GetSingle(HandlerData, CameraId);
     103      end;
     104
    162105      Text := Text + '</td></tr></table>';
     106      end else Text := 'Stránka nenalezena.';
    163107    end;
    164108    GeneratePage(Self);
     109  end;
     110end;
     111
     112function TWebCamPage.GetAll(HandlerData: THTTPHandlerData): string;
     113var
     114  DbRows: TDbRows;
     115  I: Integer;
     116  ImageWidthThumb: Integer;
     117  ImageHeightThumb: Integer;
     118  WebCamImage: string;
     119begin
     120  Result := '';
     121  with TWebSession(HandlerData) do
     122  try
     123    DbRows := TDbRows.Create;
     124    Database.Query(DbRows, 'SELECT * FROM `Webcam` WHERE `Enabled`=1');
     125    ImageWidthThumb := 160;
     126    for I := 0 to DbRows.Count - 1 do begin
     127      ImageHeightThumb := Round(ImageWidthThumb * StrToInt(DbRows[I].Values['Height']) / StrToInt(DbRows[I].Values['Width']));
     128      WebCamImage := 'images/webcam/' + DbRows[I].Values['ImageName'];
     129      Result := Result + '<span align="center" valign="middle" style="vertical-align: middle;">' + //DbRows[I].Values['Name'] + '<br/>' +
     130        '<a href="' + NavigationLink('/kamery/' + DbRows[I].Values['Id'] + '/?W=' + IntToStr(ImageWidth)) + '">' +
     131        '<img name="theImage" src="' + NavigationLink('/' + WebCamImage) + '" width="' +
     132        IntToStr(ImageWidthThumb) + '" height="' + IntToStr(ImageHeightThumb) + '" alt="' +
     133        DbRows[I].Values['Name'] + '"/></a></span> ';
     134    end;
     135  finally
     136    DbRows.Free;
     137  end;
     138end;
     139
     140function TWebCamPage.GetSingle(HandlerData: THTTPHandlerData; Id: Integer): string;
     141var
     142  DbRows: TDbRows;
     143  I: Integer;
     144  WebCamImage: string;
     145  RefreshInterval: Integer;
     146  LastFileDate: string;
     147begin
     148  Result := '';
     149  with TWebSession(HandlerData) do
     150  try
     151    DbRows := TDbRows.Create;
     152    Database.Query(DbRows, 'SELECT * FROM `Webcam` WHERE (`Id`=' +
     153      IntToStr(Id) + ') AND (`Enabled`=1)');
     154    if DbRows.Count > 0 then begin
     155      WebCamImage := 'images/webcam/' + DbRows[0].Values['ImageName'];
     156      RefreshInterval := StrToInt(DbRows[0].Values['ImagePeriod']);
     157      ImageHeight := Round(ImageWidth * StrToInt(DbRows[0].Values['Height']) / StrToInt(DbRows[0].Values['Width']));
     158
     159      if FileExists(WebCamImage) then begin
     160        DateTimeToString(LastFileDate, 'hh:mm:ss d.m.yyyy', FileDateToDateTime(FileAge(WebCamImage)));
     161        Result := Result + '<script language="JavaScript">' + #13#10 +
     162          '  var ImageURL= "' + NavigationLink('/' + WebCamImage) + '";' + #13#10 +
     163          '' + #13#10 +
     164          '// Force an immediate image load' + #13#10 +
     165          'var theTimer = setTimeout("reloadImage()", 1);' + #13#10 +
     166          '' + #13#10 +
     167          'function reloadImage()' + #13#10 +
     168          '{' + #13#10 +
     169          '  theDate = new Date();' + #13#10 +
     170          '  var url = ImageURL;' + #13#10 +
     171          '  url += "?dummy=";' + #13#10 +
     172          '  url += theDate.getTime().toString(10);' + #13#10 +
     173          '  // The above dummy cgi-parameter enforce a bypass of the browser image cache.' + #13#10 +
     174          '  // Here we actually load the image' + #13#10 +
     175          '  document.theImage.src = document.theImageTemp.src;' + #13#10 +
     176          '  document.theImageTemp.src = url;' + #13#10 +
     177          '' + #13#10 +
     178          '  // Reload the image every defined period' + #13#10 +
     179          '  theTimer = setTimeout("reloadImage()", ' + IntToStr(RefreshInterval * 1000) + ');' + #13#10 +
     180          '}' + #13#10 +
     181          '</script>' + #13#10 +
     182
     183          '<br /><div align="center">' + DbRows[0].Values['Name'] + '<br/>' +
     184          '<img name="theImageTemp" src="' + NavigationLink('/' + WebCamImage) + '" width="0" height="0" alt="Temp image"/>' +
     185          '<img name="theImage" src="' + NavigationLink('/' + WebCamImage) + '" width="' + IntToStr(ImageWidth) +
     186          '" height="' + IntToStr(ImageHeight) + '" alt="' +
     187          DbRows[0].Values['Name'] + '"/></div>';
     188      end else Result := Result + '<br />Obrázek nenalezen.<br /><br />';
     189      Result := Result + '<br/><div align="center">';
     190      if LastFileDate <> '' then Result := Result + 'Aktualizace: <span id="lasttime">' +
     191        LastFileDate + '</span>, ';
     192      Result := Result + 'Perioda: ' + IntToStr(RefreshInterval) + ' sekund, Typ: ' + DbRows[0].Values['DeviceType'] + '<br />' +
     193        '<br/>' + DbRows[0].Values['Description'];
     194      Result := Result + GetVideoArchive(DbRows[0].Values['Id']) + '</div>';
     195    end else Result := Result + '<br />Id kamery nenalezeno.<br/><br>';
     196  finally
     197    DbRows.Free;
    165198  end;
    166199end;
     
    180213  VideoPathFormat := 'images/webcam_archive/%s/%s/video.mp4';
    181214  Items := TStringList.Create;
    182   Date := Now - OneDay;
    183   repeat
    184     DateStr := FormatDateTime('yyyy-mm-dd', Date);
    185     Video := Format(VideoPathFormat, [DateStr, Id]);
    186     if FileExists(Video) then begin
    187       Items.Add(DateStr + Items.NameValueSeparator + Video);
    188       Date := Date - OneDay;
    189       Continue;
    190     end else Break;
    191   until False;
    192 
    193   if Items.Count > 0 then begin
    194     Result := '<br/>Video archív: <select name="dates" id="dates">';
    195     for I := 0 to Items.Count - 1 do begin
    196       Result := Result + '<option value="' + NavigationLink('/' + Items.ValueFromIndex[I]) + '">' + Items.Names[I] + '</option>';
     215  try
     216    Date := Now - OneDay;
     217    repeat
     218      DateStr := FormatDateTime('yyyy-mm-dd', Date);
     219      Video := Format(VideoPathFormat, [DateStr, Id]);
     220      if FileExists(Video) then begin
     221        Items.Add(DateStr + Items.NameValueSeparator + Video);
     222        Date := Date - OneDay;
     223        Continue;
     224      end else Break;
     225    until False;
     226
     227    if Items.Count > 0 then begin
     228      Result := '<br/>Video archív: <select name="dates" id="dates">';
     229      for I := 0 to Items.Count - 1 do begin
     230        Result := Result + '<option value="' + NavigationLink('/' + Items.ValueFromIndex[I]) + '">' + Items.Names[I] + '</option>';
     231      end;
     232      Result := Result + '</select>';
     233      Result := Result + ' <button onclick="var element = document.getElementById(''dates''); window.open(element.value, ''_blank'')">Zobrazit</button>';
    197234    end;
    198     Result := Result + '</select>';
    199     Result := Result + ' <button onclick="var element = document.getElementById(''dates''); window.open(element.value, ''_blank'')">Zobrazit</button>';
    200   end;
    201 
    202   Items.Free;
     235  finally
     236    Items.Free;
     237  end;
    203238end;
    204239
  • trunk/Packages/Common/Common.lpk

    r131 r137  
    3333      <Other>
    3434        <CompilerMessages>
    35           <IgnoredMessages idx6058="True" idx5024="True" idx3124="True" idx3123="True"/>
     35          <IgnoredMessages idx6058="True" idx5071="True" idx5024="True" idx3124="True" idx3123="True"/>
    3636        </CompilerMessages>
    3737      </Other>
     
    4141Source: https://svn.zdechov.net/PascalClassLibrary/Common/"/>
    4242    <License Value="Copy left."/>
    43     <Version Minor="9"/>
    44     <Files Count="29">
     43    <Version Minor="10"/>
     44    <Files Count="31">
    4545      <Item1>
    4646        <Filename Value="StopWatch.pas"/>
     
    171171        <UnitName Value="UPixelPointer"/>
    172172      </Item29>
     173      <Item30>
     174        <Filename Value="UDataFile.pas"/>
     175        <UnitName Value="UDataFile"/>
     176      </Item30>
     177      <Item31>
     178        <Filename Value="UTestCase.pas"/>
     179        <UnitName Value="UTestCase"/>
     180      </Item31>
    173181    </Files>
    174182    <CompatibilityMode Value="True"/>
  • trunk/Packages/Common/Common.pas

    r131 r137  
    1414  UPersistentForm, UFindFile, UScaleDPI, UTheme, UStringTable, UMetaCanvas,
    1515  UGeometric, UTranslator, ULanguages, UFormAbout, UAboutDialog,
    16   UPixelPointer, LazarusPackageIntf;
     16  UPixelPointer, UDataFile, UTestCase, LazarusPackageIntf;
    1717
    1818implementation
  • trunk/Packages/Common/StopWatch.pas

    r89 r137  
    55
    66uses
    7   {$IFDEF Windows}Windows,{$ENDIF}
     7  {$IFDEF WINDOWS}Windows,{$ENDIF}
    88  SysUtils, DateUtils;
    99
     
    3232  end;
    3333
     34
    3435implementation
    3536
     
    4041  fIsRunning := False;
    4142
    42   {$IFDEF Windows}
     43  {$IFDEF WINDOWS}
    4344  fIsHighResolution := QueryPerformanceFrequency(fFrequency) ;
    4445  {$ELSE}
  • trunk/Packages/Common/UAboutDialog.pas

    r131 r137  
    11unit UAboutDialog;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/Common/UApplicationInfo.pas

    r131 r137  
    11unit UApplicationInfo;
    2 
    3 {$mode delphi}
    42
    53interface
     
    5957procedure Register;
    6058
     59
    6160implementation
    6261
  • trunk/Packages/Common/UCommon.pas

    r131 r137  
    11unit UCommon;
    2 
    3 {$mode delphi}
    42
    53interface
     
    3432  DLLHandle1: HModule;
    3533
     34  {$IFDEF WINDOWS}
     35    GetUserNameEx: procedure (NameFormat: DWORD;
     36      lpNameBuffer: LPSTR; nSize: PULONG); stdcall;
     37  {$ENDIF}
     38
    3639const
    3740  clLightBlue = TColor($FF8080);
    3841  clLightGreen = TColor($80FF80);
    3942  clLightRed = TColor($8080FF);
    40 
    41 {$IFDEF WINDOWS}
    42   GetUserNameEx: procedure (NameFormat: DWORD;
    43     lpNameBuffer: LPSTR; nSize: PULONG); stdcall;
    44 {$ENDIF}
    4543
    4644function AddLeadingZeroes(const aNumber, Length : integer) : string;
  • trunk/Packages/Common/UDebugLog.pas

    r131 r137  
    11unit UDebugLog;
    2 
    3 {$mode delphi}
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, FileUtil, fgl, SyncObjs;
     6  Classes, SysUtils, FileUtil, Generics.Collections, SyncObjs;
    97
    108type
     
    1513    Group: string;
    1614    Text: string;
     15  end;
     16
     17  TDebugLogItems = class(TObjectList<TDebugLogItem>)
    1718  end;
    1819
     
    2930    procedure SetMaxCount(const AValue: Integer);
    3031  public
    31     Items: TFPGObjectList<TDebugLogItem>;
     32    Items: TDebugLogItems;
    3233    Lock: TCriticalSection;
    3334    procedure Add(Text: string; Group: string = '');
     
    4445
    4546procedure Register;
     47
    4648
    4749implementation
     
    117119begin
    118120  inherited;
    119   Items := TFPGObjectList<TDebugLogItem>.Create;
     121  Items := TDebugLogItems.Create;
    120122  Lock := TCriticalSection.Create;
    121123  MaxCount := 100;
     
    126128destructor TDebugLog.Destroy;
    127129begin
    128   Items.Free;
    129   Lock.Free;
     130  FreeAndNil(Items);
     131  FreeAndNil(Lock);
    130132  inherited;
    131133end;
  • trunk/Packages/Common/UDelay.pas

    r84 r137  
    11unit UDelay;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/Common/UFindFile.pas

    r131 r137  
    3535  private
    3636    s : TStringList;
    37 
    3837    fSubFolder : boolean;
    3938    fAttr: TFileAttrib;
    4039    fPath : string;
    4140    fFileMask : string;
    42 
    4341    procedure SetPath(Value: string);
    4442    procedure FileSearch(const inPath : string);
     
    4644    constructor Create(AOwner: TComponent); override;
    4745    destructor Destroy; override;
    48 
    4946    function SearchForFiles: TStringList;
    5047  published
     
    6461
    6562procedure Register;
     63
    6664
    6765implementation
     
    8785begin
    8886  s.Free;
    89   inherited Destroy;
     87  inherited;
    9088end;
    9189
  • trunk/Packages/Common/UFormAbout.pas

    r131 r137  
    11unit UFormAbout;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/Common/UGeometric.pas

    r131 r137  
    11unit UGeometric;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2624function RectEnlarge(Rect: TRect; Value: Integer): TRect;
    2725function ShiftRect(ARect: TRect; Delta: TPoint): TRect;
     26
    2827
    2928implementation
  • trunk/Packages/Common/UJobProgressView.pas

    r131 r137  
    11unit UJobProgressView;
    2 
    3 {$MODE Delphi}
    42
    53interface
     
    75uses
    86  SysUtils, Variants, Classes, Graphics, Controls, Forms, Syncobjs,
    9   Dialogs, ComCtrls, StdCtrls, ExtCtrls, fgl, UThreading, Math,
     7  Dialogs, ComCtrls, StdCtrls, ExtCtrls, Generics.Collections, UThreading, Math,
    108  DateUtils;
    119
     
    7169  end;
    7270
    73   TJobs = class(TFPGObjectList<TJob>)
     71  TJobs = class(TObjectList<TJob>)
    7472  end;
    7573
     
    163161resourcestring
    164162  SExecuted = 'Executed';
     163
    165164
    166165implementation
     
    642641begin
    643642  FLock.Free;
    644   inherited Destroy;
     643  inherited;
    645644end;
    646645
  • trunk/Packages/Common/ULanguages.pas

    r131 r137  
    11unit ULanguages;
    22
    3 {$mode delphi}{$H+}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, fgl;
     6  Classes, SysUtils, Generics.Collections;
    97
    108type
     
    1715  { TLanguages }
    1816
    19   TLanguages = class(TFPGObjectList<TLanguage>)
     17  TLanguages = class(TObjectList<TLanguage>)
    2018    function SearchByCode(ACode: string): TLanguage;
    2119    procedure AddNew(Code: string; Name: string);
  • trunk/Packages/Common/ULastOpenedList.pas

    r131 r137  
    11unit ULastOpenedList;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/Common/UListViewSort.pas

    r131 r137  
    22
    33// Date: 2019-05-17
    4 
    5 {$mode delphi}
    64
    75interface
     
    97uses
    108  {$IFDEF Windows}Windows, CommCtrl, LMessages, {$ENDIF}Classes, Graphics, ComCtrls, SysUtils,
    11   Controls, DateUtils, Dialogs, fgl, Forms, Grids, StdCtrls, ExtCtrls,
    12   LclIntf, LclType, LResources;
     9  Controls, DateUtils, Dialogs, Forms, Grids, StdCtrls, ExtCtrls,
     10  LclIntf, LclType, LResources, Generics.Collections, Generics.Defaults;
    1311
    1412type
     
    1917  TCompareEvent = function (Item1, Item2: TObject): Integer of object;
    2018  TListFilterEvent = procedure (ListViewSort: TListViewSort) of object;
     19
     20  TObjects = TObjectList<TObject>;
    2121
    2222  { TListViewSort }
     
    5252    {$ENDIF}
    5353  public
    54     List: TFPGObjectList<TObject>;
    55     Source: TFPGObjectList<TObject>;
     54    Source: TObjects;
     55    List: TObjects;
    5656    constructor Create(AOwner: TComponent); override;
    5757    destructor Destroy; override;
     
    149149destructor TListViewEx.Destroy;
    150150begin
    151   inherited Destroy;
     151  inherited;
    152152end;
    153153
     
    338338  ListViewSortCompare: TCompareEvent;
    339339
    340 function ListViewCompare(const Item1, Item2: TObject): Integer;
     340function ListViewCompare(constref Item1, Item2: TObject): Integer;
    341341begin
    342342  Result := ListViewSortCompare(Item1, Item2);
     
    349349  ListViewSortCompare := Compare;
    350350  if (List.Count > 0) then
    351     List.Sort(ListViewCompare);
     351    List.Sort(TComparer<TObject>.Construct(ListViewCompare));
    352352end;
    353353
     
    355355begin
    356356  if Assigned(FOnFilter) then FOnFilter(Self)
    357   else if Assigned(Source) then
    358     List.Assign(Source) else
     357  else if Assigned(Source) then begin
    359358    List.Clear;
     359    List.AddRange(Source);
     360  end else List.Clear;
    360361  if ListView.Items.Count <> List.Count then
    361362    ListView.Items.Count := List.Count;
     
    412413begin
    413414  inherited;
    414   List := TFPGObjectList<TObject>.Create;
    415   List.FreeObjects := False;
     415  List := TObjects.Create;
     416  List.OwnsObjects := False;
    416417end;
    417418
    418419destructor TListViewSort.Destroy;
    419420begin
    420   List.Free;
     421  FreeAndNil(List);
    421422  inherited;
    422423end;
  • trunk/Packages/Common/UMemory.pas

    r131 r137  
    11unit UMemory;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
     
    4442  end;
    4543
     44
    4645implementation
    4746
     
    5049procedure TPositionMemory.SetSize(AValue: Integer);
    5150begin
    52   inherited SetSize(AValue);
     51  inherited;
    5352  if FPosition > FSize then FPosition := FSize;
    5453end;
     
    107106begin
    108107  Size := 0;
    109   inherited Destroy;
     108  inherited;
    110109end;
    111110
  • trunk/Packages/Common/UMetaCanvas.pas

    r131 r137  
    11unit UMetaCanvas;
    22
    3 {$mode delphi}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, Graphics, Types, fgl;
     6  Classes, SysUtils, Graphics, Types, Generics.Collections;
    97
    108type
     
    1917  end;
    2018
    21   TCanvasObjects = class(TFPGObjectList<TCanvasObject>)
     19  TCanvasObjects = class(TObjectList<TCanvasObject>)
    2220  end;
    2321
  • trunk/Packages/Common/UPersistentForm.pas

    r131 r137  
    11unit UPersistentForm;
    2 
    3 {$mode delphi}
    42
    53// Date: 2020-11-26
  • trunk/Packages/Common/UPixelPointer.pas

    r131 r137  
    5959  function Color32ToColor(Color: TColor32): TColor;
    6060  function ColorToColor32(Color: TColor): TColor32;
     61
    6162
    6263implementation
  • trunk/Packages/Common/UPool.pas

    r131 r137  
    11unit UPool;
    22
    3 {$mode Delphi}{$H+}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, syncobjs, fgl, UThreading;
     6  Classes, SysUtils, syncobjs, Generics.Collections, UThreading;
    97
    108type
     
    2220    function NewItemObject: TObject; virtual;
    2321  public
    24     Items: TFPGObjectList<TObject>;
    25     FreeItems: TFPGObjectList<TObject>;
     22    Items: TObjectList<TObject>;
     23    FreeItems: TObjectList<TObject>;
    2624    function Acquire: TObject; virtual;
    2725    procedure Release(Item: TObject); virtual;
     
    108106constructor TThreadedPool.Create;
    109107begin
    110   inherited Create;
     108  inherited;
    111109  Lock := TCriticalSection.Create;
    112110end;
     
    116114  TotalCount := 0;
    117115  Lock.Free;
    118   inherited Destroy;
     116  inherited;
    119117end;
    120118
     
    185183begin
    186184  inherited;
    187   Items := TFPGObjectList<TObject>.Create;
    188   FreeItems := TFPGObjectList<TObject>.Create;
    189   FreeItems.FreeObjects := False;
     185  Items := TObjectList<TObject>.Create;
     186  FreeItems := TObjectList<TObject>.Create;
     187  FreeItems.OwnsObjects := False;
    190188  FReleaseEvent := TEvent.Create(nil, False, False, '');
    191189end;
  • trunk/Packages/Common/UPrefixMultiplier.pas

    r131 r137  
    22
    33// Date: 2010-06-01
    4 
    5 {$mode delphi}
    64
    75interface
  • trunk/Packages/Common/URegistry.pas

    r131 r137  
    11unit URegistry;
    2 
    3 {$MODE delphi}
    42
    53interface
     
    4846    HKEY_CURRENT_CONFIG, HKEY_DYN_DATA);
    4947
     48
    5049implementation
    51 
    5250
    5351{ TRegistryContext }
  • trunk/Packages/Common/UResetableThread.pas

    r122 r137  
    11unit UResetableThread;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
     
    167165  FreeAndNil(FStopEvent);
    168166  FreeAndNil(FLock);
    169   inherited Destroy;
     167  inherited;
    170168end;
    171169
     
    286284constructor TThreadPool.Create;
    287285begin
    288   inherited Create;
     286  inherited;
    289287end;
    290288
     
    293291  TotalCount := 0;
    294292  WaitForEmpty;
    295   inherited Destroy;
     293  inherited;
    296294end;
    297295
  • trunk/Packages/Common/UScaleDPI.pas

    r131 r137  
    33{ See: http://wiki.lazarus.freepascal.org/High_DPI }
    44
    5 {$mode delphi}{$H+}
    6 
    75interface
    86
    97uses
    10   Classes, Forms, Graphics, Controls, ComCtrls, LCLType, SysUtils, fgl;
     8  Classes, Forms, Graphics, Controls, ComCtrls, LCLType, SysUtils,
     9  Generics.Collections;
    1110
    1211type
     
    2827  end;
    2928
    30   TControlDimensions = class(TFPGObjectList<TControlDimension>)
     29  TControlDimensions = class(TObjectList<TControlDimension>)
    3130  end;
    3231
  • trunk/Packages/Common/UStringTable.pas

    r122 r137  
    11unit UStringTable;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
  • trunk/Packages/Common/USyncCounter.pas

    r122 r137  
    11unit USyncCounter;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2523    procedure Assign(Source: TSyncCounter);
    2624  end;
     25
    2726
    2827implementation
     
    6968begin
    7069  Lock.Free;
    71   inherited Destroy;
     70  inherited;
    7271end;
    7372
  • trunk/Packages/Common/UTheme.pas

    r131 r137  
    55uses
    66  Classes, SysUtils, Graphics, ComCtrls, Controls, ExtCtrls, Menus, StdCtrls,
    7   Spin, Forms, fgl, Grids;
     7  Spin, Forms, Generics.Collections, Grids;
    88
    99type
     
    1919  { TThemes }
    2020
    21   TThemes = class(TFPGObjectList<TTheme>)
     21  TThemes = class(TObjectList<TTheme>)
    2222    function AddNew(Name: string): TTheme;
    2323    function FindByName(Name: string): TTheme;
     
    4848
    4949procedure Register;
     50
    5051
    5152implementation
  • trunk/Packages/Common/UThreading.pas

    r131 r137  
    11unit UThreading;
    22
    3 {$mode delphi}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, Forms, fgl, SyncObjs;
     6  Classes, SysUtils, Forms, Generics.Collections, SyncObjs;
    97
    108type
    119  TExceptionEvent = procedure (Sender: TObject; E: Exception) of object;
    1210  TMethodCall = procedure of object;
    13 
    1411
    1512  { TVirtualThread }
     
    10299  { TThreadList }
    103100
    104   TThreadList = class(TFPGObjectList<TVirtualThread>)
     101  TThreadList = class(TObjectList<TVirtualThread>)
    105102    function FindById(Id: TThreadID): TVirtualThread;
    106103    constructor Create; virtual;
     
    295292  end;
    296293  FThread.Free;
    297   inherited Destroy;
     294  inherited;
    298295end;
    299296
     
    361358ThreadListLock := TCriticalSection.Create;
    362359ThreadList := TThreadList.Create;
    363 ThreadList.FreeObjects := False;
     360ThreadList.OwnsObjects := False;
    364361
    365362finalization
  • trunk/Packages/Common/UTranslator.pas

    r131 r137  
    11unit UTranslator;
    22
    3 {$mode delphi}{$H+}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, Forms, ExtCtrls, Controls, fgl, LazFileUtils, LazUTF8,
     6  Classes, SysUtils, Forms, ExtCtrls, Controls, LazFileUtils, LazUTF8,
    97  Translations, TypInfo, Dialogs, FileUtil, LCLProc, ULanguages, LCLType,
    10   LCLVersion;
     8  LCLVersion, Generics.Collections;
    119
    1210type
    1311  THandleStringEvent = function (AValue: string): string of object;
    1412
    15   TPoFiles = class(TFPGObjectList<TPOFile>)
     13  TPoFiles = class(TObjectList<TPOFile>)
    1614  end;
    1715
     
    2725  { TComponentExcludesList }
    2826
    29   TComponentExcludesList = class(TFPGObjectList<TComponentExcludes>)
     27  TComponentExcludesList = class(TObjectList<TComponentExcludes>)
    3028    function FindByClassType(AClassType: TClass): TComponentExcludes;
    3129    procedure DumpToStrings(Strings: TStrings);
     
    290288  Item := Component.ClassType;
    291289  while Assigned(Item) do begin
    292     //ShowMessage(Component.Name + ', ' + Component.ClassName + ', ' + Item.ClassName + ', ' + PropertyName);
    293290    Excludes := ComponentExcludes.FindByClassType(Item.ClassType);
    294291    if Assigned(Excludes) then begin
  • trunk/Packages/Common/UURI.pas

    r122 r137  
    22
    33// Date: 2011-04-04
    4 
    5 {$mode delphi}
    64
    75interface
     
    8583  end;
    8684
     85
    8786implementation
    8887
     
    183182begin
    184183  Items.Free;
    185   inherited Destroy;
     184  inherited;
    186185end;
    187186
     
    232231begin
    233232  Path.Free;
    234   inherited Destroy;
     233  inherited;
    235234end;
    236235
     
    243242    Fragment := TURI(Source).Fragment;
    244243    Query := TURI(Source).Query;
    245   end else inherited Assign(Source);
     244  end else inherited;
    246245end;
    247246
     
    291290destructor TURL.Destroy;
    292291begin
    293   inherited Destroy;
     292  inherited;
    294293end;
    295294
     
    344343begin
    345344  Directory.Free;
    346   inherited Destroy;
    347 end;
    348 
     345  inherited;
     346end;
    349347
    350348end.
  • trunk/Packages/Common/UXMLUtils.pas

    r131 r137  
    11unit UXMLUtils;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/CoolWeb/Common/UHtmlClasses.pas

    r84 r137  
    11unit UHtmlClasses;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
     
    242240  end;
    243241
     242
    244243implementation
    245244
    246245resourcestring
    247246  SStringToIPConversionError = 'String to IP address conversion error';
    248 
    249247
    250248function LeftCutString(var Source, Output: string; Delimiter: string; Allowed: string = ''): Boolean;
     
    322320begin
    323321  Value.Free;
    324   inherited Destroy;
     322  inherited;
    325323end;
    326324
     
    345343begin
    346344  Cells.Free;
    347   inherited Destroy;
     345  inherited;
    348346end;
    349347
     
    370368begin
    371369  Rows.Free;
    372   inherited Destroy;
     370  inherited;
    373371end;
    374372
     
    421419constructor THtmlInput.Create;
    422420begin
    423 
    424421end;
    425422
    426423destructor THtmlInput.Destroy;
    427424begin
    428   inherited Destroy;
     425  inherited;
    429426end;
    430427
     
    452449begin
    453450  Action.Free;
    454   inherited Destroy;
     451  inherited;
    455452end;
    456453
     
    754751begin
    755752  Levels.Free;
    756   inherited Destroy;
     753  inherited;
    757754end;
    758755
     
    893890begin
    894891  Data.Free;
    895   inherited Destroy;
     892  inherited;
    896893end;
    897894
  • trunk/Packages/CoolWeb/Common/UMIMEType.pas

    r84 r137  
    11unit UMIMEType;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
     
    1210var
    1311  MIMETypeList: TStringList;
     12
    1413
    1514implementation
  • trunk/Packages/CoolWeb/Common/UMemoryStreamEx.pas

    r84 r137  
    11unit UMemoryStreamEx;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
     
    5957  end;
    6058
     59
    6160implementation
    6261
     
    261260end;
    262261
    263 procedure TMemoryStreamEx.WriteString(Data:string);
     262procedure TMemoryStreamEx.WriteString(Data: string);
    264263begin
    265264  if Length(Data) > 0 then
     
    314313constructor TThreadMemoryStreamEx.Create;
    315314begin
    316   inherited Create;
     315  inherited;
    317316  Lock := TCriticalSection.Create;
    318317end;
     
    321320begin
    322321  Lock.Free;
    323   inherited Destroy;
     322  inherited;
    324323end;
    325324
  • trunk/Packages/CoolWeb/Common/UXmlClasses.pas

    r84 r137  
    11unit UXmlClasses;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
    64
    7 uses Classes, SysUtils, StrUtils, SpecializedList,
    8   SpecializedDictionary;
     5uses
     6  Classes, SysUtils, StrUtils, SpecializedList, SpecializedDictionary;
    97
    108type
     
    5048    property AsString: string read GetAsString;
    5149  end;
     50
    5251
    5352implementation
  • trunk/Packages/CoolWeb/LazIDEReg.pas

    r132 r137  
    11unit LazIDEReg;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
     
    97
    108type
    11    { TFileDescWebPage }
     9  { TFileDescWebPage }
    1210
    1311  TFileDescWebPage = class(TFileDescPascalUnitWithResource)
     
    2725    function CreateStartFiles(AProject: TLazProject): TModalResult; override;
    2826  end;
    29 
    3027
    3128resourcestring
     
    158155end;
    159156
    160 
    161157end.
    162158
  • trunk/Packages/CoolWeb/Modules/UPageList.pas

    r84 r137  
    11unit UPageList;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/CoolWeb/Modules/UWebUser.pas

    r132 r137  
    11unit UWebUser;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
     
    4846  end;
    4947
     48
    5049implementation
    5150
  • trunk/Packages/CoolWeb/Network/UTCPServer.pas

    r114 r137  
    11unit UTCPServer;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
     
    6866      write FOnClientConnect;
    6967  end;
     68
    7069
    7170implementation
  • trunk/Packages/CoolWeb/Persistence/USqlDatabase.pas

    r103 r137  
    11unit USqlDatabase;
    22
    3 {$mode Delphi}{$H+}
    4 
    5 // Modified: 2010-12-24
     3// Modified: 2022-09-08
    64
    75interface
    86
    97uses
    10   SysUtils, Classes, Dialogs, mysql50, TypInfo,
    11   SpecializedDictionary, SpecializedList;
     8  SysUtils, Classes, Dialogs, mysql50, TypInfo, SpecializedDictionary,
     9  SpecializedList;
    1210
    1311type
     
    6159    procedure CreateColumn(Table, ColumnName: string; ColumnType: TTypeKind);
    6260    procedure Query(DbRows: TDbRows; Data: string);
    63     procedure Select(DbRows: TDbRows; ATable: string; Filter: string = '*'; Condition: string = '1');
    64     procedure Delete(ATable: string; Condition: string = '1';
     61    procedure Select(DbRows: TDbRows; ATable: string; Filter: string = '*';
     62      Condition: string = '');
     63    procedure Delete(ATable: string; Condition: string = '';
    6564      Schema: string = '');
    6665    procedure Insert(ATable: string; Data: TDictionaryStringString;
    6766      Schema: string = '');
    6867    procedure Update(ATable: string; Data: TDictionaryStringString;
    69       Condition: string = '1'; Schema: string = '');
     68      Condition: string = ''; Schema: string = '');
    7069    procedure Replace(ATable: string; Data: TDictionaryStringString;
    7170      Schema: string = '');
     
    10099
    101100uses
    102   DateUtils, Math;
     101  DateUtils;
    103102
    104103resourcestring
     
    184183  Rows: TDbRows;
    185184begin
    186 //  mySQLClient1.Connect;
    187185  FSession := mysql_init(FSession);
    188 //  FSession.charset := 'latin2';
    189186  NewSession := mysql_real_connect(FSession, PChar(HostName), PChar(UserName),
    190187    PChar(Password), PChar(Database), FPort, nil, CLIENT_LONG_PASSWORD + CLIENT_CONNECT_WITH_DB);
     
    250247
    251248  DbResult := mysql_store_result(FSession);
    252   if Assigned(DbResult) then begin
    253     DbRows.Count := mysql_num_rows(DbResult);
    254     for I := 0 to DbRows.Count - 1 do begin
    255       DbRow := mysql_fetch_row(DbResult);
    256       DbRows[I] := TDictionaryStringString.Create;
    257       with DbRows[I] do begin
    258         for II := 0 to mysql_num_fields(DbResult) - 1 do begin
    259           Add(mysql_fetch_field_direct(DbResult, II)^.Name,
    260             PChar((DbRow + II)^));
     249  try
     250    if Assigned(DbResult) then begin
     251      DbRows.Count := mysql_num_rows(DbResult);
     252      for I := 0 to DbRows.Count - 1 do begin
     253        DbRow := mysql_fetch_row(DbResult);
     254        DbRows[I] := TDictionaryStringString.Create;
     255        with DbRows[I] do begin
     256          for II := 0 to mysql_num_fields(DbResult) - 1 do begin
     257            Add(mysql_fetch_field_direct(DbResult, II)^.Name,
     258              PChar((DbRow + II)^));
    261259          end;
    262260        end;
    263261      end;
    264   end;
    265   mysql_free_result(DbResult);
     262    end;
     263  finally
     264    mysql_free_result(DbResult);
     265  end;
    266266end;
    267267
     
    296296end;
    297297
    298 procedure TSqlDatabase.Select(DbRows: TDbRows; ATable: string; Filter: string = '*'; Condition: string = '1');
     298procedure TSqlDatabase.Select(DbRows: TDbRows; ATable: string; Filter: string = '*'; Condition: string = '');
     299var
     300  QueryText: string;
    299301begin
    300302  LastUsedTable := ATable;
    301   Query(DbRows, 'SELECT ' + Filter + ' FROM `' + ATable + '` WHERE ' + Condition);
     303  QueryText := 'SELECT ' + Filter + ' FROM `' + ATable + '`';
     304  if Condition <> '' then QueryText := QueryText + ' WHERE ' + Condition;
     305  Query(DbRows, QueryText);
    302306end;
    303307
    304308procedure TSqlDatabase.Update(ATable: string; Data: TDictionaryStringString;
    305   Condition: string = '1'; Schema: string = '');
    306 var
     309  Condition: string = ''; Schema: string = '');
     310var
     311  QueryText: string;
    307312  DbValues: string;
    308313  Value: string;
     
    322327    DbResult := TDbRows.Create;
    323328    if Schema <> '' then Schema := '`' + Schema + '`.';
    324     Query(DbResult, 'UPDATE ' + Schema + '`' + ATable + '` SET ' + DbValues + ' WHERE ' + Condition);
     329    QueryText := 'UPDATE ' + Schema + '`' + ATable + '` SET ' + DbValues;
     330    if Condition <> '' then QueryText := QueryText + ' WHERE ' + Condition;
     331    Query(DbResult, QueryText);
    325332  finally
    326333    DbResult.Free;
     
    333340end;
    334341
    335 procedure TSqlDatabase.Delete(ATable: string; Condition: string = '1';
     342procedure TSqlDatabase.Delete(ATable: string; Condition: string = '';
    336343  Schema: string = '');
    337344var
     345  QueryText: string;
    338346  DbResult: TDbRows;
    339347begin
     
    342350    DbResult := TDbRows.Create;
    343351    if Schema <> '' then Schema := '`' + Schema + '`.';
    344     Query(DbResult, 'DELETE FROM ' + Schema + '`' + ATable + '` WHERE ' + Condition);
     352    QueryText := 'DELETE FROM ' + Schema + '`' + ATable + '`';
     353    if Condition <> '' then QueryText := QueryText + ' WHERE ' + Condition;
     354    Query(DbResult, QueryText);
    345355  finally
    346356    DbResult.Free;
     
    497507end.
    498508
    499 
  • trunk/Packages/CoolWeb/WebServer/UHTTPServer.pas

    r130 r137  
    11unit UHTTPServer;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
     
    419417procedure THTTPSessionStorage.Load(HandlerData: THTTPHandlerData);
    420418begin
    421 
    422419end;
    423420
    424421procedure THTTPSessionStorage.Save(HandlerData: THTTPHandlerData);
    425422begin
    426 
    427423end;
    428424
  • trunk/Packages/CoolWeb/WebServer/UHTTPServerCGI.pas

    r100 r137  
    11unit UHTTPServerCGI;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
     
    2119  end;
    2220
     21procedure Register;
    2322
    24 procedure Register;
    2523
    2624implementation
     
    3331  RegisterComponents('CoolWeb', [THTTPServerCGI]);
    3432end;
    35 
    3633
    3734{ THTTPServerCGI }
     
    4643begin
    4744  EnvVars.Free;
    48   inherited Destroy;
     45  inherited;
    4946end;
    5047
  • trunk/Packages/CoolWeb/WebServer/UHTTPServerTCP.pas

    r130 r137  
    11unit UHTTPServerTCP;
    2 
    3 {$mode delphi}
    42
    53interface
     
    141139end;
    142140
    143 
    144141{ THTTPServerTCP }
    145142
  • trunk/Packages/CoolWeb/WebServer/UHTTPServerTurboPower.pas

    r84 r137  
    11unit UHTTPServerTurboPower;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
     
    3230end;
    3331
    34 
    3532{ THTTPServerTurboPower }
    3633
     
    6259destructor THTTPServerTurboPower.Destroy;
    6360begin
    64   inherited Destroy;
     61  inherited;
    6562end;
    6663
  • trunk/Packages/CoolWeb/WebServer/UHTTPSessionFile.pas

    r114 r137  
    11unit UHTTPSessionFile;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
     
    3634procedure Register;
    3735
     36
    3837implementation
    3938
     
    4544  RegisterComponents('CoolWeb', [THTTPSessionStorageFile]);
    4645end;
    47 
    4846
    4947{ THTTPSession }
     
    119117  Sessions.Destroy;
    120118  Lock.Destroy;
    121   inherited Destroy;
     119  inherited;
    122120end;
    123121
  • trunk/Packages/CoolWeb/WebServer/UHTTPSessionMySQL.pas

    r100 r137  
    11unit UHTTPSessionMySQL;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
     
    3735procedure Register;
    3836
     37
    3938implementation
    4039
     
    4342  RegisterComponents('CoolWeb', [THTTPSessionStorageMySQL]);
    4443end;
    45 
    4644
    4745{ THTTPSession }
     
    138136  Sessions.Free;
    139137  Lock.Free;
    140   inherited Destroy;
     138  inherited;
    141139end;
    142140
  • trunk/Packages/CoolWeb/WebServer/UTurboPowerForm.pas

    r84 r137  
    11unit UTurboPowerForm;
    2 
    3 {$mode delphi}
    42
    53interface
     
    3533  FormWebBrowser: TFormWebBrowser;
    3634
     35
    3736implementation
    3837
     
    5150end;
    5251
    53 initialization
    54 
    5552end.
    5653
  • trunk/Packages/CoolWeb/WebServer/UWebApp.pas

    r132 r137  
    11unit UWebApp;
    22
    3 {$mode Delphi}{$H+}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, UWebPage, UHTTPSessionFile,
    9   UHTTPServer, Forms, FileUtil, fgl;
     6  Classes, SysUtils, UWebPage, UHTTPSessionFile, UHTTPServer, Forms, FileUtil,
     7  Generics.Collections;
    108
    119type
     
    2220  { TPageList }
    2321
    24   TPageList = class(TFPGObjectList<TRegistredPage>)
     22  TPageList = class(TObjectList<TRegistredPage>)
    2523    RootDir: string;
    2624    function FindByPage(Page: TWebPage): TRegistredPage;
     
    221219end;
    222220
    223 
    224 initialization
    225 
    226 finalization
    227 
    228221end.
    229222
  • trunk/Packages/CoolWeb/WebServer/UWebPage.pas

    r84 r137  
    11unit UWebPage;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
     
    119  TOnProduceEvent = procedure(HandlerData: THTTPHandlerData) of object;
    1210
    13 
    1411  { TWebPage }
    1512
     
    1815    FCaption: string;
    1916    FOnProduce: TOnProduceEvent;
     17    FRaw: Boolean;
    2018  published
     19    property Raw: Boolean read FRaw write FRaw;
    2120    property Caption: string read FCaption write FCaption;
    2221    property OnProduce: TOnProduceEvent read FOnProduce write FOnProduce;
    2322  end;
    24 
    2523
    2624  TWebPageClass = class of TWebPage;
  • trunk/Packages/ModularSystem/Demo/UMainForm.pas

    r105 r137  
    11unit UMainForm;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
  • trunk/Packages/ModularSystem/Demo/UModuleACL.pas

    r105 r137  
    11unit UModuleACL;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
     
    3331destructor TModuleACL.Destroy;
    3432begin
    35   inherited Destroy;
     33  inherited;
    3634end;
    3735
  • trunk/Packages/ModularSystem/Demo/UModuleBase.pas

    r105 r137  
    11unit UModuleBase;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
     
    3028destructor TModuleBase.Destroy;
    3129begin
    32   inherited Destroy;
     30  inherited;
    3331end;
    3432
  • trunk/Packages/ModularSystem/Demo/UModuleUser.pas

    r105 r137  
    11unit UModuleUser;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
     
    1614    destructor Destroy; override;
    1715  end;
     16
    1817
    1918implementation
     
    3332destructor TModuleUser.Destroy;
    3433begin
    35   inherited Destroy;
     34  inherited;
    3635end;
    3736
  • trunk/Packages/ModularSystem/ModularSystem.lpk

    r132 r137  
    1414      <Parsing>
    1515        <SyntaxOptions>
     16          <SyntaxMode Value="Delphi"/>
    1617          <CStyleOperator Value="False"/>
    1718          <AllowLabel Value="False"/>
  • trunk/Packages/ModularSystem/UModularSystem.pas

    r132 r137  
    11unit UModularSystem;
    22
    3 {$mode Delphi}{$H+}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, fgl, URegistry;
     6  Classes, SysUtils, Generics.Collections, URegistry;
    97
    108type
     
    6563  end;
    6664
    67   TModules = class(TFPGObjectList<TModule>)
     65  TModules = class(TObjectList<TModule>)
    6866  end;
    6967
  • trunk/Packages/PersistentData/Backend/UPDClientINI.pas

    r87 r137  
    11unit UPDClientINI;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2321    procedure Disconnect; override;
    2422  end;
     23
    2524
    2625implementation
     
    4948begin
    5049  Disconnect;
    51   inherited Destroy;
     50  inherited;
    5251end;
    5352
  • trunk/Packages/PersistentData/Backend/UPDClientMemory.pas

    r113 r137  
    11unit UPDClientMemory;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
     
    4038resourcestring
    4139  SObjectNotFound = 'Object with id %s not found';
     40
    4241
    4342implementation
     
    147146procedure TPDClientMemory.ListSave(AList: TListProxy);
    148147begin
    149 
    150148end;
    151149
    152150procedure TPDClientMemory.TypeDefine(AType: TPDType);
    153151begin
    154 
    155152end;
    156153
    157154procedure TPDClientMemory.TypeUndefine(AType: TPDType);
    158155begin
    159 
    160156end;
    161157
     
    167163procedure TPDClientMemory.Install;
    168164begin
    169 
    170165end;
    171166
    172167procedure TPDClientMemory.Uninstall;
    173168begin
    174 
    175169end;
    176170
     
    185179begin
    186180  Objects.Free;
    187   inherited Destroy;
     181  inherited;
    188182end;
    189183
  • trunk/Packages/PersistentData/Backend/UPDClientMySQL.pas

    r113 r137  
    11unit UPDClientMySQL;
    2 
    3 {$mode delphi}
    42
    53interface
     
    4644  end;
    4745
     46
    4847implementation
    49 
    5048
    5149resourcestring
    5250  SMissingBaseType = 'Missing base typ for %s';
    5351  SUndefinedType = 'Undefined type in %0:s.%1:s';
    54 
    5552
    5653{ TPDClientMySQL }
     
    262259begin
    263260  FreeAndNil(FDatabase);
    264   inherited Destroy;
     261  inherited;
    265262end;
    266263
  • trunk/Packages/PersistentData/Backend/UPDClientRegistry.pas

    r87 r137  
    11unit UPDClientRegistry;
    2 
    3 {$mode delphi}
    42
    53interface
     
    1311
    1412  TPDClientRegistry = class(TPDClient)
     13  public
    1514    Reg: TRegistry;
    1615    //procedure GetItemList(Condition: TCondition; ItemList: TItemList); override;
     
    1918    destructor Destroy; override;
    2019  end;
     20
    2121
    2222implementation
     
    4646begin
    4747  Reg.Free;
    48   inherited Destroy;
     48  inherited;
    4949end;
    5050
  • trunk/Packages/PersistentData/Backend/UPDClientXMLRPC.pas

    r87 r137  
    11unit UPDClientXMLRPC;
    2 
    3 {$mode delphi}
    42
    53interface
     
    1614  end;
    1715
     16
    1817implementation
    19 
    2018
    2119{ TPDClientXMLRPC }
  • trunk/Packages/PersistentData/Demo/UFormMain.pas

    r87 r137  
    11unit UFormMain;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
     
    3028var
    3129  FormMain: TFormMain;
     30
    3231
    3332implementation
  • trunk/Packages/PersistentData/UPDClient.pas

    r113 r137  
    11unit UPDClient;
    2 
    3 {$mode delphi}
    42
    53interface
     
    226224begin
    227225  Properties.Free;
    228   inherited Destroy;
     226  inherited;
    229227end;
    230228
     
    257255begin
    258256  Properties.Free;
    259   inherited Destroy;
     257  inherited;
    260258end;
    261259
     
    289287  Objects.Free;
    290288  ColumnsFilter.Free;
    291   inherited Destroy;
     289  inherited;
    292290end;
    293291
     
    423421begin
    424422  Types.Free;
    425   inherited Destroy;
     423  inherited;
    426424end;
    427425
  • trunk/Packages/PersistentData/UPDServer.pas

    r87 r137  
    11unit UPDServer;
    2 
    3 {$mode delphi}
    42
    53interface
     
    108type
    119  TPDServer = class
     10  end;
    1211
    13   end;
    1412
    1513implementation
  • trunk/Packages/PersistentData/UPersistentData.pas

    r113 r137  
    11unit UPersistentData;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
     
    8482begin
    8583  FreeAndNil(Items);
    86   inherited Destroy;
     84  inherited;
    8785end;
    8886
  • trunk/Packages/TemplateGenerics/Additional/UBinarySerializer.pas

    r90 r137  
    11unit UBinarySerializer;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
     
    213211begin
    214212  if OwnsList then FList.Free;
    215   inherited Destroy;
     213  inherited;
    216214end;
    217215
  • trunk/Packages/TemplateGenerics/Demo/UMainForm.pas

    r90 r137  
    11unit UMainForm;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
  • trunk/Packages/TemplateGenerics/Generic/GenericListString.inc

    r90 r137  
    8989begin
    9090  Clear;
    91   inherited Destroy;
     91  inherited;
    9292end;
    9393
  • trunk/Packages/TemplateGenerics/Generic/GenericQueue.inc

    r90 r137  
    8181begin
    8282  FList.Free;
    83   inherited Destroy;
     83  inherited;
    8484end;
    8585
  • trunk/Packages/TemplateGenerics/Generic/GenericSet.inc

    r84 r137  
    6060begin
    6161  FList.Free;
    62   inherited Destroy;
     62  inherited;
    6363end;
    6464
  • trunk/Packages/TemplateGenerics/Generic/GenericStack.inc

    r84 r137  
    6666begin
    6767  FList.Free;
    68   inherited Destroy;
     68  inherited;
    6969end;
    7070
  • trunk/Packages/TemplateGenerics/Specialized/SpecializedBitmap.pas

    r84 r137  
    11  unit SpecializedBitmap;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
  • trunk/Packages/TemplateGenerics/Specialized/SpecializedDictionary.pas

    r84 r137  
    11unit SpecializedDictionary;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/TemplateGenerics/Specialized/SpecializedList.pas

    r90 r137  
    11unit SpecializedList;
    22
     3interface
     4
    35{$mode delphi}
    4 
    5 interface
    66
    77uses
  • trunk/Packages/TemplateGenerics/Specialized/SpecializedMatrix.pas

    r84 r137  
    11unit SpecializedMatrix;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
  • trunk/Packages/TemplateGenerics/Specialized/SpecializedPoint.pas

    r90 r137  
    11unit SpecializedPoint;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
  • trunk/Packages/TemplateGenerics/Specialized/SpecializedQueue.pas

    r84 r137  
    11unit SpecializedQueue;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/TemplateGenerics/Specialized/SpecializedRectangle.pas

    r90 r137  
    11unit SpecializedRectangle;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
  • trunk/Packages/TemplateGenerics/Specialized/SpecializedSet.pas

    r84 r137  
    11unit SpecializedSet;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/TemplateGenerics/Specialized/SpecializedStack.pas

    r84 r137  
    11unit SpecializedStack;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/TemplateGenerics/Specialized/SpecializedStream.pas

    r90 r137  
    11unit SpecializedStream;
    2 
    3 {$mode delphi}
    42
    53interface
     
    200198begin
    201199  if OwnsList then FList.Free;
    202   inherited Destroy;
     200  inherited;
    203201end;
    204202
  • trunk/Packages/TemplateGenerics/Specialized/SpecializedTree.pas

    r84 r137  
    11unit SpecializedTree;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Pages/UPageAdmin.pas

    r105 r137  
    11unit UPageAdmin;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Pages/UServerInfoPage.pas

    r105 r137  
    11unit UServerInfoPage;
    2 
    3 {$mode delphi}
    42
    53interface
     
    1412  TServerInfoPage = class(TWebPage)
    1513    procedure DataModuleProduce(HandlerData: THTTPHandlerData);
    16   private
    17     { private declarations }
    1814  public
    1915    ModuleUser: TModuleUser;
     
    2218var
    2319  ServerInfoPage: TServerInfoPage;
     20
    2421
    2522implementation
  • trunk/UCore.pas

    r132 r137  
    11unit UCore;
    2 
    3 {$mode delphi}
    42
    53interface
     
    5553
    5654implementation
    57 
    5855
    5956{ TCore }
     
    191188end;
    192189
     190initialization
    193191
    194 initialization
    195   {$I UCore.lrs}
     192{$I UCore.lrs}
    196193
    197194end.
  • trunk/ZdechovNET.lpi

    r132 r137  
    122122      </Item7>
    123123    </RequiredPackages>
    124     <Units Count="39">
     124    <Units Count="40">
    125125      <Unit0>
    126126        <Filename Value="ZdechovNET.lpr"/>
     
    188188        <Filename Value="Modules/ZdechovNET/UContactPage.pas"/>
    189189        <IsPartOfProject Value="True"/>
    190         <HasResources Value="True"/>
     190        <ComponentName Value="ContactPage"/>
     191        <HasResources Value="True"/>
     192        <ResourceBaseClass Value="DataModule"/>
    191193      </Unit12>
    192194      <Unit13>
     
    334336        <ResourceBaseClass Value="DataModule"/>
    335337      </Unit38>
     338      <Unit39>
     339        <Filename Value="Modules/ZdechovNET/URobotsPage.pas"/>
     340        <IsPartOfProject Value="True"/>
     341        <ComponentName Value="RobotsPage"/>
     342        <HasResources Value="True"/>
     343        <ResourceBaseClass Value="DataModule"/>
     344      </Unit39>
    336345    </Units>
    337346  </ProjectOptions>
Note: See TracChangeset for help on using the changeset viewer.