- UID
- 13801
注册时间2006-5-22
阅读权限40
最后登录1970-1-1
独步武林
该用户从未签到
|
楼主 |
发表于 2006-7-7 15:14:43
|
显示全部楼层
原帖由 黑夜彩虹 于 2006-7-7 14:24 发表
支持caterpilla (惊涛) 贴出代码让我等菜鸟学习。。。
没啥技术含量,呵呵~~~~~~~
unit GenString;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, IdCoderMIME, IdCoderUUE, IdCoder00E, IdCoderXXE,
IdCoder, IdCoder3to4, IdBaseComponent;
type
TForm1 = class(TForm)
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
Edit2: TEdit;
IdEncoderMIME1: TIdEncoderMIME;
IdDecoderUUE1: TIdDecoderUUE;
IdDecoderXXE1: TIdDecoderXXE;
IdEncoderXXE1: TIdEncoderXXE;
IdEncoderUUE1: TIdEncoderUUE;
IdDecoderMIME1: TIdDecoderMIME;
RadioGroup1: TRadioGroup;
Button1: TButton;
Button2: TButton;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
case RadioGroup1.ItemIndex of
0:
edit2.Text := IdDecoderMIME1.DecodeString(edit1.Text);
1:
edit2.Text := IdDecoderXXE1.DecodeString(Edit1.Text);
2:
edit2.Text := IdDecoderUUE1.DecodeString(Edit1.Text);
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
case RadioGroup1.ItemIndex of
0:
edit2.Text := IdEncoderMIME1.Encode(edit1.Text);
1:
edit2.Text := IdEncoderXXE1.Encode(edit1.Text);
2:
Edit2.Text := IdEncoderUUE1.Encode(Edit1.Text);
end;
end;
end. |
|