AmsPlay_DriPro
Publicado: 20 Mar 2018 21:18
AmsPlay com Buscador Exemplo.apz
Chave
!rfDPZ9Z6aGMlN9-_XBFpQEvjCPuZYPjECigio1Dmksk
Imagem1
Imagem2
Chave
!rfDPZ9Z6aGMlN9-_XBFpQEvjCPuZYPjECigio1Dmksk
Imagem1
Imagem2
ListBoxEx.DeleteAllItems("Plugin2");
igt = Input.GetText("Pesquisar");
-------------------------------------------------------------------------------------------------------->> Pesquisar pelo item
local find = File.Find("Biblioteca", "*"..igt.."*", true, false, nil, nil);
if (find) then
fc = Table.Count(find);
for n=1,fc,1 do
-------------------------------------------------------------------------------------------------------->> Associar o Ícone do item
idIcon = ListBoxEx.AddAssocIcon("Plugin2", LBXASSOC_SMALLICON, find[n]);
igt = String.Replace(find[n], _SourceFolder.."\\Biblioteca", _SourceFolder.."\\Biblioteca", true);
color1 = {15263976}
color2 = {13816530}
tFiles = {igt}
local x = color1;
if tFiles ~= "CANCEL" and tFiles then
ListBoxEx.SetUpdate("Plugin2", false);
-------------------------------------------------------------------------------------------------------->> Adicionar item na ListBoxEx
for i , spath in pairs (tFiles) do
idIcon = ListBoxEx.AddAssocIcon("Plugin2", LBXASSOC_SMALLICON, spath);
s = String.SplitPath(spath);
sname = "<p><font color=#0000A0 face='verdana' size=3>"..s.Filename..s.Extension.."</font></p>";
ListBoxEx.AddItem("Plugin2", sname, spath, spath, "", idIcon, LBXITEM_HTML, 0, x, nil, nil);
if x == color1 then
x = color2;
else
x = color1;
end
end
ListBoxEx.SetUpdate("Plugin2", true);
-------------------------------------------------------------------------------------------------------->> Adicionar item MediaPlayer
if MediaPlayer.GetCurrentPos("Plugin1")== 0 then
ListBoxEx.SelectItem("Plugin2", 1, true);
ListBoxEx.SetItemText("Plugin2", 1,ListBoxEx.GetItemText("Plugin2", 1, false).." ".."<font color=#FF8040 face='verdana' size=3> - Playing...</font>");
current = 1;
MediaPlayer.Load("Plugin1", tFiles[1]);
MediaPlayer.Play("Plugin1");
end
end
end
end
ListBoxEx.SelectItem("Plugin2", 1, true);
if Compi ~= 0 then
if Input.GetText("Input_Pesquisar") ~= "" then
ListBoxEx.SelectItem("Plugin2", Varibl, true);
end
end
---------------------------------------------->> total de itens
sTotal = ListBoxEx.GetTotalItems("Plugin2");
Input.SetText("Total", sTotal);