protected
isServer:boolean;
end;
procedure Tchat.FormCreate(Sender: TObject);
begin
filelistenitemclick(nil);
end;
procedure Tchat.FileListenItemClick(Sender: TObject);
begin
FileListenItem.Checked:=not FileListenItem.Checked;
if FileListenItem.Checked then
begin
clientsocket1.Active:=false;
serversocket1.Active:=true;
statusbar1.panels[0].Text:='监听......';
end;
// else
// begin
// if serversocket1.active then
// serversocket1.Active:=false;
// statusbar1.Panels[0].Text:='';
// end
end;
procedure Tchat.Exit1Click(Sender: TObject);
begin
serversocket1.Close;
clientsocket1.Close;
close;
end;
end.