Exemple #1
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;
            });
        }
Exemple #2
0
 private void Playlist_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     SongsView.ReloadData();
 }