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

📄 ychatu18.pas

📁 Yahoo Messenger for Mobile
💻 PAS
字号:
unit YchatU18;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, DynamicSkinForm;

type
  TForm18 = class(TForm)
    Panel1: TPanel;
    Panel3: TPanel;
    Panel5: TPanel;
    Splitter1: TSplitter;
    Panel2: TPanel;
    ListBox1: TListBox;
    ListBox2: TListBox;
    Panel4: TPanel;
    Edit1: TEdit;
    Panel8: TPanel;
    Edit3: TEdit;
    Panel6: TPanel;
    Edit2: TEdit;
    CheckBox2: TCheckBox;
    CheckBox1: TCheckBox;
    Panel7: TPanel;
    Button2: TButton;
    Button1: TButton;
    Button3: TButton;
    Button4: TButton;
    procedure Button3Click(Sender: TObject);
    procedure ListBox1DblClick(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure FormResize(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure ListBox2DblClick(Sender: TObject);
    procedure ListBox1Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form18: TForm18;

implementation

uses YchatU1;

{$R *.dfm}

procedure TForm18.Button3Click(Sender: TObject);
begin
Close;
end;

procedure TForm18.ListBox1DblClick(Sender: TObject);
Var
 endofname,strtofnme,R,N: Integer;
begin
 R:=0;
 For N:=ListBox1.Items.Count-1 Downto 0 do
  If ListBox1.Selected[N]=True Then
    R:=N;
  If R<>-1 Then
   Begin
       strtofnme:=pos('<',ListBox1.Items[R]);
       endofname:=pos('>',ListBox1.Items[R]);
    If  (strtofnme=0) and (endofname=0) Then
         Form1.Say(Form1.Richedit1,ListBox1.Items[R],False,True,False)
          else
        ShowMessage('This is a "<username>" tagged emote!');
    End;
end;


procedure TForm18.Button2Click(Sender: TObject);
Var
 R,N: Integer;
begin
 R:=0;
 For N:=ListBox1.Items.Count-1 Downto 0 do
  If ListBox1.Selected[N]=True Then
    R:=N;
  If R<>-1 Then
    ListBox1.Items.Delete(R);
end;

procedure TForm18.Button1Click(Sender: TObject);
begin
 ListBox1.Items.Add(Edit1.Text);
end;

procedure TForm18.FormResize(Sender: TObject);
begin
 Edit1.Width:=Panel4.Width-10;
end;

procedure TForm18.FormActivate(Sender: TObject);
begin
ListBox2.Items.Text:=Form1.ListBox1.Items.Text;
end;

procedure TForm18.ListBox2DblClick(Sender: TObject);
Var
 strtofnme,endofname,R2,R,N: Integer;
 UserName,TmpFstr,Part1,Part2: String;
begin
R:=-1;
R2:=-1;
 For N:=ListBox1.Items.Count-1 Downto 0 do
  If ListBox1.Selected[N]=True Then
    R:=N;
 For N:=ListBox2.Items.Count-1 Downto 0 do
  If ListBox2.Selected[N]=True Then
    R2:=N;

  If (R<>-1) and (R2<>-1) Then
   Begin
       TmpFstr:=ListBox1.Items[R];
       UserName:=ListBox2.Items[R2];
   //    part1:=copy(tmpfstr,1,strtofnme-1);
   //    part2:=copy(tmpfstr,endofname+1,length(tmpfstr)-endofname+1);
//       tmpfstr:=part1+Yred+UserName+Yblue+part2;
       TmpFstr:=Form1.MakeEmote(TmpFstr,UserName);
       Form1.Say(Form1.Richedit1,TmpFstr,False,True,False);
    End;
End;

procedure TForm18.ListBox1Click(Sender: TObject);
Var
 R,N: Integer;
begin
 R:=0;
 For N:=ListBox1.Items.Count-1 Downto 0 do
  If ListBox1.Selected[N]=True Then
    R:=N;
  If R<>-1 Then
   Begin
    Edit1.Text:=ListBox1.Items[R];
   End;
end;

procedure TForm18.Button4Click(Sender: TObject);
Var
 R,N: Integer;
begin
 R:=0;
 For N:=ListBox1.Items.Count-1 Downto 0 do
  If ListBox1.Selected[N]=True Then
    R:=N;
  If R<>-1 Then
   Begin
    ListBox1.Items[R]:=Edit1.Text;
   End;
end;

end.

⌨️ 快捷键说明

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