www.pudn.com > mail104s.lzh > MIMELIST.PAS
unit mimelist;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComCtrls, StdCtrls, Buttons;
type
TMIMEListForm = class(TForm)
IconList: TListView;
ImageList1: TImageList;
SaveDialog1: TSaveDialog;
OpenDialog1: TOpenDialog;
BitBtn1: TBitBtn;
procedure IconListClick(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
MIMEFileCount:Integer;
end;
var
MIMEListForm: TMIMEListForm;
implementation
uses uucp, pop3, smtpsend;
{$R *.DFM}
procedure TMIMEListForm.IconListClick(Sender: TObject);
begin
// Decoded process
if POPDialog.FoundMIME then
begin
SaveDialog1.FileName:=IconList.selected.caption;
UUCPForm.CodeFlag:=2;
if SaveDialog1.Execute then
begin
UUCPForm.EnSrc:='getbox.tmp';
UUCPForm.EnDest:=SaveDialog1.FileName;
UUCPForm.ShowModal;
end;
end;
end;
procedure TMIMEListForm.BitBtn1Click(Sender: TObject);
var
I:Integer;
ImgBmp:TIcon;
begin
if SMTPDialog.MIMEMail then
begin
I:=0;
ImgBmp:=TIcon.Create;
ImgBmp.LoadFromFile('mailpict.ico');
MIMEListForm.ImageList1.AddIcon(ImgBmp);
if OPenDialog1.Execute then
begin
IconList.Items.Add;
IconList.Items[MIMEFileCount].Caption:=OpenDialog1.FileName;
Inc(MIMEFileCount);
end;
ImgBmp.Destroy;
end;
end;
end.