unit threadtest;
interface
uses
System.Classes, f1diashow,f4einstellungendiashow, System.SysUtils;
type
geetest =
class(TThread)
protected
procedure Execute;
override;
end;
implementation
procedure vclsettings;
begin
form1.Image1.Visible:=true;
form1.Image1.Bitmap.LoadFromFile(playlist[0]);
form1.image1.Height:=form1.Height;
form1.image1.Width:=form1.Width;
form1.image1.Position.X:=0;
form1.image1.Position.Y:=0;
count:=0;
form1.speedbutton1.Visible:=false;
form1.speedbutton3.Visible:=false;
form1.listbox1.Visible:=false;
form1.Panel2.Visible:=false;
form1.Timer1.Enabled:=true;
form1.speedbutton2.Visible:=true;
form1.label3.Visible:=false;
form1.progressbar1.Value:=0;
end;
procedure geetest.Execute;
var
i4: integer;
begin
NameThreadForDebugging('
threadgee');
{ Place thread code here }
if filelistFINAL.Count>form4.SpinBox2.Value-1
then form1.progressbar1.Max:=form4.SpinBox2.Value
else form1.progressbar1.Max:= filelistFINAL.Count;
for i4 := 0
to filelistFINAL.Count-1
do begin
if stop=false
then begin
form1.progressbar1.value:=i4+1;
try
form1.idftp1.get(filelistFINAL[i4],gethomepath+'
/Temp/'+filelistFINAL[i4], true);
except
end;
PlayList.add(gethomepath+'
/Temp/'+filelistFINAL[i4]);
//Während des Downloads wird die DIASHOW gestartet (ja nach Puffer Grösse)
if form1.Timer1.Enabled=false
then begin
if filelistfinal.Count>form4.SpinBox2.Value-1
then begin
//SOFERN playlist grösser ist als der Puffer
if PlayList.Count>form4.spinbox2.value-1
then begin
form1.progressbar1.value:=i4+1;
form1.timer1.interval:=strtoint(form4.SpinBox1.text)*1000;
Synchronize(vclsettings);
end;
// ist die FileListFINAL kleiner als der Puffer und aber mindestens 1 Bild geladen
end else if playlist.count>-1
then begin
form1.progressbar1.value:=i4+1;
form1.timer1.interval:=strtoint(form4.SpinBox1.text)*1000;
Synchronize(vclsettings);
end;
end;
end else begin
//Schlaufe wir abgebrochen da Boolean STOP=TRUE ist
form1.timer1.Enabled:=false;
form1.image1.Bitmap:=nil;
form1.speedbutton1.Visible:=true;
form1.speedbutton3.Visible:=true;
form1.listbox1.Visible:=true;
form1.image1.Visible:=false;
form1.label3.Visible:=true;
form1.speedbutton2.Visible:=false;
form1.panel2.Visible:=false;
break;
end;
end;
end;
end.