Esempio n. 1
0
        private void PlaySong(Song song)
        {
            currentSong                 = song;
            SongNameLabel.Text          = song.Title;
            ArtistName.Text             = song.Artist;
            BackgroundImage.Image       = FromUrl(song.AlbumArtLarge);
            BackgroundImage.Alpha       = 0.6f;
            BackgroundImage.ContentMode = UIViewContentMode.ScaleAspectFill;
            Play(song.StreamUrl);

            SongsView.CenterSong(currentSong);

            UpdateButtonViews();
        }
Esempio n. 2
0
        private void Instance_Connected(object sender, EventArgs e)
        {
            InvokeOnMainThread(async() =>
            {
                await DataService.Instance.InitDataServiceAsHost();
                DataService.Instance.Playlist.CollectionChanged += Playlist_CollectionChanged;

                var source             = new SongViewDataSource(DataService.Instance.Playlist);
                SongsView.SongFocused += SongsView_SongFocused;

                SongsView.DataSource = source;
                SongsView.ReloadData();

                View.SetNeedsFocusUpdate();
                View.UpdateFocusIfNeeded();

                PartyCodeLabel.Text = "The code is " + DataService.Instance.PartyCode;
            });
        }
Esempio n. 3
0
 private void Playlist_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     SongsView.ReloadData();
 }