Exemplo n.º 1
0
        void InitElement()
        {
            xUpDownStackPanel.Visibility = Visibility.Visible;
            xUpDownDownload.Visibility   = Visibility.Visible;
            if (DetailPageHelp.ChannelDetailInfoForPrograms.IsNumber)
            {
                _isSmallItem = true;
                smallProgramListDataSource            = new SmallProgramListDataSource(DetailPageHelp.ChannelDetailInfoForPrograms);
                smallProgramListDataSourceForDownload = new SmallProgramListDataSource(DetailPageHelp.ChannelDetailInfoForDownload);
                xProgramsListBox.ItemsSource          = smallProgramListDataSource;
                xProgramsListBox.ItemTemplate         = Resources["SmallProgramItemDataTemplate"] as DataTemplate;

                xProgramsListDownload.ItemsSource  = smallProgramListDataSourceForDownload;
                xProgramsListDownload.ItemTemplate = Resources["MultiProgramDataTemplate"] as DataTemplate;
            }
            else
            {
                _isSmallItem = false;
                longProgramListDataSource            = new LongProgramListDataSource(DetailPageHelp.ChannelDetailInfoForPrograms);
                longProgramListDataSourceForDownload = new LongProgramListDataSource(DetailPageHelp.ChannelDetailInfoForDownload);
                xProgramsListBox.ItemsSource         = longProgramListDataSource;
                xProgramsListBox.ItemTemplate        = Resources["LongProgramItemDataTemplate"] as DataTemplate;

                xProgramsListDownload.ItemsSource  = longProgramListDataSourceForDownload;
                xProgramsListDownload.ItemTemplate = Resources["MultiLongProgramItemDataTemplate"] as DataTemplate;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 剧集分集排序
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void xDownButton_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     if (_isSmallItem)
     {
         smallProgramListDataSource   = new SmallProgramListDataSource(DetailPageHelp.ChannelDetailInfoForPrograms, !isRe);
         xProgramsListBox.ItemsSource = smallProgramListDataSource;
     }
     else
     {
         longProgramListDataSource    = new LongProgramListDataSource(DetailPageHelp.ChannelDetailInfoForPrograms, !isRe);
         xProgramsListBox.ItemsSource = longProgramListDataSource;
     }
     (xDownButton.RenderTransform as CompositeTransform).Rotation = (xDownButton.RenderTransform as CompositeTransform).Rotation == 0 ? 180 : 0;
     //if ((xDownButton.RenderTransform as CompositeTransform).Rotation != 90)
     //{
     //    (xDownButton.RenderTransform as CompositeTransform).Rotation = 90;
     //}
     //else
     //{
     //    (xDownButton.RenderTransform as CompositeTransform).Rotation = 270;
     //}
     isRe = !isRe;
 }
Exemplo n.º 3
0
 /// <summary>
 /// 剧集分集排序
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void xDownButton_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     if (_isSmallItem)
     {
         smallProgramListDataSource = new SmallProgramListDataSource(DetailPageHelp.ChannelDetailInfoForPrograms, !isRe);
         xProgramsListBox.ItemsSource = smallProgramListDataSource;
     }
     else
     {
         longProgramListDataSource = new LongProgramListDataSource(DetailPageHelp.ChannelDetailInfoForPrograms, !isRe);
         xProgramsListBox.ItemsSource = longProgramListDataSource;
     }
     (xDownButton.RenderTransform as CompositeTransform).Rotation = (xDownButton.RenderTransform as CompositeTransform).Rotation == 0 ? 180 : 0;
     //if ((xDownButton.RenderTransform as CompositeTransform).Rotation != 90)
     //{
     //    (xDownButton.RenderTransform as CompositeTransform).Rotation = 90;
     //}
     //else
     //{
     //    (xDownButton.RenderTransform as CompositeTransform).Rotation = 270;
     //}
     isRe = !isRe;
 }
Exemplo n.º 4
0
        void InitElement()
        {
            xUpDownStackPanel.Visibility = Visibility.Visible;
            xUpDownDownload.Visibility = Visibility.Visible;
            if (DetailPageHelp.ChannelDetailInfoForPrograms.IsNumber)
            {
                _isSmallItem = true;
                smallProgramListDataSource = new SmallProgramListDataSource(DetailPageHelp.ChannelDetailInfoForPrograms);
                smallProgramListDataSourceForDownload = new SmallProgramListDataSource(DetailPageHelp.ChannelDetailInfoForDownload);
                xProgramsListBox.ItemsSource = smallProgramListDataSource;
                xProgramsListBox.ItemTemplate = Resources["SmallProgramItemDataTemplate"] as DataTemplate;

                xProgramsListDownload.ItemsSource = smallProgramListDataSourceForDownload;
                xProgramsListDownload.ItemTemplate = Resources["MultiProgramDataTemplate"] as DataTemplate;
            }
            else
            {
                _isSmallItem = false;
                longProgramListDataSource = new LongProgramListDataSource(DetailPageHelp.ChannelDetailInfoForPrograms);
                longProgramListDataSourceForDownload = new LongProgramListDataSource(DetailPageHelp.ChannelDetailInfoForDownload);
                xProgramsListBox.ItemsSource = longProgramListDataSource;
                xProgramsListBox.ItemTemplate = Resources["LongProgramItemDataTemplate"] as DataTemplate;

                xProgramsListDownload.ItemsSource = longProgramListDataSourceForDownload;
                xProgramsListDownload.ItemTemplate = Resources["MultiLongProgramItemDataTemplate"] as DataTemplate;
            }
        }