Changeset 9
- Timestamp:
- Feb 11, 2008, 10:27:49 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:ignore
set to
*.dcu
*.exe
*.identcache
*.dsk
*.~dsk
Network.cfg
-
Property svn:ignore
set to
-
trunk/SunriseChat.dpr
r2 r9 22 22 23 23 begin 24 ReportMemoryLeaksOnShutdown := DebugHook <> 0; 24 25 Application.Initialize; 25 26 Application.CreateForm(TLocalization, Localization); -
trunk/SunriseChatCoreUnit.pas
r2 r9 3 3 interface 4 4 5 uses 5 uses 6 6 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 7 7 Forms, StdCtrls, ExtCtrls, SunriseChatCoreUtils, DateUtils, Dialogs; … … 235 235 begin 236 236 Active := False; 237 for I := 0 to UserList.Count -1 do TList(UserList[I]).Free;237 for I := 0 to UserList.Count - 1 do TList(UserList[I]).Free; 238 238 UserList.Free; 239 239 LocalUser.Free; 240 for I := 0 to RoomList.Count -1 do TRoom(RoomList[I]).Free;240 for I := 0 to RoomList.Count - 1 do TRoom(RoomList[I]).Free; 241 241 RoomList.Free; 242 242 inherited; … … 502 502 except 503 503 end; 504 SourceUser.Free; 505 TargetUSer.Free; 504 506 end; 505 507 -
trunk/SunriseChatNetworkCoreUnit.pas
r2 r9 109 109 110 110 destructor TSunriseChatNetworkCore.Destroy; 111 begin 111 var 112 I: Integer; 113 begin 114 fndTCPClient1.OnClose := nil; 112 115 Active := False; 116 for I := 0 to NetworkInterfaces.Count - 1 do 117 TNetworkInterface(NetworkInterfaces[I]).Free; 113 118 NetworkInterfaces.Free; 114 119 inherited; -
trunk/ULocalization.dfm
r2 r9 2 2 OldCreateOrder = False 3 3 OnCreate = DataModuleCreate 4 Left = 504 5 Top = 303 4 OnDestroy = DataModuleDestroy 6 5 Height = 150 7 6 Width = 215 -
trunk/ULocalization.pas
r2 r9 10 10 Items: TStringList; 11 11 Name: string; 12 constructor Create; 13 destructor Destroy; 12 14 end; 13 15 14 16 TLocalization = class(TDataModule) 15 17 procedure DataModuleCreate(Sender: TObject); 18 procedure DataModuleDestroy(Sender: TObject); 16 19 public 17 20 ActiveLanguage: Integer; … … 59 62 try 60 63 Name := ReadString('Info', 'Language', 'None'); 61 Items := TStringList.Create;62 64 ReadSectionValues('Main',Items); 63 65 finally … … 95 97 end; 96 98 99 procedure TLocalization.DataModuleDestroy(Sender: TObject); 100 var 101 I: Integer; 102 begin 103 for I := 0 to High(Languages) do 104 Languages[I].Free; 105 end; 106 107 { TLanguage } 108 109 constructor TLanguage.Create; 110 begin 111 Items := TStringList.Create; 112 end; 113 114 destructor TLanguage.Destroy; 115 begin 116 Items.Free; 117 end; 118 97 119 end. -
trunk/ULogExceptions.pas
r2 r9 231 231 procedure TLogExceptions.FormDestroy(Sender: TObject); 232 232 begin 233 FreeAndNil(StoreError); 233 234 FreeAndNil(FMapFile); 234 235 end; -
trunk/UMainWindow.dfm
r2 r9 2 2 Left = 519 3 3 Top = 296 4 Width = 4785 Height = 3856 4 Caption = 'SunriseChat' 5 ClientHeight = 331 6 ClientWidth = 470 7 7 Color = clBtnFace 8 8 Constraints.MinHeight = 100 … … 93 93 object ToolBar1: TToolBar 94 94 Left = 0 95 Top = 14 395 Top = 147 96 96 Width = 26 97 Height = 15 897 Height = 154 98 98 Align = alBottom 99 99 AutoSize = True … … 104 104 TabOrder = 0 105 105 Transparent = False 106 ExplicitTop = 143 106 107 object ToolButton1: TToolButton 107 108 Left = 0 108 Top = 2109 Top = 0 109 110 Hint = 'Neposouvat text' 110 111 Caption = 'ToolButton1' … … 116 117 object ToolButton2: TToolButton 117 118 Left = 0 118 Top = 2 4119 Top = 22 119 120 Hint = 'Informace' 120 121 Caption = 'ToolButton2' … … 125 126 object ToolButton3: TToolButton 126 127 Left = 0 127 Top = 4 6128 Top = 44 128 129 Hint = 'Nastaven'#237 129 130 Caption = 'ToolButton3' … … 134 135 object ToolButton4: TToolButton 135 136 Left = 0 136 Top = 6 8137 Top = 66 137 138 Hint = 'Vypnout zvuk' 138 139 Caption = 'ToolButton4' … … 144 145 object ToolButton5: TToolButton 145 146 Left = 0 146 Top = 90147 Top = 88 147 148 Hint = 'V'#382'dy navrchu' 148 149 Caption = 'ToolButton5' … … 154 155 object ToolButton7: TToolButton 155 156 Left = 0 156 Top = 11 2157 Top = 110 157 158 Hint = 'Minimalizovat' 158 159 Caption = 'ToolButton7' … … 163 164 object ToolButton6: TToolButton 164 165 Left = 0 165 Top = 13 4166 Top = 132 166 167 Hint = 'Vypnut'#237' obr'#225'zk'#367 167 168 Caption = 'ToolButton6' … … 195 196 Top = 20 196 197 Width = 116 197 Height = 2 80198 Height = 260 198 199 Hint = 'Seznam online u'#382'ivatel'#367 199 200 Anchors = [akLeft, akTop, akRight, akBottom] … … 244 245 Top = 0 245 246 Width = 316 246 Height = 2 29247 Height = 209 247 248 ActivePage = TabSheet1 248 249 Anchors = [akLeft, akTop, akRight, akBottom] … … 272 273 Top = 20 273 274 Width = 316 274 Height = 2 80275 Height = 260 275 276 Anchors = [akLeft, akTop, akRight, akBottom] 276 277 BevelOuter = bvNone … … 284 285 Top = 0 285 286 Width = 316 286 Height = 2 80287 Height = 260 287 288 Align = alClient 288 289 Columns = <> … … 521 522 CycleInterval = 0 522 523 Icon.Data = { 523 0000010001001010040000000000280100001600000028000000100000002000 524 0000010004000000000080000000000000000000000000000000000000000000 525 000000008000008000000080800080000000800080008080000080808000C0C0 526 C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 527 00000000000000000887088700000000000000000000000000CC4CC000000000 528 00CC4CC00000000080CCCCC0800000000000000000000000A222222220000000 529 A2AAAA2220000000A2AA222220000000AAA0002A200000000008880000000000 530 000888000000000000088800000000000008880000000000000000000000F007 524 0000010001001010200000000000680400001600000028000000100000002000 525 0000010020000000000000040000000000000000000000000000000000000000 526 0000000000000000000000000000000000000000000000000000000000000000 527 0000000000000000000000000000000000000000000000000000000000000000 528 000000000000000000000000000000000000CECECE00CECECE009C9C9C000000 529 0000CECECE00CECECE0063636300000000000000000000000000000000000000 530 0000000000000000000000000000000000000000000000000000000000000000 531 0000000000000000000000000000000000000000000000000000000000000000 532 00000000000000000000000000000000000000000000FF522100FF2121009431 533 0000FF522100FF21210000000000000000000000000000000000000000000000 534 00000000000000000000000000000000000000000000FF522100FF2121009431 535 0000FF522100FF21210000000000000000000000000000000000000000000000 536 00000000000000000000000000008CD6FF0000000000FF522100FF522100FF52 537 2100FF522100FF212100000000008CD6FF000000000000000000000000000000 538 0000000000000000000000000000000000000000000000000000000000000000 539 0000000000000000000000000000000000000000000000000000000000000000 540 000000000000000000000000000000DE00000073000000940000009400000094 541 0000009400000094000000730000009400000000000000000000000000000000 542 000000000000000000000000000000DE00000073000000DE000000DE000000DE 543 000000DE00000094000000730000009400000000000000000000000000000000 544 000000000000000000000000000000DE00000073000000DE000000DE00000094 545 0000009400000094000000730000009400000000000000000000000000000000 546 000000000000000000000000000000DE000000DE000000DE0000000000000000 547 0000000000000094000000DE0000009400000000000000000000000000000000 548 00000000000000000000000000000000000000000000000000006B8CFF006B8C 549 FF006B8CFF000000000000000000000000000000000000000000000000000000 550 00000000000000000000000000000000000000000000000000008CD6FF008CD6 551 FF006B8CFF000000000000000000000000000000000000000000000000000000 552 00000000000000000000000000000000000000000000000000008CD6FF008CD6 553 FF006B8CFF000000000000000000000000000000000000000000000000000000 554 00000000000000000000000000000000000000000000000000008CD6FF008CD6 555 FF006B8CFF000000000000000000000000000000000000000000000000000000 556 0000000000000000000000000000000000000000000000000000000000000000 557 000000000000000000000000000000000000000000000000000000000000F007 531 558 0000F0070000F80F0000F80F0000F0070000E0030000E0030000E0030000E003 532 559 0000E0030000E0030000F0070000FC1F0000FC1F0000FC1F0000FE3F0000} … … 1971 1998 Top = 80 1972 1999 end 1973 object SunriseChatNetworkCore1: TSunriseChatNetworkCore1974 AutoAwayDelay = 51975 UseDefaultEventsText = True1976 Active = False1977 MaxRoomLines = 1001978 OnUserListUpdate = SunriseChatNetworkCore1UserListUpdate1979 OnAddMessage = SunriseChatNetworkCore1AddMessage1980 OnRoomListChanged = SunriseChatNetworkCore1RoomListChanged1981 BroadcastType = btLocal1982 UdpPort = 555571983 Left = 1801984 Top = 841985 end1986 2000 end -
trunk/UMainWindow.pas
r2 r9 177 177 Vloitsovodkaz1: TMenuItem; 178 178 OpenDialog1: TOpenDialog; 179 SunriseChatNetworkCore1: TSunriseChatNetworkCore;179 procedure FormCreate(Sender: TObject); 180 180 procedure Vloitsovodkaz1Click(Sender: TObject); 181 181 procedure RichView1Jump(Sender: TObject; id: Integer); 182 182 procedure Vloit1Click(Sender: TObject); 183 183 procedure Koprovar1Click(Sender: TObject); 184 procedure FormCreate(Sender: TObject);185 184 procedure Button1Click(Sender: TObject); 186 185 procedure FormShow(Sender: TObject); … … 250 249 { Private declarations } 251 250 public 251 SunriseChatNetworkCore1: TSunriseChatNEtworkCore; 252 252 UserEventsImagesEnabled: Boolean; 253 253 FirstStart: Boolean; … … 391 391 I: Integer; 392 392 begin 393 SunriseChatNetworkCore1 := TSunriseChatNetworkCore.Create(Self); 394 with SunriseChatNetworkCore1 do begin 395 UdpPort := 55557; 396 UseDefaultEventsText := True; 397 AutoAwayDelay := 5; 398 AutoReconnect := True; 399 BroadcastType := btLocal; 400 MaxRoomLines := 100; 401 end; 402 393 403 SettingsName := ''; 394 404 // Process application parameters … … 1107 1117 var 1108 1118 I: Integer; 1109 T: TListBox;1119 // T: TListBox; 1110 1120 NewTabSheet: TTabSheet; 1111 1121 begin … … 1349 1359 procedure TMainWindow.AddEvent(Name, Text: string; Options: TEventOptions); 1350 1360 begin 1351 SetLength(AppEventsInit, Length(AppEventsInit)+1);1361 SetLength(AppEventsInit, Length(AppEventsInit) + 1); 1352 1362 with AppEventsInit[High(AppEventsInit)] do begin 1353 EventName := Name;1354 ShowMessage := eoShowMessage in Options;1355 MessageText := Text;1356 MessageFont := TFont.Create;1357 ShowBalloonHint := eoShowBalloonHint in Options;1358 ShowAlertIcon := eoShowAlertIcon in Options;1359 ShowWindow := eoShowWindow in Options;1360 PlayBeep := eoPlayBeep in Options;1363 EventName := Name; 1364 ShowMessage := eoShowMessage in Options; 1365 MessageText := Text; 1366 MessageFont := TFont.Create; 1367 ShowBalloonHint := eoShowBalloonHint in Options; 1368 ShowAlertIcon := eoShowAlertIcon in Options; 1369 ShowWindow := eoShowWindow in Options; 1370 PlayBeep := eoPlayBeep in Options; 1361 1371 end; 1362 1372 end; … … 1408 1418 for I:= 0 to High(AppEventsOptions) do begin 1409 1419 //if not Assigned(AppEventsOptions[I]) then 1410 AppEventsOptions[I] := TAutoRegistry.Create(RegistryPath+'\'+SettingsName+'\AppEvents\'+IntToStr(I));1420 AppEventsOptions[I] := TAutoRegistry.Create(RegistryPath+'\'+SettingsName+'\AppEvents\'+IntToStr(I)); 1411 1421 with AppEventsOptions[I], AppEvents[I] do begin 1412 1422 Include('ShowWindow',ShowWindow,ShowWindow); … … 1779 1789 1780 1790 procedure TMainWindow.FormDestroy(Sender: TObject); 1791 var 1792 I: Integer; 1781 1793 begin 1782 1794 UsersAutoAwayDelay := SunriseChatNetworkCore1.AutoAwayDelay; … … 1796 1808 SunriseChatNetworkCore1.SendCommand(scDisconnect); 1797 1809 Options.Free; 1810 for I := 0 to High(AppEvents) do 1811 AppEvents[I].MessageFont.Free; 1812 for I := 0 to High(AppEventsOptions) do 1813 AppEventsOptions[I].Free; 1798 1814 end; 1799 1815 1800 1816 procedure TMainWindow.FormClose(Sender: TObject; var Action: TCloseAction); 1801 var1802 I: Integer;1817 //var 1818 // I: Integer; 1803 1819 begin 1804 1820 SunriseChatNetworkCore1.SendCommand(scDisconnect); -
trunk/UNetworkTest.dfm
r2 r9 2 2 Left = 295 3 3 Top = 207 4 Width = 4755 Height = 2646 4 ActiveControl = ListView1 7 5 Caption = 'Test s'#237't'#283 6 ClientHeight = 230 7 ClientWidth = 467 8 8 Color = clBtnFace 9 9 Constraints.MinHeight = 100 … … 17 17 Position = poScreenCenter 18 18 OnCreate = FormCreate 19 OnDestroy = FormDestroy 19 20 OnShow = FormShow 20 21 DesignSize = ( -
trunk/UNetworkTest.pas
r2 r9 29 29 procedure SpinEdit1Change(Sender: TObject); 30 30 procedure ComboBox1Change(Sender: TObject); 31 procedure FormDestroy(Sender: TObject); 31 32 private 32 33 { Private declarations } … … 66 67 Row: string; 67 68 69 const 70 NetworkFileName = 'Network.cfg'; 71 68 72 function Parse: string; 69 73 begin … … 77 81 PingList := TPingList.Create(True); 78 82 ChDir(ExtractFileDir(Application.ExeName)); 79 AssignFile(Soubor, 'Network.cfg');80 Reset(Soubor);83 AssignFile(Soubor, NetworkFileName); 84 if FileExists(NetworkFileName) then Reset(Soubor) else Rewrite(Soubor); 81 85 SetLength(Devices, 1); 82 86 while not Eof(Soubor) do begin … … 102 106 end; 103 107 108 procedure TNetworkTest.FormDestroy(Sender: TObject); 109 begin 110 PingList.Free; 111 end; 112 104 113 procedure TNetworkTest.FormShow(Sender: TObject); 105 114 begin
Note:
See TracChangeset
for help on using the changeset viewer.