Ejemplo n.º 1
0
        //recursively check the dictionary until
        //we have generated a new name

        /*
         * public Playlist AppendPlaylistPath(Playlist p)
         * {
         *  if (Playlists.ContainsKey(p.path))
         *  {
         *      string path = p.path;
         *      string dir = Path.GetDirectoryName(path);
         *      string name = Path.GetFileNameWithoutExtension(path);
         *      string ext = Path.GetExtension(path);
         *      name += "+";
         *      path = string.Concat(dir, @"\", name, ext);
         *      p.name = name;
         *      p.path = path;
         *      AppendPlaylistPath(p);
         *  }
         *  else
         *  {
         *      return p;
         *  }
         *  return p;
         * }
         */

        public void DisplayTrackInfo()
        {
            foreach (VItem item in Items)
            {
                string   name = item.Columns[0];
                string   path = item.Columns[1];
                Playlist p    = item.Tag as Playlist;
                item.RestoreColors();
                if (p != null)
                {
                    if (p.tracks.Contains(MusicPlayer.Instance.currentTrackString))
                    {
                        if (MusicPlayer.Instance.playlist != null &&
                            MusicPlayer.Instance.playlist.path == p.path)
                        {
                            item.HighLightColors(new ColorScheme(Color.Black, Color.Yellow));
                        }
                        else
                        {
                            item.HighLightColors(ContainsTrackColor);
                        }
                        continue;
                    }
                }
            }
            //dep?
            _playlist_view.RefreshUI();
        }