Changeset 129
- Timestamp:
- Jan 17, 2011, 6:55:36 AM (14 years ago)
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/UCommon.pas
r123 r129 4 4 5 5 uses 6 Windows, Classes, SysUtils, SpecializedList ; //, ShFolder, ShellAPI;6 Windows, Classes, SysUtils, SpecializedList, StrUtils; //, ShFolder, ShellAPI; 7 7 8 8 type 9 9 TArrayOfByte = array of Byte; 10 10 TArrayOfString = array of string; 11 TExceptionEvent = procedure(Sender: TObject; E: Exception) of object; 11 12 12 13 TUserNameFormat = ( … … 22 23 unfDNSDomainName = 11); 23 24 25 var 26 ExceptionHandler: TExceptionEvent; 24 27 25 28 function IntToBin(Data: Cardinal; Count: Byte): string; … … 38 41 procedure SetBit(var Variable: Word; Index: Byte; State: Boolean); 39 42 function AddLeadingZeroes(const aNumber, Length : integer) : string; 43 function LastPos(const SubStr: String; const S: String): Integer; 40 44 41 45 implementation … … 65 69 end;*) 66 70 71 function LastPos(const SubStr: String; const S: String): Integer; 72 begin 73 Result := Pos(ReverseString(SubStr), ReverseString(S)); 74 if (Result <> 0) then 75 Result := ((Length(S) - Length(SubStr)) + 1) - Result + 1; 76 end; 77 67 78 function BCDToInt(Value: Byte): Byte; 68 79 begin -
CoolStreaming/Demo/BitStream/BitStreamTest.lpi
r122 r129 42 42 </Item2> 43 43 </RequiredPackages> 44 <Units Count=" 5">44 <Units Count="6"> 45 45 <Unit0> 46 46 <Filename Value="BitStreamTest.lpr"/> 47 47 <IsPartOfProject Value="True"/> 48 48 <UnitName Value="BitStreamTest"/> 49 <EditorIndex Value=" 1"/>49 <EditorIndex Value="2"/> 50 50 <WindowIndex Value="0"/> 51 51 <TopLine Value="1"/> … … 64 64 <EditorIndex Value="0"/> 65 65 <WindowIndex Value="0"/> 66 <TopLine Value="1 "/>67 <CursorPos X=" 3" Y="18"/>66 <TopLine Value="132"/> 67 <CursorPos X="1" Y="150"/> 68 68 <UsageCount Value="20"/> 69 69 <Loaded Value="True"/> … … 83 83 <Filename Value="E:\Programy\Lazarus\lcl\controls.pp"/> 84 84 <UnitName Value="Controls"/> 85 <EditorIndex Value=" 2"/>85 <EditorIndex Value="3"/> 86 86 <WindowIndex Value="0"/> 87 87 <TopLine Value="1207"/> … … 98 98 <UsageCount Value="10"/> 99 99 </Unit4> 100 <Unit5> 101 <Filename Value="E:\Programy\Lazarus\fpc\2.4.3\source\rtl\objpas\sysutils\sysutilh.inc"/> 102 <EditorIndex Value="1"/> 103 <WindowIndex Value="0"/> 104 <TopLine Value="84"/> 105 <CursorPos X="79" Y="89"/> 106 <UsageCount Value="10"/> 107 <Loaded Value="True"/> 108 </Unit5> 100 109 </Units> 101 <JumpHistory Count="30" HistoryIndex="2 8">110 <JumpHistory Count="30" HistoryIndex="29"> 102 111 <Position1> 103 112 <Filename Value="UMainForm.pas"/> 104 <Caret Line="9 5" Column="1" TopLine="85"/>113 <Caret Line="99" Column="1" TopLine="85"/> 105 114 </Position1> 106 115 <Position2> 107 116 <Filename Value="UMainForm.pas"/> 108 <Caret Line=" 98" Column="1" TopLine="85"/>117 <Caret Line="101" Column="1" TopLine="85"/> 109 118 </Position2> 110 119 <Position3> 111 120 <Filename Value="UMainForm.pas"/> 112 <Caret Line="9 9" Column="1" TopLine="85"/>121 <Caret Line="94" Column="1" TopLine="85"/> 113 122 </Position3> 114 123 <Position4> 115 124 <Filename Value="UMainForm.pas"/> 116 <Caret Line="9 2" Column="13" TopLine="85"/>125 <Caret Line="95" Column="1" TopLine="85"/> 117 126 </Position4> 118 127 <Position5> 119 128 <Filename Value="UMainForm.pas"/> 120 <Caret Line="9 9" Column="1" TopLine="85"/>129 <Caret Line="98" Column="1" TopLine="85"/> 121 130 </Position5> 122 131 <Position6> 123 132 <Filename Value="UMainForm.pas"/> 124 <Caret Line=" 101" Column="1" TopLine="85"/>133 <Caret Line="99" Column="1" TopLine="85"/> 125 134 </Position6> 126 135 <Position7> 127 136 <Filename Value="UMainForm.pas"/> 128 <Caret Line=" 94" Column="1" TopLine="85"/>137 <Caret Line="101" Column="1" TopLine="85"/> 129 138 </Position7> 130 139 <Position8> 131 140 <Filename Value="UMainForm.pas"/> 132 <Caret Line="9 5" Column="1" TopLine="85"/>141 <Caret Line="94" Column="1" TopLine="85"/> 133 142 </Position8> 134 143 <Position9> 135 144 <Filename Value="UMainForm.pas"/> 136 <Caret Line="9 8" Column="1" TopLine="85"/>145 <Caret Line="95" Column="1" TopLine="85"/> 137 146 </Position9> 138 147 <Position10> … … 142 151 <Position11> 143 152 <Filename Value="UMainForm.pas"/> 144 <Caret Line="1 01" Column="1" TopLine="85"/>153 <Caret Line="119" Column="27" TopLine="109"/> 145 154 </Position11> 146 155 <Position12> 147 156 <Filename Value="UMainForm.pas"/> 148 <Caret Line="9 4" Column="1" TopLine="85"/>157 <Caret Line="99" Column="32" TopLine="78"/> 149 158 </Position12> 150 159 <Position13> 151 160 <Filename Value="UMainForm.pas"/> 152 <Caret Line="9 5" Column="1" TopLine="85"/>161 <Caret Line="98" Column="29" TopLine="78"/> 153 162 </Position13> 154 163 <Position14> 155 164 <Filename Value="UMainForm.pas"/> 156 <Caret Line=" 99" Column="1" TopLine="85"/>165 <Caret Line="102" Column="14" TopLine="78"/> 157 166 </Position14> 158 167 <Position15> 159 <Filename Value=" UMainForm.pas"/>160 <Caret Line="1 19" Column="27" TopLine="109"/>168 <Filename Value="BitStreamTest.lpr"/> 169 <Caret Line="19" Column="1" TopLine="1"/> 161 170 </Position15> 162 171 <Position16> 163 172 <Filename Value="UMainForm.pas"/> 164 <Caret Line=" 99" Column="32" TopLine="78"/>173 <Caret Line="101" Column="12" TopLine="85"/> 165 174 </Position16> 166 175 <Position17> 167 176 <Filename Value="UMainForm.pas"/> 168 <Caret Line=" 98" Column="29" TopLine="78"/>177 <Caret Line="111" Column="49" TopLine="111"/> 169 178 </Position17> 170 179 <Position18> 171 180 <Filename Value="UMainForm.pas"/> 172 <Caret Line=" 102" Column="14" TopLine="78"/>181 <Caret Line="24" Column="59" TopLine="23"/> 173 182 </Position18> 174 183 <Position19> 175 <Filename Value=" BitStreamTest.lpr"/>176 <Caret Line=" 19" Column="1" TopLine="1"/>184 <Filename Value="UMainForm.pas"/> 185 <Caret Line="58" Column="21" TopLine="45"/> 177 186 </Position19> 178 187 <Position20> 179 188 <Filename Value="UMainForm.pas"/> 180 <Caret Line=" 101" Column="12" TopLine="85"/>189 <Caret Line="72" Column="9" TopLine="59"/> 181 190 </Position20> 182 191 <Position21> 183 <Filename Value=" UMainForm.pas"/>184 <Caret Line="1 11" Column="49" TopLine="111"/>192 <Filename Value="BitStreamTest.lpr"/> 193 <Caret Line="19" Column="1" TopLine="1"/> 185 194 </Position21> 186 195 <Position22> 187 <Filename Value=" UMainForm.pas"/>188 <Caret Line=" 24" Column="59" TopLine="23"/>196 <Filename Value="BitStreamTest.lpr"/> 197 <Caret Line="18" Column="29" TopLine="1"/> 189 198 </Position22> 190 199 <Position23> 191 200 <Filename Value="UMainForm.pas"/> 192 <Caret Line=" 58" Column="21" TopLine="45"/>201 <Caret Line="89" Column="23" TopLine="80"/> 193 202 </Position23> 194 203 <Position24> 195 204 <Filename Value="UMainForm.pas"/> 196 <Caret Line=" 72" Column="9" TopLine="59"/>205 <Caret Line="15" Column="1" TopLine="3"/> 197 206 </Position24> 198 207 <Position25> 199 <Filename Value=" BitStreamTest.lpr"/>200 <Caret Line=" 19" Column="1" TopLine="1"/>208 <Filename Value="UMainForm.pas"/> 209 <Caret Line="56" Column="11" TopLine="44"/> 201 210 </Position25> 202 211 <Position26> 203 <Filename Value=" BitStreamTest.lpr"/>204 <Caret Line=" 18" Column="29" TopLine="1"/>212 <Filename Value="UMainForm.pas"/> 213 <Caret Line="76" Column="3" TopLine="69"/> 205 214 </Position26> 206 215 <Position27> 207 216 <Filename Value="UMainForm.pas"/> 208 <Caret Line=" 89" Column="23" TopLine="80"/>217 <Caret Line="15" Column="7" TopLine="3"/> 209 218 </Position27> 210 219 <Position28> 211 220 <Filename Value="UMainForm.pas"/> 212 <Caret Line="1 5" Column="1" TopLine="3"/>221 <Caret Line="11" Column="1" TopLine="1"/> 213 222 </Position28> 214 223 <Position29> 215 224 <Filename Value="UMainForm.pas"/> 216 <Caret Line=" 56" Column="11" TopLine="44"/>225 <Caret Line="124" Column="53" TopLine="112"/> 217 226 </Position29> 218 227 <Position30> 219 228 <Filename Value="UMainForm.pas"/> 220 <Caret Line=" 22" Column="15" TopLine="10"/>229 <Caret Line="143" Column="50" TopLine="131"/> 221 230 </Position30> 222 231 </JumpHistory> -
CoolStreaming/Demo/BitStream/UMainForm.pas
r122 r129 9 9 UBitStream; 10 10 11 const12 Symbols: array[0..1] of Char = ('.', '#');13 14 11 type 15 TByteArray = array of Byte; 16 12 TArrayOfByte = array of Byte; 17 13 18 14 { TMainForm } … … 23 19 private 24 20 procedure PrintBitStream(Stream: TBitStream; StringList: TStrings); 25 procedure PrintData(Data: T ByteArray; Count: Integer; StringList: TStrings);21 procedure PrintData(Data: TArrayOfByte; Count: Integer; StringList: TStrings); 26 22 procedure PrintStream(Stream: TStream; StringList: TStrings); 27 { private declarations }28 23 public 29 { public declarations }30 24 end; 31 25 … … 48 42 WindowState := wsMaximized; 49 43 50 with Memo1, Lines do begin 51 BitStream := TMemoryBitStream.Create; 52 BitStream2 := TMemoryBitStream.Create; 53 SetLength(Buffer, 4); 54 Buffer[0] := $12; 55 Buffer[1] := $34; 56 Buffer[2] := $56; 57 Buffer[3] := $78; 58 Add('Source data:'); 59 PrintData(Buffer, Length(Buffer) * 8, Lines); 44 with Memo1, Lines do try 45 BeginUpdate; 46 BitStream := TMemoryBitStream.Create; 47 BitStream2 := TMemoryBitStream.Create; 48 SetLength(Buffer, 4); 49 Buffer[0] := $12; 50 Buffer[1] := $34; 51 Buffer[2] := $56; 52 Buffer[3] := $78; 53 Add('Source data:'); 54 PrintData(Buffer, Length(Buffer) * 8, Lines); 60 55 61 BitStream.Write(Buffer[0], 28);62 Add('Write data to stream:');63 PrintBitStream(BitStream, Lines);64 // Write second bit array after first which lead to store data as shifted65 BitStream.Write(Buffer[0], 28);66 Add('Append shifted data to stream:');67 PrintBitStream(BitStream, Lines);56 BitStream.Write(Buffer[0], 28); 57 Add('Write data to stream:'); 58 PrintBitStream(BitStream, Lines); 59 // Write second bit array after first which lead to store data as shifted 60 BitStream.Write(Buffer[0], 28); 61 Add('Append shifted data to stream:'); 62 PrintBitStream(BitStream, Lines); 68 63 69 // Read test of sub bit array70 BitStream.Position := 1;71 BitStream.Read(Buffer[0], 32);72 Add('Read bit data part:');73 PrintData(Buffer, Length(Buffer) * 8, Lines);64 // Read test of sub bit array 65 BitStream.Position := 1; 66 BitStream.Read(Buffer[0], 32); 67 Add('Read bit data part:'); 68 PrintData(Buffer, Length(Buffer) * 8, Lines); 74 69 75 (* // Test stream copy 76 Add('Copy bit block to another stream:'); 77 for I := 0 to BitStream.Size do begin 78 BitStream.Position := I; 79 BitStream2.Size := 0; 80 BitStream2.CopyFrom(BitStream, BitStream.Size); 81 PrintBitStream(BitStream2, Lines); 82 end; 83 for I := 0 to BitStream.Size do begin 84 BitStream.Position := 0; 85 BitStream2.Size := 0; 86 BitStream2.Position := I; 87 BitStream2.CopyFrom(BitStream, BitStream.Size); 88 PrintBitStream(BitStream2, Lines); 89 end; *) 90 91 Add('Bit copy of substreams'); 92 SetLength(Buffer, 1000); 93 for Y := 1 to BitStream.Size do begin 94 Add('Size: ' + IntToStr(Y)); 95 for I := 0 to BitStream.Size - Y do begin 70 (* // Test stream copy 71 Add('Copy bit block to another stream:'); 72 for I := 0 to BitStream.Size do begin 96 73 BitStream.Position := I; 97 74 BitStream2.Size := 0; 98 //BitStream2.CopyFrom(BitStream, Y); 99 //PrintBitStream(BitStream2, Lines); 100 SetLength(Buffer, 1000); 101 C := BitStream.Read(Buffer[0], Y); 102 SetLength(Buffer, C div 8 + 1); 103 PrintData(Buffer, C, Lines); 75 BitStream2.CopyFrom(BitStream, BitStream.Size); 76 PrintBitStream(BitStream2, Lines); 104 77 end; 105 Add(''); 106 end; 78 for I := 0 to BitStream.Size do begin 79 BitStream.Position := 0; 80 BitStream2.Size := 0; 81 BitStream2.Position := I; 82 BitStream2.CopyFrom(BitStream, BitStream.Size); 83 PrintBitStream(BitStream2, Lines); 84 end; *) 107 85 108 BitStream.Destroy; 109 BitStream2.Destroy; 86 Add('Bit copy of substreams'); 87 SetLength(Buffer, 1000); 88 for Y := 1 to BitStream.Size do begin 89 Add('Size: ' + IntToStr(Y)); 90 for I := 0 to BitStream.Size - Y do begin 91 BitStream.Position := I; 92 BitStream2.Size := 0; 93 //BitStream2.CopyFrom(BitStream, Y); 94 //PrintBitStream(BitStream2, Lines); 95 SetLength(Buffer, 1000); 96 C := BitStream.Read(Buffer[0], Y); 97 SetLength(Buffer, C div 8 + 1); 98 PrintData(Buffer, C, Lines); 99 end; 100 Add(''); 101 end; 102 finally 103 BitStream.Free; 104 BitStream2.Free; 105 EndUpdate; 110 106 end; 111 107 end; 112 108 113 procedure TMainForm.PrintData(Data: T ByteArray; Count: Integer; StringList: TStrings);109 procedure TMainForm.PrintData(Data: TArrayOfByte; Count: Integer; StringList: TStrings); 114 110 var 115 111 I: Integer; … … 124 120 for B := 0 to 7 do begin 125 121 if ((I * 8) + B) >= Count then Break; 126 Line := Line + Symbols[(OneByte shr B) and 1];122 Line := Line + IntToStr((OneByte shr B) and 1); 127 123 end; 128 124 end; … … 143 139 Data := Stream.ReadByte; 144 140 for B := 0 to 7 do 145 Line := Line + Symbols[(Data shr B) and 1];141 Line := Line + IntToStr((Data shr B) and 1); 146 142 end; 147 143 StringList.Add(Line); … … 150 146 151 147 procedure TMainForm.PrintBitStream(Stream: TBitStream; StringList: TStrings); 152 var153 I: Integer;154 Line: string;155 148 begin 156 Stream.Position := 0; 157 for I := 0 to Stream.Size - 1 do 158 Line := Line + Symbols[Integer(Stream.ReadBit)]; 159 StringList.Add(Line); 160 //StringList.Add(''); 149 StringList.Add(Stream.AsString); 161 150 end; 162 151 -
Docking/CoolDocking/UCoolDockStyleTabs.pas
r114 r129 147 147 OnChange := TabControlChange; 148 148 PopupMenu := TCoolDockManager(Manager).PopupMenu; 149 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseLeave := TabControlMouseLeave;150 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseDown := TabControlMouseDown;151 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseUp := TabControlMouseUp;149 //TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseLeave := TabControlMouseLeave; 150 //TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseDown := TabControlMouseDown; 151 //TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseUp := TabControlMouseUp; 152 152 OnMouseUp := TabControlMouseUp; 153 153 Images := TabImageList; -
ExceptionLogger/UExceptionForm.pas
r40 r129 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 CustomLineInfo, Spin, ComCtrls, Contnrs, UStackTrace;9 CustomLineInfo, ComCtrls, UStackTrace; 10 10 11 11 type -
Generics/TemplateGenerics/Generic/GenericList.inc
r114 r129 110 110 function TGList.Get(Index: TGListIndex): TGListItem; 111 111 begin 112 if (Index < 0) or (Index >= Count) then 113 raise EListError.CreateFmt(SListIndexError, [Index]); 112 114 Result := FItems[Index]; 113 115 end; … … 115 117 procedure TGList.Put(Index: TGListIndex; const AValue: TGListItem); 116 118 begin 119 if (Index < 0) or (Index >= Count) then 120 raise EListError.CreateFmt(SListIndexError, [Index]); 117 121 FItems[Index] := AValue; 118 122 end; … … 175 179 I := 0; 176 180 while I < Count do begin 177 Items[I] := Source[I];181 FItems[I] := Source[I]; 178 182 I := I + 1; 179 183 end; … … 247 251 raise EListError.CreateFmt(SListIndexError, [0]) 248 252 else 249 Result := Items[FCount - 1];253 Result := FItems[FCount - 1]; 250 254 end; 251 255 … … 255 259 raise EListError.CreateFmt(SListIndexError, [0]) 256 260 else 257 Items[FCount - 1] := AValue;261 FItems[FCount - 1] := AValue; 258 262 end; 259 263 … … 263 267 raise EListError.CreateFmt(SListIndexError, [0]) 264 268 else 265 Result := Items[0];269 Result := FItems[0]; 266 270 end; 267 271 … … 271 275 raise EListError.CreateFmt(SListIndexError, [0]) 272 276 else 273 Items[0] := AValue;277 FItems[0] := AValue; 274 278 end; 275 279 … … 401 405 I := 0; 402 406 while I < Count do begin 403 Result := Result + Converter( Items[I]);407 Result := Result + Converter(FItems[I]); 404 408 if I < (Count - 1) then 405 409 Result := Result + Separator; … … 469 473 I := Start; 470 474 while I < Count do begin 471 Items[I] := Value;475 FItems[I] := Value; 472 476 I := I + 1; 473 477 end; -
Generics/TemplateGenerics/Specialized/SpecializedList.pas
r112 r129 19 19 {$DEFINE TGListFromStringConverter := TListIntegerFromStringConverter} 20 20 {$DEFINE TGListItemArray := TListIntegerItemArray} 21 {$DEFINE INTERFACE} 22 {$I 'GenericList.inc'} 23 24 // TListBoolean<Integer, Boolean> 25 {$DEFINE TGListIndex := Integer} 26 {$DEFINE TGListItem := Boolean} 27 {$DEFINE TGList := TListBoolean} 28 {$DEFINE TGListSortCompare := TListBooleanSortCompare} 29 {$DEFINE TGListToStringConverter := TListBooleanToStringConverter} 30 {$DEFINE TGListFromStringConverter := TListBooleanFromStringConverter} 31 {$DEFINE TGListItemArray := TListBooleanItemArray} 21 32 {$DEFINE INTERFACE} 22 33 {$I 'GenericList.inc'} … … 148 159 149 160 // TListSmallInt<Integer, SmallInt> 150 {$DEFINE TGListIndex :=Integer}151 {$DEFINE TGListItem :=SmallInt}152 {$DEFINE TGList :=TListSmallInt}153 {$DEFINE TGListSortCompare :=TListSmallIntSortCompare}154 {$DEFINE TGListToStringConverter :=TListSmallIntToStringConverter}155 {$DEFINE TGListFromStringConverter :=TListSmallIntFromStringConverter}161 {$DEFINE TGListIndex := Integer} 162 {$DEFINE TGListItem := SmallInt} 163 {$DEFINE TGList := TListSmallInt} 164 {$DEFINE TGListSortCompare := TListSmallIntSortCompare} 165 {$DEFINE TGListToStringConverter := TListSmallIntToStringConverter} 166 {$DEFINE TGListFromStringConverter := TListSmallIntFromStringConverter} 156 167 {$DEFINE TGListItemArray := TListSmallIntItemArray} 168 {$DEFINE IMPLEMENTATION} 169 {$I 'GenericList.inc'} 170 171 // TListBoolean<Integer, Boolean> 172 {$DEFINE TGListIndex := Integer} 173 {$DEFINE TGListItem := Boolean} 174 {$DEFINE TGList := TListBoolean} 175 {$DEFINE TGListSortCompare := TListBooleanSortCompare} 176 {$DEFINE TGListToStringConverter := TListBooleanToStringConverter} 177 {$DEFINE TGListFromStringConverter := TListBooleanFromStringConverter} 178 {$DEFINE TGListItemArray := TListBooleanItemArray} 157 179 {$DEFINE IMPLEMENTATION} 158 180 {$I 'GenericList.inc'} -
PinConnection/UCommProtocol.pas
r119 r129 7 7 uses 8 8 Classes, SysUtils, UVarBlockSerializer, syncobjs, UCommPin, 9 UDebugLog, UStreamHelper, StopWatch, SpecializedList ;9 UDebugLog, UStreamHelper, StopWatch, SpecializedList, UCommon; 10 10 11 11 type … … 63 63 64 64 TRetransmitCheckThread = class(TThread) 65 private66 65 public 67 66 Parent: TCommProtocol; … … 474 473 except 475 474 on E: Exception do begin 476 //MainForm.ExceptionLogger1.ThreadExceptionHandler(Self, E);475 if Assigned(ExceptionHandler) then ExceptionHandler(Self, E); 477 476 end; 478 477 end; -
PinConnection/UCommSocket.pas
r119 r129 6 6 7 7 uses 8 Classes, SysUtils, blcksock, UCommPin ;8 Classes, SysUtils, blcksock, UCommPin, UCommon; 9 9 10 10 type … … 16 16 17 17 TCommSocketReceiveThread = class(TThread) 18 public 18 19 Parent: TCommSocket; 19 20 Stream: TMemoryStream; … … 110 111 except 111 112 on E: Exception do 112 //MainForm.ExceptionLogger1.ThreadExceptionHandler(Self, E);113 if Assigned(ExceptionHandler) then ExceptionHandler(Self, E); 113 114 end; 114 115 until Terminated; -
PinConnection/UCommThread.pas
r119 r129 6 6 7 7 uses 8 Classes, SysUtils, blcksock, UCommPin, SyncObjs, UStreamHelper ;8 Classes, SysUtils, blcksock, UCommPin, SyncObjs, UStreamHelper, UCommon; 9 9 10 10 type … … 16 16 17 17 TCommThreadReceiveThread = class(TThread) 18 public 18 19 Parent: TCommThread; 19 20 Stream: TMemoryStream; … … 130 131 except 131 132 on E: Exception do 132 //MainForm.ExceptionLogger1.ThreadExceptionHandler(Self, E);133 if Assigned(ExceptionHandler) then ExceptionHandler(Self, E); 133 134 end; 134 135 until Terminated; -
PinConnection/UPacketBurst.pas
r119 r129 6 6 7 7 uses 8 Classes, UCommPin, SyncObjs, UStreamHelper ;8 Classes, UCommPin, SyncObjs, UStreamHelper, UCommon, SysUtils; 9 9 10 10 type … … 103 103 inherited; 104 104 try 105 try 105 106 Stream := TStreamHelper.Create; 106 107 with PacketBurst do … … 126 127 Stream.Free; 127 128 end; 129 except 130 on E: Exception do 131 if Assigned(ExceptionHandler) then ExceptionHandler(Self, E); 132 end; 128 133 end; 129 134 -
PinConnection/USerialPort.pas
r119 r129 6 6 7 7 uses 8 Classes, SysUtils, SynaSer, StdCtrls, Dialogs ;8 Classes, SysUtils, SynaSer, StdCtrls, Dialogs, UCommon; 9 9 10 10 type … … 23 23 24 24 TSerialPortReceiveThread = class(TThread) 25 public 25 26 Parent: TSerialPort; 26 27 procedure Execute; override; … … 306 307 except 307 308 on E: Exception do 308 //MainForm.ExceptionLogger1.ThreadExceptionHandler(Self, E);309 if Assigned(ExceptionHandler) then ExceptionHandler(Self, E); 309 310 end; 310 311 until Terminated;
Note:
See TracChangeset
for help on using the changeset viewer.