public void MediaForm_Load(object sender, EventArgs e) { foreach (string x in this._list) { takeData(x); } for (int i = 0; i < this._list.Count; i++) { string title = this._title[i]; string artist = this._firstPerformer[i]; string album = this._ablum[i]; string duration = this._length[i]; SongInfoForm temp = new SongInfoForm(this, i, _list[i], album, title, artist, duration); this._songInfo.Add(temp); addSongInfo(temp); } if (this._parent.havePlayed() && !this._firstPlay) { this.setup(this._parent.getNowPlayIndex()); if (this._parent.getNowPlayIndex() == 0) { this._lastPlayed = this._parent.getNowPlayIndex(); } } }
private void addSongInfo(SongInfoForm temp) { temp.TopLevel = false; temp.FormBorderStyle = FormBorderStyle.None; temp.Dock = DockStyle.Top; mediaPanel.Controls.Add(temp); //mediaPanel.Tag = temp; temp.BringToFront(); temp.Show(); }
public void addNewSong(List <String> newSongs) { //check if (this._list.Count == 0) { this._list = newSongs; } foreach (String x in newSongs) { takeData(x); } for (int i = this._list.Count - newSongs.Count; i < this._list.Count; i++) { string title = this._title[i]; string artist = this._firstPerformer[i]; string album = this._ablum[i]; string duration = this._length[i]; SongInfoForm temp = new SongInfoForm(this, i, _list[i], album, title, artist, duration); this._songInfo.Add(temp); addSongInfo(temp); } }