Exemple #1
0
        void _PlayMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            int curr = _SearchResults.SelectedIndex;
            if (curr != -1)
            {
                Resolver.Result r = _SearchResults.Items[curr] as Resolver.Result;
                if (r == null)
                    return;

                if (e.ClickedItem.Text == "Enqueue")
                    _Sonos.Enqueue(GetCurrentZoneGroup(), r);
                else if (e.ClickedItem.Text == "Get Info")
                {
                    ArtistInspector a = new ArtistInspector(r.artist, r.album, r.track);
                    a.Show(); // TODO, cache this.
                }
            }
        }
Exemple #2
0
        void _PlayMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            int curr = _Feed.SelectedIndex;
            if (curr != -1)
            {
                SocialItem i = _Feed.Items[curr] as SocialItem;

                if (e.ClickedItem.Text == "Get Info")
                {
                    ArtistInspector a = new ArtistInspector(i.Artist, "", i.Track);
                    a.Show(); // TODO, cache this.
                }

                if (i.Source == null)
                    return;

                if (e.ClickedItem.Text == "Enqueue")
                {
                    MainForm f = this.ParentForm as MainForm;
                    bool success = _Sonos.Enqueue(f.GetCurrentZoneGroup(), i.Source);
                    System.Diagnostics.Debug.Assert(success);
                }
            }
        }
Exemple #3
0
        void _Artist_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            // Show form with awesome echo-nesty data here.
            ArtistInspector a = new ArtistInspector(_Artist.Text, _Album.Text, _Track.Text);
            if (_Artist.Text == "Your Mom")
                a = GetArtistInspector("Tori Amos", "Boys for Pele", "");

            a.Show();
        }
Exemple #4
0
        void _PlayMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            int curr = _Queue.SelectedIndex;
            if (curr != -1)
            {
                SonosClient.Metadata r = _Queue.Items[curr] as SonosClient.Metadata;
                if (r == null)
                    return;

                if (e.ClickedItem.Text == "Get Info")
                {
                    ArtistInspector a = new ArtistInspector(r.Artist, r.Album, r.Track);
                    a.Show(); // TODO, cache this.
                }
            }
        }
Exemple #5
0
        ArtistInspector GetArtistInspector(string artist, string album, string track)
        {
            string key = artist + album;
            if (_inspectors.ContainsKey(key))
            {
                ArtistInspector a = _inspectors[key];
                if (a.LoadedSuccessfully())
                    return a;
            }

            ArtistInspector b = new ArtistInspector(artist, album, track);
            _inspectors[key] = b;
            return b;
        }