|
用Delphi实现整个网站图片的极速下载(2) FDestPath:string; FSubJ:string; procedure Execute;override; public constrUCtor Create(MMUrl,DestPath,SubJ:string); end; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Memo1: TMemo; IdHTTP1: TIdHTTP; CheckBox1: TCheckBox; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } RGetMM:TThread; procedure GetMMThread(MMUrl,DestPath,SubJ:string); public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} //下载过程 procedure TForm1.Button1Click(Sender: TObject); var i,j:integer; SubI,SubJ,CurUrl,DestPath:string; strm:TMemoryStream; begin memo1.Lines.Clear; //建立目录 if not DirectoryExists(girlPic) then MkDir(girlPic); try strm :=TMemoryStream.Create; for I:=1 to OffI do begin for j:=1 to OffJ do begin if (i<10) then SubI:='00'+IntToStr(i) else if (i>9) and (i<100) then SubI:='0'+inttostr(i) else SubI:=inttostr(i); if (j>9) then SubJ:=inttostr(j)
|