Changeset 86 for trunk/Packages
- Timestamp:
- Jun 21, 2022, 5:04:48 PM (2 years ago)
- Location:
- trunk/Packages/Common
- Files:
-
- 11 added
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Common.lpk
r83 r86 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <CONFIG> 3 <Package Version=" 4">3 <Package Version="5"> 4 4 <PathDelim Value="\"/> 5 5 <Name Value="Common"/> … … 33 33 <Other> 34 34 <CompilerMessages> 35 <IgnoredMessages idx 5024="True"/>35 <IgnoredMessages idx6058="True" idx5071="True" idx5024="True" idx3124="True" idx3123="True"/> 36 36 </CompilerMessages> 37 37 </Other> … … 41 41 Source: https://svn.zdechov.net/PascalClassLibrary/Common/"/> 42 42 <License Value="Copy left."/> 43 <Version Minor=" 9"/>43 <Version Minor="10"/> 44 44 <Files Count="29"> 45 45 <Item1> … … 172 172 </Item29> 173 173 </Files> 174 <CompatibilityMode Value="True"/> 174 175 <i18n> 175 176 <EnableI18N Value="True"/> -
trunk/Packages/Common/Languages/UJobProgressView.cs.po
r55 r86 13 13 14 14 #: ujobprogressview.sestimatedtime 15 #, object-pascal-format 15 16 msgid "Estimated time: %s" 16 17 msgstr "Odhadovaný čas: %s" … … 33 34 34 35 #: ujobprogressview.stotalestimatedtime 36 #, object-pascal-format 35 37 msgid "Total estimated time: %s" 36 38 msgstr "Celkový odhadovaný čas: %s" -
trunk/Packages/Common/Languages/UScaleDPI.cs.po
r55 r86 13 13 14 14 #: uscaledpi.swrongdpi 15 #, object-pascal-format 15 16 msgid "Wrong DPI [%d,%d]" 16 17 msgstr "Chybné DPI [%d,%d]" -
trunk/Packages/Common/Languages/UThreading.cs.po
r55 r86 11 11 12 12 #: uthreading.scurrentthreadnotfound 13 #, object-pascal-format 13 14 msgid "Current thread ID %d not found in virtual thread list." 14 15 msgstr "Aktuální vlákno ID %d nenalezeno v seznamu virtuálních vláken." -
trunk/Packages/Common/StopWatch.pas
r55 r86 5 5 6 6 uses 7 {$IFDEF W indows}Windows,{$ENDIF}7 {$IFDEF WINDOWS}Windows,{$ENDIF} 8 8 SysUtils, DateUtils; 9 9 … … 32 32 end; 33 33 34 34 35 implementation 35 36 … … 40 41 fIsRunning := False; 41 42 42 {$IFDEF W indows}43 {$IFDEF WINDOWS} 43 44 fIsHighResolution := QueryPerformanceFrequency(fFrequency) ; 44 45 {$ELSE} -
trunk/Packages/Common/UAboutDialog.pas
r83 r86 1 1 unit UAboutDialog; 2 3 {$mode delphi}4 2 5 3 interface … … 7 5 uses 8 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus, 9 StdCtrls,ExtCtrls, UApplicationInfo, UCommon, UTranslator, UTheme, UFormAbout;7 ExtCtrls, UApplicationInfo, UCommon, UTranslator, UTheme, UFormAbout; 10 8 11 9 type -
trunk/Packages/Common/UApplicationInfo.pas
r83 r86 1 1 unit UApplicationInfo; 2 3 {$mode delphi}4 2 5 3 interface … … 59 57 procedure Register; 60 58 59 61 60 implementation 62 61 -
trunk/Packages/Common/UCommon.pas
r83 r86 1 1 unit UCommon; 2 2 3 {$mode delphi}4 5 3 interface 6 4 7 5 uses 8 {$ ifdef Windows}Windows,{$endif}9 {$ ifdef Linux}baseunix,{$endif}10 Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf, 6 {$IFDEF WINDOWS}Windows,{$ENDIF} 7 {$IFDEF UNIX}baseunix,{$ENDIF} 8 Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf, Graphics, 11 9 FileUtil; //, ShFolder, ShellAPI; 12 10 13 11 type 14 12 TArrayOfByte = array of Byte; 15 TArrayOfString = array of string;16 13 TExceptionEvent = procedure(Sender: TObject; E: Exception) of object; 17 14 … … 35 32 DLLHandle1: HModule; 36 33 37 {$IFDEF Windows} 38 GetUserNameEx: procedure (NameFormat: DWORD; 39 lpNameBuffer: LPSTR; nSize: PULONG); stdcall; 40 {$ENDIF} 34 {$IFDEF WINDOWS} 35 GetUserNameEx: procedure (NameFormat: DWORD; 36 lpNameBuffer: LPSTR; nSize: PULONG); stdcall; 37 {$ENDIF} 38 39 const 40 clLightBlue = TColor($FF8080); 41 clLightGreen = TColor($80FF80); 42 clLightRed = TColor($8080FF); 41 43 42 44 function AddLeadingZeroes(const aNumber, Length : integer) : string; … … 51 53 function ComputerName: string; 52 54 procedure DeleteFiles(APath, AFileSpec: string); 55 function Explode(Separator: Char; Data: string): TStringArray; 53 56 procedure ExecuteProgram(Executable: string; Parameters: array of string); 54 57 procedure FileDialogUpdateFilterFileType(FileDialog: TOpenDialog); … … 65 68 function LoadFileToStr(const FileName: TFileName): AnsiString; 66 69 function LoggedOnUserNameEx(Format: TUserNameFormat): string; 67 function MergeArray(A, B: array of string): T ArrayOfString;70 function MergeArray(A, B: array of string): TStringArray; 68 71 function OccurenceOfChar(What: Char; Where: string): Integer; 69 72 procedure OpenWebPage(URL: string); 73 procedure OpenEmail(Email: string); 70 74 procedure OpenFileInShell(FileName: string); 71 75 function PosFromIndex(SubStr: string; Text: string; … … 83 87 function SplitString(var Text: string; Count: Word): string; 84 88 function StripTags(const S: string): string; 85 function TryHexToInt(Data: string; varValue: Integer): Boolean;86 function TryBinToInt(Data: string; varValue: Integer): Boolean;89 function TryHexToInt(Data: string; out Value: Integer): Boolean; 90 function TryBinToInt(Data: string; out Value: Integer): Boolean; 87 91 procedure SortStrings(Strings: TStrings); 88 92 … … 246 250 end; 247 251 248 function TryHexToInt(Data: string; varValue: Integer): Boolean;252 function TryHexToInt(Data: string; out Value: Integer): Boolean; 249 253 var 250 254 I: Integer; … … 262 266 end; 263 267 264 function TryBinToInt(Data: string; varValue: Integer): Boolean;268 function TryBinToInt(Data: string; out Value: Integer): Boolean; 265 269 var 266 270 I: Integer; … … 290 294 end; 291 295 292 function Explode(Separator: char; Data: string): TArrayOfString; 293 begin 294 SetLength(Result, 0); 295 while Pos(Separator, Data) > 0 do begin 296 function Explode(Separator: Char; Data: string): TStringArray; 297 var 298 Index: Integer; 299 begin 300 Result := Default(TStringArray); 301 repeat 302 Index := Pos(Separator, Data); 303 if Index > 0 then begin 304 SetLength(Result, Length(Result) + 1); 305 Result[High(Result)] := Copy(Data, 1, Index - 1); 306 Delete(Data, 1, Index); 307 end else Break; 308 until False; 309 if Data <> '' then begin 296 310 SetLength(Result, Length(Result) + 1); 297 Result[High(Result)] := Copy(Data, 1, Pos(Separator, Data) - 1); 298 Delete(Data, 1, Pos(Separator, Data)); 299 end; 300 SetLength(Result, Length(Result) + 1); 301 Result[High(Result)] := Data; 302 end; 303 304 {$IFDEF Windows} 311 Result[High(Result)] := Data; 312 end; 313 end; 314 315 {$IFDEF WINDOWS} 305 316 function GetUserName: string; 306 317 const … … 310 321 begin 311 322 L := MAX_USERNAME_LENGTH + 2; 323 Result := Default(string); 312 324 SetLength(Result, L); 313 325 if Windows.GetUserName(PChar(Result), L) and (L > 0) then begin … … 323 335 end; 324 336 end; 325 {$ endif}337 {$ENDIF} 326 338 327 339 function ComputerName: string; 328 {$ ifdef mswindows}340 {$IFDEF WINDOWS} 329 341 const 330 342 INFO_BUFFER_SIZE = 32767; … … 341 353 end; 342 354 end; 343 {$ endif}344 {$ ifdef unix}355 {$ENDIF} 356 {$IFDEF UNIX} 345 357 var 346 358 Name: UtsName; 347 359 begin 360 Name := Default(UtsName); 348 361 fpuname(Name); 349 362 Result := Name.Nodename; 350 363 end; 351 {$ endif}352 353 {$ ifdef windows}364 {$ENDIF} 365 366 {$IFDEF WINDOWS} 354 367 function LoggedOnUserNameEx(Format: TUserNameFormat): string; 355 368 const … … 429 442 procedure LoadLibraries; 430 443 begin 431 {$IFDEF W indows}444 {$IFDEF WINDOWS} 432 445 DLLHandle1 := LoadLibrary('secur32.dll'); 433 446 if DLLHandle1 <> 0 then … … 440 453 procedure FreeLibraries; 441 454 begin 442 {$IFDEF W indows}455 {$IFDEF WINDOWS} 443 456 if DLLHandle1 <> 0 then FreeLibrary(DLLHandle1); 444 457 {$ENDIF} … … 473 486 end; 474 487 488 procedure OpenEmail(Email: string); 489 begin 490 OpenURL('mailto:' + Email); 491 end; 492 475 493 procedure OpenFileInShell(FileName: string); 476 494 begin … … 501 519 end; 502 520 503 function MergeArray(A, B: array of string): TArrayOfString; 504 var 505 I: Integer; 506 begin 521 function MergeArray(A, B: array of string): TStringArray; 522 var 523 I: Integer; 524 begin 525 Result := Default(TStringArray); 507 526 SetLength(Result, Length(A) + Length(B)); 508 527 for I := 0 to Length(A) - 1 do -
trunk/Packages/Common/UDebugLog.pas
r55 r86 1 1 unit UDebugLog; 2 3 {$mode delphi}4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, FileUtil, fgl, SyncObjs;6 Classes, SysUtils, FileUtil, Generics.Collections, SyncObjs; 9 7 10 8 type … … 15 13 Group: string; 16 14 Text: string; 15 end; 16 17 TDebugLogItems = class(TObjectList<TDebugLogItem>) 17 18 end; 18 19 … … 29 30 procedure SetMaxCount(const AValue: Integer); 30 31 public 31 Items: T FPGObjectList<TDebugLogItem>;32 Items: TDebugLogItems; 32 33 Lock: TCriticalSection; 33 34 procedure Add(Text: string; Group: string = ''); … … 44 45 45 46 procedure Register; 47 46 48 47 49 implementation … … 117 119 begin 118 120 inherited; 119 Items := T FPGObjectList<TDebugLogItem>.Create;121 Items := TDebugLogItems.Create; 120 122 Lock := TCriticalSection.Create; 121 123 MaxCount := 100; … … 126 128 destructor TDebugLog.Destroy; 127 129 begin 128 Items.Free;129 Lock.Free;130 FreeAndNil(Items); 131 FreeAndNil(Lock); 130 132 inherited; 131 133 end; -
trunk/Packages/Common/UDelay.pas
r55 r86 1 1 unit UDelay; 2 3 {$mode delphi}4 2 5 3 interface -
trunk/Packages/Common/UFindFile.pas
r55 r86 35 35 private 36 36 s : TStringList; 37 38 37 fSubFolder : boolean; 39 38 fAttr: TFileAttrib; 40 39 fPath : string; 41 40 fFileMask : string; 42 43 41 procedure SetPath(Value: string); 44 42 procedure FileSearch(const inPath : string); … … 46 44 constructor Create(AOwner: TComponent); override; 47 45 destructor Destroy; override; 48 49 46 function SearchForFiles: TStringList; 50 47 published … … 59 56 FilterAll = '*.*'; 60 57 {$ENDIF} 61 {$IFDEF LINUX}58 {$IFDEF UNIX} 62 59 FilterAll = '*'; 63 60 {$ENDIF} 64 61 65 62 procedure Register; 63 66 64 67 65 implementation -
trunk/Packages/Common/UFormAbout.pas
r83 r86 1 1 unit UFormAbout; 2 3 {$mode delphi}4 2 5 3 interface -
trunk/Packages/Common/UGeometric.pas
r55 r86 1 1 unit UGeometric; 2 3 {$mode delphi}4 2 5 3 interface … … 26 24 function RectEnlarge(Rect: TRect; Value: Integer): TRect; 27 25 function ShiftRect(ARect: TRect; Delta: TPoint): TRect; 26 28 27 29 28 implementation … … 96 95 I: Integer; 97 96 begin 97 Result := Default(TPointArray); 98 98 SetLength(Result, Length(P)); 99 99 for I := 0 to High(P) do -
trunk/Packages/Common/UJobProgressView.lfm
r55 r86 1 1 object FormJobProgressView: TFormJobProgressView 2 2 Left = 467 3 Height = 3453 Height = 414 4 4 Top = 252 5 Width = 5395 Width = 647 6 6 BorderIcons = [biSystemMenu] 7 ClientHeight = 3458 ClientWidth = 5399 DesignTimePPI = 1 207 ClientHeight = 414 8 ClientWidth = 647 9 DesignTimePPI = 144 10 10 OnClose = FormClose 11 11 OnCloseQuery = FormCloseQuery 12 12 OnCreate = FormCreate 13 OnDestroy = FormDestroy14 13 OnHide = FormHide 15 14 OnShow = FormShow 16 15 Position = poScreenCenter 17 LCLVersion = '2. 0.2.0'16 LCLVersion = '2.2.0.4' 18 17 object PanelOperationsTitle: TPanel 19 18 Left = 0 20 Height = 3 219 Height = 38 21 20 Top = 0 22 Width = 53921 Width = 647 23 22 Align = alTop 24 23 BevelOuter = bvNone 25 ClientHeight = 3 226 ClientWidth = 53924 ClientHeight = 38 25 ClientWidth = 647 27 26 FullRepaint = False 28 27 TabOrder = 0 29 28 object LabelOperation: TLabel 30 Left = 831 Height = 2 032 Top = 833 Width = 7629 Left = 10 30 Height = 26 31 Top = 10 32 Width = 99 34 33 Caption = 'Operations:' 35 ParentColor = False36 34 ParentFont = False 37 35 end … … 39 37 object PanelLog: TPanel 40 38 Left = 0 41 Height = 1 3342 Top = 2 1243 Width = 53939 Height = 161 40 Top = 253 41 Width = 647 44 42 Align = alClient 45 43 BevelOuter = bvSpace 46 ClientHeight = 1 3347 ClientWidth = 53944 ClientHeight = 161 45 ClientWidth = 647 48 46 TabOrder = 1 49 47 object MemoLog: TMemo 50 Left = 851 Height = 1 1752 Top = 853 Width = 52348 Left = 10 49 Height = 141 50 Top = 10 51 Width = 627 54 52 Anchors = [akTop, akLeft, akRight, akBottom] 55 53 ReadOnly = True … … 60 58 object PanelProgress: TPanel 61 59 Left = 0 62 Height = 5463 Top = 1 0664 Width = 53960 Height = 65 61 Top = 126 62 Width = 647 65 63 Align = alTop 66 64 BevelOuter = bvNone 67 ClientHeight = 5468 ClientWidth = 53965 ClientHeight = 65 66 ClientWidth = 647 69 67 TabOrder = 2 70 68 object ProgressBarPart: TProgressBar 71 Left = 1 072 Height = 2 473 Top = 2 474 Width = 52369 Left = 12 70 Height = 29 71 Top = 29 72 Width = 628 75 73 Anchors = [akTop, akLeft, akRight] 76 74 TabOrder = 0 77 75 end 78 76 object LabelEstimatedTimePart: TLabel 79 Left = 880 Height = 2 077 Left = 10 78 Height = 26 81 79 Top = -2 82 Width = 1 0380 Width = 132 83 81 Caption = 'Estimated time:' 84 ParentColor = False85 82 end 86 83 end 87 84 object PanelOperations: TPanel 88 85 Left = 0 89 Height = 4290 Top = 6491 Width = 53986 Height = 50 87 Top = 76 88 Width = 647 92 89 Align = alTop 93 90 BevelOuter = bvNone 94 ClientHeight = 4295 ClientWidth = 53991 ClientHeight = 50 92 ClientWidth = 647 96 93 FullRepaint = False 97 94 TabOrder = 3 98 95 object ListViewJobs: TListView 99 Left = 8100 Height = 3 2101 Top = 5102 Width = 52396 Left = 10 97 Height = 38 98 Top = 6 99 Width = 627 103 100 Anchors = [akTop, akLeft, akRight, akBottom] 104 101 AutoWidthLastColumn = True … … 107 104 Columns = < 108 105 item 109 Width = 523106 Width = 614 110 107 end> 111 108 OwnerData = True … … 120 117 object PanelProgressTotal: TPanel 121 118 Left = 0 122 Height = 52123 Top = 1 60124 Width = 539119 Height = 62 120 Top = 191 121 Width = 647 125 122 Align = alTop 126 123 BevelOuter = bvNone 127 ClientHeight = 52128 ClientWidth = 539124 ClientHeight = 62 125 ClientWidth = 647 129 126 TabOrder = 4 130 127 object LabelEstimatedTimeTotal: TLabel 131 Left = 8132 Height = 2 0128 Left = 10 129 Height = 26 133 130 Top = 0 134 Width = 1 41131 Width = 178 135 132 Caption = 'Total estimated time:' 136 ParentColor = False137 133 end 138 134 object ProgressBarTotal: TProgressBar 139 Left = 8140 Height = 2 4141 Top = 2 4142 Width = 523135 Left = 10 136 Height = 29 137 Top = 29 138 Width = 627 143 139 Anchors = [akTop, akLeft, akRight] 144 140 TabOrder = 0 … … 147 143 object PanelText: TPanel 148 144 Left = 0 149 Height = 3 2150 Top = 3 2151 Width = 539145 Height = 38 146 Top = 38 147 Width = 647 152 148 Align = alTop 153 149 BevelOuter = bvNone 154 ClientHeight = 3 2155 ClientWidth = 539150 ClientHeight = 38 151 ClientWidth = 647 156 152 TabOrder = 5 157 153 object LabelText: TLabel 158 Left = 8159 Height = 2 4160 Top = 8161 Width = 525154 Left = 10 155 Height = 29 156 Top = 10 157 Width = 630 162 158 Anchors = [akTop, akLeft, akRight] 163 159 AutoSize = False 164 ParentColor = False165 160 end 166 161 end 167 162 object ImageList1: TImageList 168 BkColor = clForeground 169 left = 200 170 top = 8 163 Left = 240 164 Top = 10 171 165 Bitmap = { 172 4C69020000001000000010000000FF00FF00FF00FF00FF00FF00FF00FF00FF00 173 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 174 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 175 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 176 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 177 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 178 FF00000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 179 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF000000 180 00FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 181 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF0000 182 00FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 183 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF0000 184 00FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 185 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000 186 00FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00 187 FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF000000FFFF00 188 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FFFF00 189 FF00FF00FF00FF00FF00000000FF000000FF000000FF000000FFFF00FF00FF00 190 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000 191 00FFFF00FF00000000FF000000FF000000FF000000FFFF00FF00FF00FF00FF00 192 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF0000 193 00FF000000FF000000FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00 194 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF0000 195 00FF000000FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00 196 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF000000 197 00FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 198 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 199 FF00000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 200 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 201 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 202 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 203 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 204 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 205 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 206 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 207 FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00FF00FF00FF00FF00 208 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 209 FF00FF00FF00FF00FF00FF00FF00000000FF000000FFFF00FF00FF00FF00FF00 210 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 211 FF00FF00FF00FF00FF00FF00FF00000000FF000084FF000000FFFF00FF00FF00 212 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000 213 00FF000000FF000000FF000000FF000000FF0000FFFF000084FF000000FFFF00 214 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 215 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000084FF0000 216 00FFFF00FF00FF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 217 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 218 84FF000000FFFF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 219 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 220 FFFF000084FF000000FFFF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 221 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 222 84FF000000FFFF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 223 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000084FF0000 224 00FFFF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000 225 00FF000000FF000000FF000000FF000000FF0000FFFF000084FF000000FFFF00 226 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 227 FF00FF00FF00FF00FF00FF00FF00000000FF000084FF000000FFFF00FF00FF00 228 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 229 FF00FF00FF00FF00FF00FF00FF00000000FF000000FFFF00FF00FF00FF00FF00 230 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 231 FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00FF00FF00FF00FF00 232 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 233 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 234 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 235 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 236 FF00FF00FF00FF00FF00FF00FF00 166 4C7A0200000010000000100000006A0000000000000078DAE593490E00100C45 167 7B78F72E5684A63A1142C382BE4F0708F89C955117F4B016BE67B5FC6E96DB97 168 B0D4B9F4CD949F36DED1DF922B0F1BD11FAB5AFC68DE5C44D40220A9FA779EC8 169 6A349FD5A435E43CADA1E3678D73F773F1DBF3EFADFFEEFEBBF97F6696BE9D36 237 170 } 238 171 end … … 241 174 Interval = 100 242 175 OnTimer = TimerUpdateTimer 243 left = 320244 top = 8176 Left = 384 177 Top = 10 245 178 end 246 179 end -
trunk/Packages/Common/UJobProgressView.pas
r55 r86 1 1 unit UJobProgressView; 2 3 {$MODE Delphi}4 2 5 3 interface … … 7 5 uses 8 6 SysUtils, Variants, Classes, Graphics, Controls, Forms, Syncobjs, 9 Dialogs, ComCtrls, StdCtrls, ExtCtrls, Contnrs, UThreading, Math,7 Dialogs, ComCtrls, StdCtrls, ExtCtrls, Generics.Collections, UThreading, Math, 10 8 DateUtils; 11 9 … … 71 69 end; 72 70 73 TJobs = class(TObjectList )71 TJobs = class(TObjectList<TJob>) 74 72 end; 75 73 … … 105 103 procedure ReloadJobList; 106 104 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 107 procedure FormDestroy(Sender: TObject);108 105 procedure ListViewJobsData(Sender: TObject; Item: TListItem); 109 106 procedure TimerUpdateTimer(Sender: TObject); … … 165 162 SExecuted = 'Executed'; 166 163 164 167 165 implementation 168 166 … … 286 284 end; 287 285 288 procedure TFormJobProgressView.FormDestroy(Sender:TObject);289 begin290 end;291 292 286 procedure TFormJobProgressView.ListViewJobsData(Sender: TObject; Item: TListItem); 293 287 begin 294 288 if (Item.Index >= 0) and (Item.Index < JobProgressView.Jobs.Count) then 295 with TJob(JobProgressView.Jobs[Item.Index])do begin289 with JobProgressView.Jobs[Item.Index] do begin 296 290 Item.Caption := Title; 297 291 if Item.Index = JobProgressView.CurrentJobIndex then Item.ImageIndex := 1 … … 405 399 I := 0; 406 400 while I < Jobs.Count do 407 with TJob(Jobs[I])do begin401 with Jobs[I] do begin 408 402 CurrentJobIndex := I; 409 CurrentJob := TJob(Jobs[I]);403 CurrentJob := Jobs[I]; 410 404 JobProgressChange(Self); 411 405 StartTime := Now; … … 420 414 Method(CurrentJob); 421 415 end else begin 416 Thread := TJobThread.Create(True); 422 417 try 423 Thread := TJobThread.Create(True);424 418 with Thread do begin 425 419 FreeOnTerminate := False; … … 494 488 if AValue = FTerminate then Exit; 495 489 for I := 0 to Jobs.Count - 1 do 496 TJob(Jobs[I]).Terminate := AValue;490 Jobs[I].Terminate := AValue; 497 491 FTerminate := AValue; 498 492 end; … … 620 614 procedure TProgress.Increment; 621 615 begin 622 try623 FLock.Acquire;616 FLock.Acquire; 617 try 624 618 Value := Value + 1; 625 619 finally … … 630 624 procedure TProgress.Reset; 631 625 begin 632 try633 FLock.Acquire;626 FLock.Acquire; 627 try 634 628 FValue := 0; 635 629 finally … … 678 672 destructor TJob.Destroy; 679 673 begin 680 Progress.Free;674 FreeAndNil(Progress); 681 675 inherited; 682 676 end; -
trunk/Packages/Common/ULanguages.pas
r83 r86 1 1 unit ULanguages; 2 2 3 {$mode delphi}{$H+}4 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, fgl;6 Classes, SysUtils, Generics.Collections; 9 7 10 8 type … … 17 15 { TLanguages } 18 16 19 TLanguages = class(T FPGObjectList<TLanguage>)17 TLanguages = class(TObjectList<TLanguage>) 20 18 function SearchByCode(ACode: string): TLanguage; 21 19 procedure AddNew(Code: string; Name: string); -
trunk/Packages/Common/ULastOpenedList.pas
r55 r86 1 1 unit ULastOpenedList; 2 3 {$mode delphi}4 2 5 3 interface … … 84 82 destructor TLastOpenedList.Destroy; 85 83 begin 86 Items.Free;84 FreeAndNil(Items); 87 85 inherited; 88 86 end; … … 94 92 begin 95 93 if Assigned(MenuItem) then begin 96 MenuItem.Clear; 94 while MenuItem.Count > Items.Count do 95 MenuItem.Delete(MenuItem.Count - 1); 96 while MenuItem.Count < Items.Count do begin 97 NewMenuItem := TMenuItem.Create(MenuItem); 98 MenuItem.Add(NewMenuItem); 99 end; 97 100 for I := 0 to Items.Count - 1 do begin 98 NewMenuItem := TMenuItem.Create(MenuItem); 99 NewMenuItem.Caption := Items[I]; 100 NewMenuItem.OnClick := ClickAction; 101 MenuItem.Add(NewMenuItem); 101 MenuItem.Items[I].Caption := Items[I]; 102 MenuItem.Items[I].OnClick := ClickAction; 102 103 end; 103 104 end; -
trunk/Packages/Common/UListViewSort.pas
r83 r86 2 2 3 3 // Date: 2019-05-17 4 5 {$mode delphi}6 4 7 5 interface … … 9 7 uses 10 8 {$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; 13 11 14 12 type … … 19 17 TCompareEvent = function (Item1, Item2: TObject): Integer of object; 20 18 TListFilterEvent = procedure (ListViewSort: TListViewSort) of object; 19 20 TObjects = TObjectList<TObject>; 21 21 22 22 { TListViewSort } … … 52 52 {$ENDIF} 53 53 public 54 List: TFPGObjectList<TObject>;55 Source: TFPGObjectList<TObject>;54 Source: TObjects; 55 List: TObjects; 56 56 constructor Create(AOwner: TComponent); override; 57 57 destructor Destroy; override; … … 338 338 ListViewSortCompare: TCompareEvent; 339 339 340 function ListViewCompare(const Item1, Item2: TObject): Integer;340 function ListViewCompare(constref Item1, Item2: TObject): Integer; 341 341 begin 342 342 Result := ListViewSortCompare(Item1, Item2); … … 349 349 ListViewSortCompare := Compare; 350 350 if (List.Count > 0) then 351 List.Sort( ListViewCompare);351 List.Sort(TComparer<TObject>.Construct(ListViewCompare)); 352 352 end; 353 353 … … 355 355 begin 356 356 if Assigned(FOnFilter) then FOnFilter(Self) 357 else if Assigned(Source) then 358 List.Assign(Source) else 357 else if Assigned(Source) then begin 359 358 List.Clear; 359 List.AddRange(Source); 360 end else List.Clear; 360 361 if ListView.Items.Count <> List.Count then 361 362 ListView.Items.Count := List.Count; … … 412 413 begin 413 414 inherited; 414 List := T FPGObjectList<TObject>.Create;415 List. FreeObjects := False;415 List := TObjects.Create; 416 List.OwnsObjects := False; 416 417 end; 417 418 418 419 destructor TListViewSort.Destroy; 419 420 begin 420 List.Free;421 FreeAndNil(List); 421 422 inherited; 422 423 end; -
trunk/Packages/Common/UMemory.pas
r55 r86 1 1 unit UMemory; 2 3 {$mode Delphi}{$H+}4 2 5 3 interface … … 43 41 property Position: Integer read FPosition write FPosition; 44 42 end; 43 45 44 46 45 implementation -
trunk/Packages/Common/UMetaCanvas.pas
r83 r86 1 1 unit UMetaCanvas; 2 2 3 {$mode delphi}4 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, Graphics, Types, fgl;6 Classes, SysUtils, Graphics, Types, Generics.Collections; 9 7 10 8 type … … 19 17 end; 20 18 21 TCanvasObjects = class(T FPGObjectList<TCanvasObject>)19 TCanvasObjects = class(TObjectList<TCanvasObject>) 22 20 end; 23 21 … … 142 140 procedure RoundRect(const Rect: TRect; RX,RY: Integer); overload; 143 141 procedure TextOut(X,Y: Integer; const Text: String); override; 144 procedure Polygon(Points: PPoint; NumPts: Integer; Winding: boolean = False); override;142 procedure Polygon(Points: PPoint; NumPts: Integer; Winding: Boolean = False); override; 145 143 procedure Ellipse(x1, y1, x2, y2: Integer); override; 146 144 procedure StretchDraw(const DestRect: TRect; SrcGraphic: TGraphic); override; … … 502 500 end; 503 501 504 procedure TMetaCanvas.Polygon(Points: PPoint; NumPts: Integer; Winding: boolean502 procedure TMetaCanvas.Polygon(Points: PPoint; NumPts: Integer; Winding: Boolean 505 503 ); 506 504 var … … 508 506 I: Integer; 509 507 begin 508 APoints := nil; 510 509 SetLength(APoints, NumPts); 511 510 for I := 0 to High(APoints) do -
trunk/Packages/Common/UPersistentForm.pas
r69 r86 1 1 unit UPersistentForm; 2 3 {$mode delphi}4 2 5 3 // Date: 2020-11-26 … … 318 316 Form.RestoredHeight); 319 317 FormWindowState := Form.WindowState; 318 Form.WindowState := wsNormal; 320 319 ShowWindow(Form.Handle, SW_SHOWFULLSCREEN); 321 320 {$IFDEF WINDOWS} -
trunk/Packages/Common/UPixelPointer.pas
r83 r86 59 59 function Color32ToColor(Color: TColor32): TColor; 60 60 function ColorToColor32(Color: TColor): TColor32; 61 61 62 62 63 implementation -
trunk/Packages/Common/UPool.pas
r55 r86 1 1 unit UPool; 2 2 3 {$mode Delphi}{$H+}4 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, syncobjs, fgl, UThreading;6 Classes, SysUtils, syncobjs, Generics.Collections, UThreading; 9 7 10 8 type … … 22 20 function NewItemObject: TObject; virtual; 23 21 public 24 Items: T FPGObjectList<TObject>;25 FreeItems: T FPGObjectList<TObject>;22 Items: TObjectList<TObject>; 23 FreeItems: TObjectList<TObject>; 26 24 function Acquire: TObject; virtual; 27 25 procedure Release(Item: TObject); virtual; … … 185 183 begin 186 184 inherited; 187 Items := T FPGObjectList<TObject>.Create;188 FreeItems := T FPGObjectList<TObject>.Create;189 FreeItems. FreeObjects := False;185 Items := TObjectList<TObject>.Create; 186 FreeItems := TObjectList<TObject>.Create; 187 FreeItems.OwnsObjects := False; 190 188 FReleaseEvent := TEvent.Create(nil, False, False, ''); 191 189 end; -
trunk/Packages/Common/UPrefixMultiplier.pas
r55 r86 2 2 3 3 // Date: 2010-06-01 4 5 {$mode delphi}6 4 7 5 interface -
trunk/Packages/Common/URegistry.pas
r58 r86 1 1 unit URegistry; 2 3 {$MODE delphi}4 2 5 3 interface … … 48 46 HKEY_CURRENT_CONFIG, HKEY_DYN_DATA); 49 47 48 50 49 implementation 51 52 50 53 51 { TRegistryContext } … … 132 130 function TRegistryEx.OpenKey(const Key: string; CanCreate: Boolean): Boolean; 133 131 begin 134 {$IFDEF Linux}132 {$IFDEF UNIX} 135 133 //CloseKey; 136 134 {$ENDIF} … … 140 138 function TRegistryEx.GetCurrentContext: TRegistryContext; 141 139 begin 142 Result.Key := CurrentPath;140 Result.Key := String(CurrentPath); 143 141 Result.RootKey := RootKey; 144 142 end; -
trunk/Packages/Common/UResetableThread.pas
r55 r86 1 1 unit UResetableThread; 2 3 {$mode Delphi}{$H+}4 2 5 3 interface -
trunk/Packages/Common/UScaleDPI.pas
r83 r86 3 3 { See: http://wiki.lazarus.freepascal.org/High_DPI } 4 4 5 {$mode delphi}{$H+}6 7 5 interface 8 6 9 7 uses 10 Classes, Forms, Graphics, Controls, ComCtrls, LCLType, SysUtils, StdCtrls,11 Contnrs;8 Classes, Forms, Graphics, Controls, ComCtrls, LCLType, SysUtils, 9 Generics.Collections; 12 10 13 11 type 12 TControlDimensions = class; 14 13 15 14 { TControlDimension } … … 18 17 BoundsRect: TRect; 19 18 FontHeight: Integer; 20 Controls: T ObjectList; // TList<TControlDimension>19 Controls: TControlDimensions; 21 20 // Class specifics 22 21 ButtonSize: TPoint; // TToolBar … … 26 25 constructor Create; 27 26 destructor Destroy; override; 27 end; 28 29 TControlDimensions = class(TObjectList<TControlDimension>) 28 30 end; 29 31 … … 73 75 constructor TControlDimension.Create; 74 76 begin 75 Controls := T ObjectList.Create;77 Controls := TControlDimensions.Create; 76 78 end; 77 79 … … 79 81 begin 80 82 FreeAndNil(Controls); 81 inherited Destroy;83 inherited; 82 84 end; 83 85 … … 212 214 TempBmp: TBitmap; 213 215 Temp: array of TBitmap; 214 NewWidth, NewHeight: integer; 216 NewWidth: Integer; 217 NewHeight: Integer; 215 218 I: Integer; 216 219 begin 217 220 ImgList.BeginUpdate; 218 NewWidth := ScaleX(ImgList.Width, FromDPI.X); 219 NewHeight := ScaleY(ImgList.Height, FromDPI.Y); 220 221 SetLength(Temp, ImgList.Count); 222 for I := 0 to ImgList.Count - 1 do 223 begin 224 TempBmp := TBitmap.Create; 225 TempBmp.PixelFormat := pf32bit; 226 ImgList.GetBitmap(I, TempBmp); 227 Temp[I] := TBitmap.Create; 228 Temp[I].SetSize(NewWidth, NewHeight); 229 {$IFDEF Linux} 230 Temp[I].PixelFormat := pf24bit; 231 {$ELSE} 232 Temp[I].PixelFormat := pf32bit; 233 {$ENDIF} 234 Temp[I].TransparentColor := TempBmp.TransparentColor; 235 //Temp[I].TransparentMode := TempBmp.TransparentMode; 236 Temp[I].Transparent := True; 237 Temp[I].Canvas.Brush.Style := bsSolid; 238 Temp[I].Canvas.Brush.Color := Temp[I].TransparentColor; 239 Temp[I].Canvas.FillRect(0, 0, Temp[I].Width, Temp[I].Height); 240 241 if (Temp[I].Width = 0) or (Temp[I].Height = 0) then Continue; 242 Temp[I].Canvas.StretchDraw(Rect(0, 0, Temp[I].Width, Temp[I].Height), TempBmp); 243 TempBmp.Free; 244 end; 245 246 ImgList.Clear; 247 ImgList.Width := NewWidth; 248 ImgList.Height := NewHeight; 249 250 for I := 0 to High(Temp) do 251 begin 252 ImgList.Add(Temp[I], nil); 253 Temp[i].Free; 254 end; 255 ImgList.EndUpdate; 221 try 222 NewWidth := ScaleX(ImgList.Width, FromDPI.X); 223 NewHeight := ScaleY(ImgList.Height, FromDPI.Y); 224 225 Temp := nil; 226 SetLength(Temp, ImgList.Count); 227 for I := 0 to ImgList.Count - 1 do 228 begin 229 TempBmp := TBitmap.Create; 230 try 231 TempBmp.PixelFormat := pf32bit; 232 ImgList.GetBitmap(I, TempBmp); 233 Temp[I] := TBitmap.Create; 234 Temp[I].SetSize(NewWidth, NewHeight); 235 {$IFDEF UNIX} 236 Temp[I].PixelFormat := pf24bit; 237 {$ELSE} 238 Temp[I].PixelFormat := pf32bit; 239 {$ENDIF} 240 Temp[I].TransparentColor := TempBmp.TransparentColor; 241 //Temp[I].TransparentMode := TempBmp.TransparentMode; 242 Temp[I].Transparent := True; 243 Temp[I].Canvas.Brush.Style := bsSolid; 244 Temp[I].Canvas.Brush.Color := Temp[I].TransparentColor; 245 Temp[I].Canvas.FillRect(0, 0, Temp[I].Width, Temp[I].Height); 246 247 if (Temp[I].Width = 0) or (Temp[I].Height = 0) then Continue; 248 Temp[I].Canvas.StretchDraw(Rect(0, 0, Temp[I].Width, Temp[I].Height), TempBmp); 249 finally 250 TempBmp.Free; 251 end; 252 end; 253 254 ImgList.Clear; 255 ImgList.Width := NewWidth; 256 ImgList.Height := NewHeight; 257 258 for I := 0 to High(Temp) do 259 begin 260 ImgList.Add(Temp[I], nil); 261 Temp[i].Free; 262 end; 263 finally 264 ImgList.EndUpdate; 265 end; 256 266 end; 257 267 … … 331 341 with TCoolBar(Control) do begin 332 342 BeginUpdate; 333 for I := 0 to Bands.Count - 1 do 334 with Bands[I] do begin 335 MinWidth := ScaleX(MinWidth, FromDPI.X); 336 MinHeight := ScaleY(MinHeight, FromDPI.Y); 337 // Workaround to bad band width auto sizing 338 //Width := ScaleX(Width, FromDPI.X); 339 Width := ScaleX(Control.Width + 28, FromDPI.X); 340 //Control.Invalidate; 343 try 344 for I := 0 to Bands.Count - 1 do 345 with Bands[I] do begin 346 MinWidth := ScaleX(MinWidth, FromDPI.X); 347 MinHeight := ScaleY(MinHeight, FromDPI.Y); 348 // Workaround to bad band width auto sizing 349 //Width := ScaleX(Width, FromDPI.X); 350 Width := ScaleX(Control.Width + 28, FromDPI.X); 351 //Control.Invalidate; 352 end; 353 // Workaround for bad autosizing of coolbar 354 if AutoSize then begin 355 AutoSize := False; 356 Height := ScaleY(Height, FromDPI.Y); 357 AutoSize := True; 341 358 end; 342 // Workaround for bad autosizing of coolbar 343 if AutoSize then begin 344 AutoSize := False; 345 Height := ScaleY(Height, FromDPI.Y); 346 AutoSize := True; 347 end; 348 EndUpdate; 359 finally 360 EndUpdate; 361 end; 349 362 end; 350 363 -
trunk/Packages/Common/UStringTable.pas
r55 r86 1 1 unit UStringTable; 2 3 {$mode objfpc}{$H+}4 2 5 3 interface -
trunk/Packages/Common/USyncCounter.pas
r55 r86 1 1 unit USyncCounter; 2 3 {$mode delphi}4 2 5 3 interface … … 25 23 procedure Assign(Source: TSyncCounter); 26 24 end; 25 27 26 28 27 implementation -
trunk/Packages/Common/UTheme.pas
r83 r86 5 5 uses 6 6 Classes, SysUtils, Graphics, ComCtrls, Controls, ExtCtrls, Menus, StdCtrls, 7 Spin, Forms, fgl, Grids;7 Spin, Forms, Generics.Collections, Grids; 8 8 9 9 type … … 19 19 { TThemes } 20 20 21 TThemes = class(T FPGObjectList<TTheme>)21 TThemes = class(TObjectList<TTheme>) 22 22 function AddNew(Name: string): TTheme; 23 23 function FindByName(Name: string): TTheme; … … 42 42 end; 43 43 44 const 45 ThemeNameSystem = 'System'; 46 ThemeNameLight = 'Light'; 47 ThemeNameDark = 'Dark'; 48 44 49 procedure Register; 50 45 51 46 52 implementation … … 105 111 inherited; 106 112 Themes := TThemes.Create; 107 with Themes.AddNew( 'System') do begin113 with Themes.AddNew(ThemeNameSystem) do begin 108 114 ColorWindow := clWindow; 109 115 ColorWindowText := clWindowText; … … 113 119 end; 114 120 Theme := TTheme(Themes.First); 115 with Themes.AddNew( 'Dark') do begin121 with Themes.AddNew(ThemeNameDark) do begin 116 122 ColorWindow := RGBToColor($20, $20, $20); 117 123 ColorWindowText := clWhite; … … 120 126 ColorControlSelected := RGBToColor(96, 125, 155); 121 127 end; 122 with Themes.AddNew( 'Light') do begin128 with Themes.AddNew(ThemeNameLight) do begin 123 129 ColorWindow := clWhite; 124 130 ColorWindowText := clBlack; … … 175 181 procedure TThemeManager.UseTheme(Form: TForm); 176 182 begin 177 if not Used and (FTheme.Name = 'System') then Exit;183 if not Used and (FTheme.Name = ThemeNameSystem) then Exit; 178 184 ApplyTheme(Form); 179 185 Used := True; -
trunk/Packages/Common/UThreading.pas
r83 r86 1 1 unit UThreading; 2 2 3 {$mode delphi}4 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, Forms, fgl, SyncObjs;6 Classes, SysUtils, Forms, Generics.Collections, SyncObjs; 9 7 10 8 type 11 9 TExceptionEvent = procedure (Sender: TObject; E: Exception) of object; 12 10 TMethodCall = procedure of object; 13 14 11 15 12 { TVirtualThread } … … 102 99 { TThreadList } 103 100 104 TThreadList = class(T FPGObjectList<TVirtualThread>)101 TThreadList = class(TObjectList<TVirtualThread>) 105 102 function FindById(Id: TThreadID): TVirtualThread; 106 103 constructor Create; virtual; … … 361 358 ThreadListLock := TCriticalSection.Create; 362 359 ThreadList := TThreadList.Create; 363 ThreadList. FreeObjects := False;360 ThreadList.OwnsObjects := False; 364 361 365 362 finalization -
trunk/Packages/Common/UTranslator.pas
r83 r86 1 1 unit UTranslator; 2 2 3 {$mode delphi}{$H+}4 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, Forms, ExtCtrls, Controls, fgl,LazFileUtils, LazUTF8,6 Classes, SysUtils, Forms, ExtCtrls, Controls, LazFileUtils, LazUTF8, 9 7 Translations, TypInfo, Dialogs, FileUtil, LCLProc, ULanguages, LCLType, 10 LCLVersion ;8 LCLVersion, Generics.Collections; 11 9 12 10 type 13 11 THandleStringEvent = function (AValue: string): string of object; 14 12 15 TPoFiles = class(T FPGObjectList<TPOFile>)13 TPoFiles = class(TObjectList<TPOFile>) 16 14 end; 17 15 … … 27 25 { TComponentExcludesList } 28 26 29 TComponentExcludesList = class(T FPGObjectList<TComponentExcludes>)27 TComponentExcludesList = class(TObjectList<TComponentExcludes>) 30 28 function FindByClassType(AClassType: TClass): TComponentExcludes; 31 29 procedure DumpToStrings(Strings: TStrings); … … 290 288 Item := Component.ClassType; 291 289 while Assigned(Item) do begin 292 //ShowMessage(Component.Name + ', ' + Component.ClassName + ', ' + Item.ClassName + ', ' + PropertyName);293 290 Excludes := ComponentExcludes.FindByClassType(Item.ClassType); 294 291 if Assigned(Excludes) then begin -
trunk/Packages/Common/UURI.pas
r55 r86 2 2 3 3 // Date: 2011-04-04 4 5 {$mode delphi}6 4 7 5 interface … … 84 82 property AsString: string read GetAsString write SetAsString; 85 83 end; 84 86 85 87 86 implementation -
trunk/Packages/Common/UXMLUtils.pas
r55 r86 1 1 unit UXMLUtils; 2 3 {$mode delphi}4 2 5 3 interface
Note:
See TracChangeset
for help on using the changeset viewer.