コード例 #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;
        }
コード例 #2
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;
            }
        }