Kod: Tümünü seç
WindowsMediaPlayer1.URL :=CheckListBox1.Items[CheckListBox1.ItemIndex];
Kod: Tümünü seç
WindowsMediaPlayer1.URL :=CheckListBox1.Items[CheckListBox1.ItemIndex];
Kod: Tümünü seç
public
{ Public declarations }
index:integer;
str_dir:string;
Kod: Tümünü seç
procedure TForm1.FormShow(Sender: TObject);
var
s:string;
i:integer;
begin
timer1.Enabled:=false;
Bitbtn1.Visible:=false;
FileListBox1.Visible:=false;
//---video dosya adlarını listbox'a al
ListBox1.Clear;
str_dir:= ExtractFilePath(Application.ExeName)+'video\';
FileListBox1.Directory:=ExtractFilePath(Application.ExeName)+'video\';
for i:=0 to FileListBox1.Count-1 do begin
ListBox1.Items.Add(FileListBox1.Items.Strings[i]);
end;
end;
Kod: Tümünü seç
procedure TForm1.Button1Click(Sender: TObject);
var
h,a: integer;
x:string;
begin
index:=0;
WindowsMediaPlayer1.URL:=str_dir+ListBox1.Items.Strings[index] ;
x:=(FloatToStr(windowsMediaPlayer1.currentMedia.duration));
val(x,h,a);
label1.Caption:=IntToStr(h);
WindowsMediaPlayer1.controls.play;
timer1.Enabled:=True;
end;
Kod: Tümünü seç
procedure TForm1.Timer1Timer(Sender: TObject);
begin
label1.Caption:=WindowsMediaPlayer1.status +' '+WindowsMediaPlayer1.controls.currentPositionString+
' ses :'+inttostr(WindowsMediaPlayer1.settings.volume)
+ WindowsMediaPlayer1.currentMedia.durationString ;
if WindowsMediaPlayer1.status='Durduruldu' then begin
inc(index);
if index<Listbox1.Items.Count then
BitBtn1.Click
else
exit ;
end;
end;
Kod: Tümünü seç
procedure TForm1.BitBtn1Click(Sender: TObject);
var
h,a: integer;
x:string;
begin
WindowsMediaPlayer1.URL:=str_dir+ListBox1.Items.Strings[index] ;
x:=(FloatToStr(windowsMediaPlayer1.currentMedia.duration));
val(x,h,a);
label1.Caption:=IntToStr(h);
WindowsMediaPlayer1.controls.play;
end;
Kod: Tümünü seç
if WindowsMediaPlayer1.status='Durduruldu' then
begin
inc(index);
Kod: Tümünü seç
if WindowsMediaPlayer1.status='Durduruldu' then
begin
if CheckListBox1.Checked[index]=true then
inc(index);
Kod: Tümünü seç
if WindowsMediaPlayer1.status='Durduruldu' then
begin
for i:=0 to JvCheckListBox1.Count-1 do
if JvCheckListBox1.Checked[i]=True then
begin
inc(index);
Kod: Tümünü seç
public
{ Public declarations }
index:integer;
end;
Kod: Tümünü seç
procedure TForm1.FormShow(Sender: TObject);
var
i:integer;
begin
CheckListBox1.Clear;
Table1.First;
for i:=0 to Table1.RecordCount-1 do begin
CheckListBox1.Items.Add(Table1.FieldByName('path').AsString);
if Table1.FieldByName('durum').AsBoolean=true then
CheckListBox1.Checked[i]:=true
else
CheckListBox1.Checked[i]:=false;
Table1.Next;
end;
timer1.Enabled:=false;
Bitbtn1.Visible:=false;
end;
Kod: Tümünü seç
procedure TForm1.Button1Click(Sender: TObject);
var
h,a: integer;
x:string;
begin
index:=0;
WindowsMediaPlayer1.URL:=CheckListBox1.Items.Strings[index] ;
x:=(FloatToStr(windowsMediaPlayer1.currentMedia.duration));
val(x,h,a);
label1.Caption:=IntToStr(h);
WindowsMediaPlayer1.controls.play;
timer1.Enabled:=True;
end;
Kod: Tümünü seç
procedure TForm1.BitBtn1Click(Sender: TObject);
var
h,a: integer;
x:string;
begin
WindowsMediaPlayer1.URL:= CheckListBox1.Items.Strings[index] ;
x:=(FloatToStr(windowsMediaPlayer1.currentMedia.duration));
val(x,h,a);
label1.Caption:=IntToStr(h);
WindowsMediaPlayer1.controls.play;
end;
Kod: Tümünü seç
procedure TForm1.Timer1Timer(Sender: TObject);
begin
label1.Caption:=WindowsMediaPlayer1.status +' '+WindowsMediaPlayer1.controls.currentPositionString+
' ses :'+inttostr(WindowsMediaPlayer1.settings.volume)
+ WindowsMediaPlayer1.currentMedia.durationString ;
if WindowsMediaPlayer1.status='Durduruldu' then begin
inc(index);
if index>=CheckListBox1.Items.Count then exit;
if CheckListBox1.Checked[index]=true then begin
if index<CheckListBox1.Items.Count then
BitBtn1.Click
else
exit ;
end
else
exit ;
end;
end;