提交 bceda0a0 编写于 作者: 若苗瞬's avatar 若苗瞬 😶

select song will be like select name list, via a dialog, instead of a fixed filename.

上级 38af514d
此差异已折叠。
......@@ -54,6 +54,7 @@ type
procedure LoadListPermissionRequestResult(Sender: TObject; const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray);
procedure LoadSongPermissionRequestResult(Sender: TObject; const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray);
procedure MyListFile(ASelectedItem: String);
procedure MySongFile(ASelectedItem: String);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
......@@ -256,13 +257,13 @@ begin
// Edit1.Text:=opd_names.FileName;
// end;
// LoadList(Edit1.Text);
if fmSelect = nil then
begin
Application.CreateForm(TfmSelect, fmSelect);
fmSelect.Callback := MyListFile;
end;
fmSelect.Show;
fmSelect.CD(ExtractFilePath(Edit1.Text));
if fmSelect = nil then
begin
Application.CreateForm(TfmSelect, fmSelect);
fmSelect.Callback := MyListFile;
end;
fmSelect.Show;
fmSelect.CD(ExtractFilePath(Edit1.Text));
end
else
TDialogService.ShowMessage('Cannot load list, the required permissions are not granted');
......@@ -275,16 +276,23 @@ begin
(AGrantResults[0] = TPermissionStatus.Granted) and
(AGrantResults[1] = TPermissionStatus.Granted) then
begin
if opd_music.Execute then
begin
musicName:=opd_music.FileName;
end;
if FileExists(musicName) then
begin
MediaPlayer1.Stop;
MediaPlayer1.FileName:=musicName;
MediaPlayer1.Play;
end;
// if opd_music.Execute then
// begin
// musicName:=opd_music.FileName;
// end;
// if FileExists(musicName) then
// begin
// MediaPlayer1.Stop;
// MediaPlayer1.FileName:=musicName;
// MediaPlayer1.Play;
// end;
if fmSelect2 = nil then
begin
Application.CreateForm(TfmSelect, fmSelect2);
fmSelect2.Callback := MySongFile;
end;
fmSelect2.Show;
fmSelect2.CD(ExtractFilePath(musicName));
end
else
TDialogService.ShowMessage('Cannot load song, the required permissions are not granted');
......@@ -296,4 +304,11 @@ begin
//
end;
procedure TForm5.MySongFile(ASelectedItem: String);
begin
MediaPlayer1.Stop;
MediaPlayer1.FileName:=ASelectedItem;
MediaPlayer1.Play;
end;
end.
......@@ -6,7 +6,7 @@
<MainSource>pro_Lottery.dpr</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Release</Config>
<Platform Condition="'$(Platform)'==''">Android64</Platform>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<TargetedPlatforms>32769</TargetedPlatforms>
<AppType>Application</AppType>
</PropertyGroup>
......@@ -217,9 +217,9 @@
<VerInfo_Locale>1033</VerInfo_Locale>
<Icon_MainIcon>res\ICON\cia.ico</Icon_MainIcon>
<VerInfo_Release>8</VerInfo_Release>
<VerInfo_Build>39</VerInfo_Build>
<VerInfo_Build>40</VerInfo_Build>
<VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
<VerInfo_Keys>CompanyName=奥诚科技;FileDescription=奥诚科技新春年会大抽奖;FileVersion=1.0.8.39;InternalName=ac_lattery.exe;LegalCopyright=AC;LegalTrademarks=AC;OriginalFilename=pro_lattery.exe;ProgramID=com.ac.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0;Comments=</VerInfo_Keys>
<VerInfo_Keys>CompanyName=奥诚科技;FileDescription=奥诚科技新春年会大抽奖;FileVersion=1.0.8.40;InternalName=ac_lattery.exe;LegalCopyright=AC;LegalTrademarks=AC;OriginalFilename=pro_lattery.exe;ProgramID=com.ac.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0;Comments=</VerInfo_Keys>
<Icns_MainIcns>res\ICON\cia_48.icns</Icns_MainIcns>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
......@@ -1390,6 +1390,7 @@
<Platforms>
<Platform value="Android">False</Platform>
<Platform value="Android64">True</Platform>
<Platform value="Linux64">False</Platform>
<Platform value="Win32">True</Platform>
<Platform value="Win64">False</Platform>
</Platforms>
......
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<Transactions>
<Transaction>1899-12-30 00:00:00.000.173,=C:\Users\Shion\Documents\Embarcadero\Studio\Projects\Lottery\Unit1.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.274,=D:\WorksProNew\Personal\RAD_XE10\ac_lottery\Unit2.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.748,=D:\WorksProNew\Personal\RAD_XE10\ac_lottery\Unit2.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.964,D:\WorksProNew\Personal\RAD_XE10\ac_lottery\Unit2.pas=D:\WorksProNew\Personal\RAD_XE10\ac_lottery\ufmSelect.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.168,D:\WorksProNew\Personal\RAD_XE10\ac_lottery\Unit2.pas=D:\WorksProNew\Personal\RAD_XE10\ac_lottery\ufmSelect.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.173,=C:\Users\Shion\Documents\Embarcadero\Studio\Projects\Lottery\Unit1.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.060,D:\WorksProNew\Personal\RAD_XE10\ac_lottery\ufmSelect.pas=D:\WorksProNew\Personal\RAD_XE10\ac_lottery\ufmSelect_Sample.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.168,D:\WorksProNew\Personal\RAD_XE10\ac_lottery\Unit2.fmx=D:\WorksProNew\Personal\RAD_XE10\ac_lottery\ufmSelect.fmx</Transaction>
<Transaction>1899-12-30 00:00:00.000.111,C:\Users\Shion\Documents\Embarcadero\Studio\Projects\Lottery\pro_Lottery.dproj=C:\Users\Shion\Documents\Embarcadero\Studio\Projects\Project1.dproj</Transaction>
......
无法预览此类型文件
......@@ -35,6 +35,7 @@ type
var
fmSelect: TfmSelect;
fmSelect2: TfmSelect;
implementation
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册