unit Unit1;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Media,
FMX.ListBox, FMX.Layouts, FMX.StdCtrls, System.IOUtils;
type
TForm1 =
class(TForm)
ListBox1: TListBox;
ListBoxItem1: TListBoxItem;
ListBoxItem2: TListBoxItem;
ListBoxItem3: TListBoxItem;
MediaPlayer1: TMediaPlayer;
MediaPlayer2: TMediaPlayer;
procedure ListBoxItem1Click(Sender: TObject);
procedure ListBoxItem2Click(Sender: TObject);
procedure ListBoxItem3Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.fmx}
procedure TForm1.ListBoxItem1Click(Sender: TObject);
begin
mediaPlayer1.FileName := TPath.Combine(TPath.GetDocumentsPath, '
eins.mp3');
mediaPlayer1.Play;
end;
procedure TForm1.ListBoxItem2Click(Sender: TObject);
begin
mediaPlayer1.FileName := TPath.Combine(TPath.GetDocumentsPath, '
zwei.mp3');
mediaPlayer1.Play;
end;
procedure TForm1.ListBoxItem3Click(Sender: TObject);
begin
mediaPlayer1.FileName := TPath.Combine(TPath.GetDocumentsPath, '
drei.mp3');
mediaPlayer1.Play;
end;
end.