identlib.pas
来自「Yahoo Messenger for Mobile」· PAS 代码 · 共 84 行
PAS
84 行
unit identlib;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, YchatU1;
type
TForm47 = class(TForm)
Image1: TImage;
ListBox1: TListBox;
Label1: TLabel;
Button1: TButton;
Button2: TButton;
Bevel1: TBevel;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
procedure ListBox1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
SelectedIdentitar: String;
{ Public declarations }
end;
var
Form47: TForm47;
implementation
{$R *.DFM}
procedure TForm47.Button1Click(Sender: TObject);
begin
TGetIdentList.Create(-1,Self);
Label2.Caption:='Attempting to Connect to ident DB';
end;
procedure TForm47.ListBox1Click(Sender: TObject);
Var
N: Integer;
Ava: TIdentitarDownload;
begin
For N:=ListBox1.Items.Count-1 downto 0 do
Begin
If ListBox1.Selected[N]=True Then
Begin
If FileExists(Path+'identitar\'+ListBox1.Items[N]+'.jpg')=False Then
Begin
Button2.Enabled:=False;
Ava:=TIdentitarDownload.Create(ListBox1.items[N]+'.jpg',Image1);
// Ava.WaitFor;
Self.SelectedIdentitar:=ListBox1.items[N];
Button2.Enabled:=True;
Label1.Caption:='Image: '+ListBox1.items[N];
If FileExists(Path+'identitar\'+ListBox1.Items[N]+'.jpg') Then
Image1.Picture.LoadFromFile(Path+'identitar\'+ListBox1.Items[N]+'.jpg');
End
Else
Begin
Self.SelectedIdentitar:=ListBox1.items[N];
Button2.Enabled:=True;
Label1.Caption:='Image: '+ListBox1.items[N];
Image1.Picture.LoadFromFile(Path+'identitar\'+ListBox1.Items[N]+'.jpg');
End;
End;
End;
end;
procedure TForm47.Button2Click(Sender: TObject);
begin
Identitar:=SelectedIdentitar;
// If Pos('.',Identitar)>0 Then
// Identitar:=Copy(Identitar,1,pos('.',Identitar)-1);
Form1.JpgToBmpYmlite(Identitar);
Chatters[Form1.ChatterNum(LoggedInName)].Ident:='CH\'+Identitar;
Identitar:='CH\'+Identitar;
Close;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?