📄 unitfriendlist.pas
字号:
unit UnitFriendList;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TFmFriendList = class(TForm)
ListBox: TListBox;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
procedure ListBoxDblClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FmFriendList: TFmFriendList;
implementation
uses UnitLogin,UnitThread,UnitChat;
{$R *.dfm}
procedure TFmFriendList.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
//FriendListCB.StrKind := 'CLOSED';
//FriendListCB.SendName := FmLogin.EdtQQ.Text;
FmLogin.Close;
FmChat.Close;
FmThread.Close;
end;
procedure TFmFriendList.FormShow(Sender: TObject);
var
FriendListCB : TCommBlock;
begin
FmFriendList.Caption := FmLogin.EdtQQ.Text;
FriendListCB.StrKind := 'FRDLIST';
FriendListCB.SendName := FmLogin.EdtQQ.Text;
try
FmThread.IdTCPClient.WriteBuffer(FriendListCB,SizeOf(FriendListCB));
except
on e: exception do showmessage( 'there is a exception' + e.Message);
end;
end;
procedure TFmFriendList.ListBoxDblClick(Sender: TObject);
begin
//FmChat.Hide;
FmChat.Show;
FmChat.Caption := '与' + ListBox.Items[ListBox.ItemIndex] + '谈话中';
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -