Пример #1
0
 protected override void OnAppearing()
 {
     base.OnAppearing();
     for (int i = 0; i < audioList.audio.Count; i++)
     {
         audioList.audio[i].image_path = Constants.SERVER_IMG_URL + audioList.audio[i].image_path;
     }
     items = new AudioPlayItemList(audioList.audio);
     flowlistview.FlowItemsSource = items.Items;
 }
Пример #2
0
        private async Task GetPlayList()
        {
            string ret = string.Empty;

            StaticMethods.ShowLoader();
            Task.Factory.StartNew(
                // tasks allow you to use the lambda syntax to pass wor
                () =>
            {
                playlist = WebService.GetPlaylist();
            }).ContinueWith(
                t =>
            {
                if (playlist != null)
                {
                    //for (int i = 0; i < playlist.Count; i++)
                    //{
                    //	playlist[i].image_path = Constants.SERVER_IMG_URL + playlist[i].image_path;
                    //}
                    //flowlistview.FlowItemsSource =playlist;
                    if (WebService.playlistModel != null)
                    {
                        ;
                        for (int i = 0; i < WebService.playlistModel.playlist.Count; i++)
                        {
                            if (WebService.playlistModel.playlist[i].playlist_ctegoryid == audioList.playlist_ctegoryid)
                            {
                                audioList.audio = WebService.playlistModel.playlist[i].audio;
                            }


                            for (int j = 0; j < audioList.audio.Count; j++)
                            {
                                audioList.audio[j].image_path = Constants.SERVER_IMG_URL + audioList.audio[j].image_path;
                            }
                            items = new AudioPlayItemList(audioList.audio);
                            flowlistview.FlowItemsSource = items.Items;
                        }
                    }
                }
            }, TaskScheduler.FromCurrentSynchronizationContext()
                );
        }