Changeset 9 for trunk/UMainWindow.pas
- Timestamp:
- Feb 11, 2008, 10:27:49 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:ignore
set to
*.dcu
*.exe
*.identcache
*.dsk
*.~dsk
Network.cfg
-
Property svn:ignore
set to
-
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);
Note:
See TracChangeset
for help on using the changeset viewer.