public string Now() { tagInfo file = playlist.config.playlist[playlist.config.currPlay]; string songInfo = file.Artist + " - " + file.Title + " :: " + file.Duration + " : " + file.Type + " : " + file.BitRate + "kbps"; return(songInfo); }
private void addSongs(tagInfo song) { musicListStore.AppendValues( song.Title, song.Genre, song.Artist, song.Album, song.BitRate, song.Type, song.Composer, song.Duration, song.Path); }
public void openFiles() { var data = dialogs.openFileDialog(); if (data.Length > 0) { foreach (string sng in data) { tagInfo tg = getTagInfo(sng); playlist.config.playlist.Add(tg); } } }
public void openDir() { var data = dialogs.openDirDialog(); if (data != "") { string[] songs = mediaData.openDir(data); foreach (string sng in songs) { tagInfo tg = getTagInfo(sng); playlist.config.playlist.Add(tg); } //config.songs.AddRange (songs); //сделать нормально } }
public tagInfo getTagInfo(string path) { tagInfo file = new tagInfo(); TAG_INFO fileTags = BassTags.BASS_TAG_GetFromFile(path, true, true); file.Title = fileTags.title; file.Genre = fileTags.genre; file.Artist = fileTags.artist; file.Album = fileTags.album; file.BitRate = fileTags.bitrate; file.Composer = fileTags.composer; int totalSeconds = (int)fileTags.duration; int seconds = totalSeconds % 60; int minutes = totalSeconds / 60; file.Duration = minutes + ":" + seconds; file.Path = fileTags.filename; return(file); }
public void Remove(tagInfo value) { //songs.Remove(value); }
public void Add(tagInfo song) { songs.AppendValues(song); }