Форум: "Система";
Текущий архив: 2002.02.25;
Скачать: [xml.tar.bz2];
Внизпомогите чем можете Найти похожие ветки
← →
Прикольщик (2001-11-15 22:54) [1]
procedure TTMPMainForm.SliderMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
MPlayer.Position := Slider.Value;
MPlayer.Play;
trMove := False;
end;
procedure TTMPMainForm.NextSong(Num: Integer);
begin
if (HistoryList.Items.Count > 1) and
(((Num > 0) and (HistoryList.ItemIndex < HistoryList.Items.Count - Num)) or
((Num < 0) and (HistoryList.ItemIndex > -1 - Num))) then begin
HistoryList.ItemIndex := HistoryList.ItemIndex + Num;
HistoryListDblClick(Self);
end;
end;
procedure TTMPMainForm.Label1Click(Sender: TObject);
begin
if Direction = 0 then
Direction := 1
else
Direction := 0;
end;
procedure TTMPMainForm.FormResize(Sender: TObject);
begin
if Width < 255 then
Width := 255;
if Height < 150 then
Height := 150;
end;
procedure TTMPMainForm.MPlayerClick(Sender: TObject; Button: TMPBtnType;
var DoDefault: Boolean);
begin
DoDefault:=false;
if (Button=btEject) and (OpenDlg.Execute) then
begin
HistoryList.Items:=OpenDlg.Files;
DirBox.Directory:=ExtractFilePath(OpenDlg.FileName);
DirBox.Update;
end
else
if Button=btPlay then begin
if HistoryList.ItemIndex > -1 then
HistoryListDblClick(self)
else
if MPlayer.FileName<>"" then
begin
try MPlayer.Open;
Slider.MaxValue:=MPlayer.Length;
fPS:=true;
MPlayer.Play;
except
on E: Exception do begin
MPlayer.Close;
ShowMessage(E.Message);
end;
end;
end;
end else if (Button = btPause) and (MPlayer.Mode <> mpPaused) then
MPlayer.Pause
else if (Button = btPause) and (MPlayer.Mode = mpPaused) then
MPlayer.Resume
else if Button = btStop then begin
fPS := False;
MPlayer.Stop;
Slider.Value := MPlayer.Start;
Label1.Caption := "0 : 0";
end else if Button = btNext then
NextSong(1)
else if Button = btPrev then
NextSong(-1);
end;
procedure TTMPMainForm.LoadPlayList1Click(Sender: TObject);
begin
if PlayLisiDlg.Execute then
begin
PlayName:=PlayLisiDlg.FileName;
HistoryList.Items.LoadFromFile(PlayName);
end;
end;
procedure TTMPMainForm.SavePlayList1Click(Sender: TObject);
begin
if SaveListDlg.Execute then
begin
HistoryList.Items.SaveToFile(SaveListDlg.FileName);
end;
end;
procedure TTMPMainForm.CreatePlayList1Click(Sender: TObject);
begin
if SaveListDlg.Execute then
begin
HistoryList.Items.SaveToFile(SaveListDlg.FileName);
end
else
begin
Application.MessageBox("PlayList empty, for the beginning load the list of tunes !","Stop !",MB_ICONSTOP);
end;
end;
end.
Страницы: 1 вся ветка
Форум: "Система";
Текущий архив: 2002.02.25;
Скачать: [xml.tar.bz2];
Память: 0.45 MB
Время: 0.004 c