|
#1
|
|||
|
|||
Proxy
Код:
procedure TForm2.Button1Click(Sender: TObject); begin if Edit1.Text[Length(Edit1.Text)-1] <> '/' then // Edit1.Text:= Edit1.Text+ '/'; //это отдельный проект Http:= TIdHTTP.Create(nil); if checkbox1.Checked=true then http.ProxyParams.ProxyServer:=Copy(Edit2.Text,1,Pos(':',Edit2.Text)-1); http.ProxyParams.ProxyPort:=StrToInt(Copy(Edit2.Text,Pos(':',Edit2.Text)+1,Length(Edit2.Text))); begin Надо чтоб при checkbox1.Checked=true прокси были, checkbox1.Checked=false проксей не было, как реализовать? Последний раз редактировалось hugolom, 12.08.2010 в 20:55. |
#2
|
|||
|
|||
как-то так:
Код:
if checkbox1.Checked then begin http.ProxyParams.ProxyServer:=Copy(Edit2.Text,1,Pos(':',Edit2.Text)-1); http.ProxyParams.ProxyPort:=StrToInt(Copy(Edit2.Text,Pos(':',Edit2.Text)+1,Length(Edit2.Text))); end; |