Changeset 9 for trunk/UMainWindow.pas


Ignore:
Timestamp:
Feb 11, 2008, 10:27:49 AM (17 years ago)
Author:
george
Message:

Opraveno: Některé neuvolňované pamětové struktury.
Opraveno: Chyba při ukončování a uvolňování paměti.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore set to
      *.dcu
      *.exe
      *.identcache
      *.dsk
      *.~dsk
      Network.cfg
  • trunk/UMainWindow.pas

    r2 r9  
    177177    Vloitsovodkaz1: TMenuItem;
    178178    OpenDialog1: TOpenDialog;
    179     SunriseChatNetworkCore1: TSunriseChatNetworkCore;
     179    procedure FormCreate(Sender: TObject);
    180180    procedure Vloitsovodkaz1Click(Sender: TObject);
    181181    procedure RichView1Jump(Sender: TObject; id: Integer);
    182182    procedure Vloit1Click(Sender: TObject);
    183183    procedure Koprovar1Click(Sender: TObject);
    184     procedure FormCreate(Sender: TObject);
    185184    procedure Button1Click(Sender: TObject);
    186185    procedure FormShow(Sender: TObject);
     
    250249    { Private declarations }
    251250  public
     251    SunriseChatNetworkCore1: TSunriseChatNEtworkCore;
    252252    UserEventsImagesEnabled: Boolean;
    253253    FirstStart: Boolean;
     
    391391  I: Integer;
    392392begin
     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
    393403  SettingsName := '';
    394404  // Process application parameters
     
    11071117var
    11081118  I: Integer;
    1109   T: TListBox;
     1119//  T: TListBox;
    11101120  NewTabSheet: TTabSheet;
    11111121begin
     
    13491359procedure TMainWindow.AddEvent(Name, Text: string; Options: TEventOptions);
    13501360begin
    1351   SetLength(AppEventsInit,Length(AppEventsInit)+1);
     1361  SetLength(AppEventsInit, Length(AppEventsInit) + 1);
    13521362  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;
    13611371  end;
    13621372end;
     
    14081418  for I:= 0 to High(AppEventsOptions) do begin
    14091419    //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));
    14111421    with AppEventsOptions[I], AppEvents[I] do begin
    14121422      Include('ShowWindow',ShowWindow,ShowWindow);
     
    17791789
    17801790procedure TMainWindow.FormDestroy(Sender: TObject);
     1791var
     1792  I: Integer;
    17811793begin
    17821794  UsersAutoAwayDelay := SunriseChatNetworkCore1.AutoAwayDelay;
     
    17961808  SunriseChatNetworkCore1.SendCommand(scDisconnect);
    17971809  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;
    17981814end;
    17991815
    18001816procedure TMainWindow.FormClose(Sender: TObject; var Action: TCloseAction);
    1801 var
    1802   I: Integer;
     1817//var
     1818//  I: Integer;
    18031819begin
    18041820  SunriseChatNetworkCore1.SendCommand(scDisconnect);
Note: See TracChangeset for help on using the changeset viewer.