Esempio n. 1
0
    public void updateHoverUI(PlaylistScript playlistScript)
    {
        this.playlistScript = playlistScript;

        FullTrack track = playlistScript.getFullTrack();

        if (track != null)
        {
            TimeSpan t = TimeSpan.FromMilliseconds(playlistScript.getFullTrack().DurationMs);

            FullTrack fullTrack = playlistScript.getFullTrack();

            string answer = string.Format("{0:D2}m:{1:D2}s",
                                          t.Minutes,
                                          t.Seconds);

            textPro.SetText(playlistScript.getPlaylistName()
                            + "\n" + "Length: " + answer + "\n" + fullTrack.Artists[0].Name
                            );
        }
        else
        {
            textPro.SetText(playlistScript.getPlaylistName());
        }
    }