⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 promptunt.pas

📁 絮语2007视频聊天软件源程序.仅供参考
💻 PAS
字号:
unit promptunt;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Buttons, ComCtrls, ExtCtrls,constunt, xpButton;

type
  Tpromptfrm = class(TForm)
    memo1: TRichEdit;
    BitBtn6: TxpButton;
    BitBtn9: TxpButton;
    Label1: TLabel;
    Label2: TLabel;
    procedure FormShow(Sender: TObject);
    procedure BitBtn6Click(Sender: TObject);
    procedure BitBtn9Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormCreate(Sender: TObject);
    procedure FormPaint(Sender: TObject);
  private
    procedure process_custom_message(var msg:tmessage);message refresh_status;
    procedure initfrom;
    procedure operation(bool:boolean);
    { Private declarations }
  public
    params:string;
    { Public declarations }
  end;

implementation
uses  udpcores,shareunit,richunt,structureunt;
{$R *.DFM}

//------------------------------------------------------------------------------
// 自定义消息
//------------------------------------------------------------------------------
procedure Tpromptfrm.process_custom_message(var msg:tmessage);
begin
case msg.WParam of
  xy_form_close:close;
  end;
end;

procedure Tpromptfrm.initfrom;
begin
label1.caption:='帐号:'+getparamitem(params,'userid');
label2.caption:='昵称:'+getparamitem(params,'uname');
memo1.text:=getparamitem(params,'messageex');
end;

procedure Tpromptfrm.FormShow(Sender: TObject);
begin
initrichedit(memo1);
initfrom;
end;


procedure Tpromptfrm.operation(bool:boolean);
var msg:string;
    tmp:userinfo;
begin
if getparamitem(params,'msgid')=inttostr(xy_user) then
if getparamitem(params,'funid')=inttostr(xy_search) then
if getparamitem(params,'operation')=inttostr(xy_adding) then
   begin
   tmp:=udpcore.user.getuserinfoex(0);
   if bool then
     begin
     makeparamsex(msg,'msgid',xy_user);
     makeparamsex(msg,'funid',xy_search);
     makeparamsex(msg,'operation',xy_passing);
     makeparamsex(msg,'md5name',tmp.md5name);
     makeparamsex(msg,'userid',tmp.userid);
     makeparamsex(msg,'uname',tmp.uname);
     makeparamsex(msg,'tel',tmp.tel);
     makeparamsex(msg,'dept',tmp.dept);
     makeparamsex(msg,'business',tmp.business);
     udpcore.sendtoip(getparamitem(params,'fromip'),msg);
     udpcore.user.adduser(params);
     expandmemo.Add(params);
     postmessage(main_hwnd,refresh_status,xy_refresh_user_status,0);
     end else begin
     makeparamsex(msg,'msgid',xy_user);
     makeparamsex(msg,'funid',xy_search);
     makeparamsex(msg,'operation',xy_refuseing);
     makeparamsex(msg,'md5name',tmp.md5name);
     makeparamsex(msg,'userid',tmp.userid);
     makeparamsex(msg,'uname',tmp.uname);
     udpcore.sendtoip(getparamitem(params,'fromip'),msg);
     end;
   end;
   
if getparamitem(params,'msgid')=inttostr(xy_game) then
if getparamitem(params,'funid')=inttostr(xy_request) then
   begin
   tmp:=udpcore.user.getuserinfoex(0);
   if bool then
     begin
     udpcore.plug.pluginrequest_accept(getparamitem(params,'md5name'),getparamitem(params,'gamename'),true);
     end else begin
     makeparamsex(msg,'msgid',xy_game);
     makeparamsex(msg,'funid',xy_refuseing);
     makeparamsex(msg,'md5name',tmp.md5name);
     makeparamsex(msg,'userid',tmp.userid);
     makeparamsex(msg,'uname',tmp.uname);
     udpcore.sendtoip(getparamitem(params,'fromip'),msg);
     end;
   end;

if getparamitem(params,'msgid')=inttostr(xy_remote) then
if getparamitem(params,'funid')=inttostr(xy_request) then
   begin
   tmp:=udpcore.user.getuserinfoex(0);
   if bool then
      begin
      udpcore.createremotesvrfrmex(params);
      end else begin
      makeparamsex(msg,'msgid',xy_remote);
      makeparamsex(msg,'funid',xy_refuseing);
      makeparamsex(msg,'md5name',tmp.md5name);
      makeparamsex(msg,'userid',tmp.userid);
      makeparamsex(msg,'uname',tmp.uname);
      udpcore.sendtoip(getparamitem(params,'fromip'),msg);
      end;
   end;
close;
end;

procedure Tpromptfrm.BitBtn6Click(Sender: TObject);
begin
operation(true);
end;

procedure Tpromptfrm.BitBtn9Click(Sender: TObject);
begin
operation(false);
end;

procedure Tpromptfrm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
delhwnd(handle);
Action:=cafree;
Tpromptfrm(self):=nil;
end;

procedure Tpromptfrm.FormCreate(Sender: TObject);
begin
addhwnd(handle);
udpcore.changeLayered(handle);
end;

procedure Tpromptfrm.FormPaint(Sender: TObject);
begin
udpcore.formonpaint(self);
end;

end.

⌨️ 快捷键说明

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