Exemplo n.º 1
0
        private async void Radio_Loaded(object sender, RoutedEventArgs e)
        {
            ProgressBar_Loading.Visibility = Visibility.Visible;
            DjRadio djRadio = await DjRadioService.GetUserCreatedRadio(ConfigService.Uid);

            if (djRadio == null)
            {
                NotifyPopup notifyPopup = new NotifyPopup("获取失败");
                notifyPopup.Show();
            }
            else
            {
                ListBox_Created.ItemsSource = djRadio.DjRadios;
            }
            ProgressBar_Loading.Visibility = Visibility.Collapsed;
        }
Exemplo n.º 2
0
        private async void ListBox_Click(object sender, TappedRoutedEventArgs e)
        {
            var seletedItem = ((ListBox)sender).SelectedItem as DjRadiosItem;

            ProgressBar_Loading.Visibility = Visibility.Visible;
            RadioPrograms radioPrograms = await DjRadioService.GetRadioSongItem(seletedItem.Id);

            if (radioPrograms == null)
            {
                ProgressBar_Loading.Visibility = Visibility.Collapsed;
                NotifyPopup notifyPopup = new NotifyPopup("获取失败");
                notifyPopup.Show();
                return;
            }
            ProgressBar_Loading.Visibility = Visibility.Collapsed;
            Frame.Navigate(typeof(RadioDetail), radioPrograms.Programs);
        }
Exemplo n.º 3
0
        private async void Pivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            PivotItem pivotItem = (PivotItem)((Pivot)sender).SelectedItem;

            if (pivotItem.Tag.ToString() == "1" && ListBox_Sublist.ItemsSource == null)
            {
                ProgressBar_Loading.Visibility = Visibility.Visible;
                DjRadio djRadio = await DjRadioService.GetUserSublistRadio();

                if (djRadio == null)
                {
                    NotifyPopup notifyPopup = new NotifyPopup("获取失败");
                    notifyPopup.Show();
                }
                else
                {
                    ListBox_Sublist.ItemsSource = djRadio.DjRadios;
                }
                ProgressBar_Loading.Visibility = Visibility.Collapsed;
            }
        }