- Timestamp:
- Jun 13, 2011, 8:00:17 AM (13 years ago)
- Location:
- Common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/UCommon.pas
r245 r250 36 36 function TryHexToInt(Data: string; var Value: Integer): Boolean; 37 37 function TryBinToInt(Data: string; var Value: Integer): Boolean; 38 function BinToHexString(Source: AnsiString): string; 38 39 //function DelTree(DirName : string): Boolean; 39 40 //function GetSpecialFolderPath(Folder: Integer): string; … … 57 58 implementation 58 59 60 function BinToHexString(Source: AnsiString): string; 61 var 62 I: Integer; 63 begin 64 for I := 1 to Length(Source) do begin 65 Result := Result + LowerCase(IntToHex(Ord(Source[I]), 2)); 66 end; 67 end; 68 69 59 70 procedure DeleteFiles(APath, AFileSpec: string); 60 71 var -
Common/UDebugLog.pas
r118 r250 21 21 { TDebugLog } 22 22 23 TDebugLog = class 23 TDebugLog = class(TComponent) 24 24 private 25 FFileName: string; 25 26 FOnNewItem: TNewItemEvent; 26 27 public 27 FileName: string;28 28 WriteToFileEnable: Boolean; 29 29 Items: TThreadList; … … 32 32 procedure WriteToFile(Text: string); 33 33 property OnNewItem: TNewItemEvent read FOnNewItem write FOnNewItem; 34 constructor Create ;34 constructor Create(AOwner: TComponent); override; 35 35 destructor Destroy; override; 36 published 37 property FileName: string read FFileName write FFileName; 36 38 end; 37 39 … … 85 87 end; 86 88 87 constructor TDebugLog.Create ;89 constructor TDebugLog.Create(AOwner: TComponent); 88 90 begin 91 inherited; 89 92 Items := TThreadList.Create; 90 93 MaxCount := 100; … … 105 108 end; 106 109 107 initialization108 109 DebugLog := TDebugLog.Create;110 111 finalization112 113 DebugLog.Free;114 115 110 end. 116 111
Note:
See TracChangeset
for help on using the changeset viewer.