downpicmodel.pas

来自「絮语2007视频聊天软件源程序.仅供参考」· PAS 代码 · 共 51 行

PAS
51
字号
unit downpicmodel;

interface

uses SysUtils,windows,model;

type
  tdownpicmodel=class(Tmodel)
    private
      procedure request_downpic(params:string);
    public
      procedure process(params:string);override;
    end;

implementation
uses shareunit,constunt,udpcores,structureunt,richunt;

//------------------------------------------------------------------------------
//  请求下载 downpic 
//------------------------------------------------------------------------------
procedure tdownpicmodel.request_downpic(params:string);
var firendid:string;
    tmpinfo:userinfo;
begin
firendid:=getparamitem(params,'firendid');
if udpcore.user.checkuser(firendid) then
    begin
    tmpinfo:=udpcore.user.getuserinfoex(firendid);
    if tmpinfo.dlghwnd>0 then
       begin
       expandmemo.Add(params);
       postmessage(tmpinfo.dlghwnd,refresh_status,xy_downpic_starting,0);
       end;
    end;
end;


//------------------------------------------------------------------------------
//  处理downpic有关的消息
//------------------------------------------------------------------------------
procedure tdownpicmodel.process(params:string);
var funid:string;
begin
funid:=getparamitem(params,'funid');
case strtointdef(funid,xy_unknow) of
    xy_request:request_downpic(params);
    xy_unknow:logmemo.add('unknow:'+params);
  end;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?