Jump to content

Listboxtaki Müzikleri Playlist Yapma


Ejdad
 Share

Recommended Posts

S.aleykum
Arkadaşlar..bir mp3player yapıyorum sorunum var.
Listbox1: Burdaki verileri Saveplaylist butonuyla belirttigimiz uzantıda kopyalayacak.
Saveplaylist:Buton: Buraya kopyalama kodları gelecek
Open playlis:Buton: bunu ben hallettim.

Bunun çözümünü rica ediyorum ilgili arkadaşlardan iyi günler.
Link to comment
Share on other sites

artı arkadaşımızdan ayrdım alarak yapıldı.Al buyur;
Gözat butonu;

[quote]AddList("list");[/quote]

Çalma listesi oluştur butonu;

[quote]CreatePlayList("list")[/quote]

Global Function kodları;
[quote]--listeye ekle
function AddList(list)
local tFile = Dialog.FileBrowse(true,"Dosya Seçin:",_DesktopFolder,"MP3 Dosyası(*.mp3)|*.mp3|","","",true,false);
if (tFile and tFile[1]~="CANCEL") then
ListBox.SetUpdate(list,false);
for i=1,#tFile do
local split = String.SplitPath(tFile[i]);
ListBox.AddItem(list,split.Filename..split.Extension,tFile[i]);
end
ListBox.SetUpdate(list,true);
end
end
--çalma listesi oluştur
function CreatePlayList(list)
local count = ListBox.GetCount(list)
if (count>0) then
local tFile = Dialog.FileBrowse(false,"Dosya Kaydet",_DesktopFolder,"Çalma Listesi(*.m3u)|*.m3u|","","m3u",false,false);
if (tFile and tFile[1]~="CANCEL") then
local str = ""
for i=1,count do
str = str .. ListBox.GetItemData(list,i).."\r\n"
end
TextFile.WriteFromString(tFile[1],str,false);
end
else
Dialog.Message("Uyarı","Listede veri yok.");
end
end[/quote]


:download1:
[codebox]http://www.mediafire.com/?z8qurx9yc8sawj2 [/codebox]

artı teşekkürler (kadir abi)

Edited by pilgetir
Link to comment
Share on other sites

[quote name='Ejdad' date='09 September 2011 - 22:43 ' timestamp='1315597435' post='1076760']
Teşekkür ederim kardeş çok iyi oldu. :)
Bir istegim daha olacak sizden tabi müsaitseniz :rolleyes: birde bu kaydedilen playlisti projede açacak open kodu nedir ?
[/quote]

[b]Listeye Ekle Fonksiyonunu da Vermiş Zaten pilgetir.[/b]

Link to comment
Share on other sites

[quote]
Ya projene uyarlamadım zamanım yoktu kendim hazırladım.Al buyur;
Gözat butonu;


Alıntı


AddList("list");


Çalma listesi oluştur butonu;


Alıntı


CreatePlayList("list")


Global Function kodları;

Alıntı


--listeye ekle
function AddList(list)
local tFile = Dialog.FileBrowse(true,"Dosya Seçin:",_DesktopFolder,"MP3 Dosyası(*.mp3)|*.mp3|","","",true,false);
if (tFile and tFile[1]~="CANCEL") then
ListBox.SetUpdate(list,false);
for i=1,#tFile do
local split = String.SplitPath(tFile[i]);
ListBox.AddItem(list,split.Filename..split.Extension,tFile[i]);
end
ListBox.SetUpdate(list,true);
end
end
--çalma listesi oluştur
function CreatePlayList(list)
local count = ListBox.GetCount(list)
if (count>0) then
local tFile = Dialog.FileBrowse(false,"Dosya Kaydet",_DesktopFolder,"Çalma Listesi(*.m3u)|*.m3u|","","m3u",false,false);
if (tFile and tFile[1]~="CANCEL") then
local str = ""
for i=1,count do
str = str .. ListBox.GetItemData(list,i).."\r\n"
end
TextFile.WriteFromString(tFile[1],str,false);
end
else
Dialog.Message("Uyarı","Listede veri yok.");
end
end
[/quote]

Çok ayıp mert sana hiç yakıştıramadım kendi hazırlamdığın şeyleri millete ben hazırladım diye yediriyorsun!

Link to comment
Share on other sites

Global functions daki LoadPlayList te ufak bir değişiklik yap dalgınlığıma gelmiş doğrusu şöyle olacak:

[code]--çalma listesini yükle
function LoadPlayList(list)
local tFile = Dialog.FileBrowse(true,"Dosya Kaydet",_DesktopFolder,"Çalma Listesi(*.m3u)|*.m3u|","","m3u",false,false);
if (tFile and tFile[1]~="CANCEL") then
local readTbl = TextFile.ReadToTable(tFile[1]);
if (readTbl) then
ListBox.SetUpdate(list,false);
for i=1,#readTbl do
local split = String.SplitPath(readTbl[i]);
ListBox.AddItem(list,split.Filename..split.Extension,readTbl[i]);
end
ListBox.SetUpdate(list,true);
end
end
end[/code]

Link to comment
Share on other sites

Rica ederim yoğun biri olduğum için fazla takılmıyorum buraya veya başka forumlara ve kimseye kızdığım yok (pilgetir). Sadece demek istediğim kendi yapmadığı şeyi niye kendi yapmış gibi gösteriyor benim bir sürü işim gücüm varken yardım ediyorum insanlık gösteriyoruz ama anlamıyorlar galiba insanlıktan neyse iyi geceler fazla uzatmayayım konuyu.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...