filemodel.pas
来自「絮语2007视频聊天软件源程序.仅供参考」· PAS 代码 · 共 40 行
PAS
40 行
unit filemodel;
interface
uses SysUtils,windows,model;
type
tfilemodel=class(Tmodel)
private
procedure request_filetrans(params:string);
public
procedure process(params:string);override;
end;
implementation
uses shareunit,constunt,udpcores,structureunt,richunt;
//------------------------------------------------------------------------------
// 要求文件发送文件
//------------------------------------------------------------------------------
procedure tfilemodel.request_filetrans(params:string);
begin
expandmemo.add(params);
postmessage(main_hwnd,refresh_status,xy_filetran_starting,0);
end;
//------------------------------------------------------------------------------
// 处理file有关的消息
//------------------------------------------------------------------------------
procedure tfilemodel.process(params:string);
var funid:string;
begin
funid:=getparamitem(params,'funid');
case strtointdef(funid,xy_unknow) of
xy_request:request_filetrans(params);
xy_unknow:logmemo.add('unknow:'+params);
end;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?