Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
        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);
                }
            }
        }
Ejemplo n.º 4
0
        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);
                //сделать нормально
            }
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
 public void Remove(tagInfo value)
 {
     //songs.Remove(value);
 }
Ejemplo n.º 7
0
 public void Add(tagInfo song)
 {
     songs.AppendValues(song);
 }