コード例 #1
0
        public async void ShowRecentlyPlayedBord()
        {
            LoadingScreen();
            NoImageList_Control noImageList_Control = Init_NoImageList_Control();
            Service1Client      client = new Service1Client();

            noImageList_Control.CurrentPlaylist = await client.GetRecentlyPlayedAsync(state.user.ID);

            if (tape_panel.Child.GetType() != typeof(ProgressBar))
            {
                return;
            }
            noImageList_Control.Init();
            tape_panel.Child = noImageList_Control;
            client.Close();
        }
コード例 #2
0
        private async void SearchPanel_ViewAllSongs(string search_str)
        {
            LoadingScreen();
            Service1Client client = new Service1Client();
            var            list   = await client.Search_GetAllSongsAsync(search_str);

            client.Close();

            if (tape_panel.Child.GetType() != typeof(ProgressBar))
            {
                return;
            }
            NoImageList_Control noImageList_Control = Init_NoImageList_Control();

            noImageList_Control.CurrentPlaylist = list;
            noImageList_Control.Init();
            tape_panel.Child = noImageList_Control;
        }
コード例 #3
0
        public async void ShowFavoritesBord()
        {
            LoadingScreen();
            NoImageList_Control noImageList_Control = Init_NoImageList_Control();
            Service1Client      client = new Service1Client();

            noImageList_Control.CurrentPlaylist = await client.GetFavoriteTracksPlaylistAsync(state.user.ID);

            if (tape_panel.Child.GetType() != typeof(ProgressBar))
            {
                return;
            }
            noImageList_Control.Init();
            if (noImageList_Control.CurrentPlaylist.ID == state.currentPlaylist.ID && noImageList_Control.SongList.SelectedIndex < 0 && state.currentSong != null)
            {
                noImageList_Control.SongList.SelectedIndex = noImageList_Control.CurrentPlaylist.Songs.ToList()
                                                             .IndexOf(noImageList_Control.CurrentPlaylist.Songs.Where(n => n.ID == state.currentSong.ID)
                                                                      .First());
            }
            tape_panel.Child  = noImageList_Control;
            state.Current_Tab = noImageList_Control;
            client.Close();
        }