public void createMusicsList() { string[] files = Directory.GetFiles(@"./", "*.mp3"); int positionY = 2; int lengthBar = 0; if (files.Length >= 9) { lengthBar = 20; } for (int i = 0; i < files.Length; i++) { Music music = new Music(files[i]); FormMusic form = new FormMusic(this, i, this.windows, getBasename(files[i]), 2, positionY, lengthBar, BACK_COLOR); addFormMusics(form); addMusic(music); positionY += 50 + DISTANCE_BETWEEN_MUSICS; } }
public void addFormMusics(FormMusic form) { this.listForms.Add(form); }
public void newMusicsList(string path) { cleanMusicsList(); string[] files = Directory.GetFiles(@""+path, "*.mp3"); int positionY = 2; int lengthBar = 0; if(files.Length >=9) { lengthBar = 18; } for (int i = 0; i < files.Length; i++) { Music music = new Music(files[i]); FormMusic form = new FormMusic(this,i,this.windows,getBasename(files[i]),2,positionY,lengthBar,BACK_COLOR); addFormMusics(form); addMusic(music); positionY+=50+DISTANCE_BETWEEN_MUSICS; } }
public void addFormMusics(FormMusic form) { this.listForms.Add(form); }