Пример #1
0
 private void button_video_on_Click(object sender, RoutedEventArgs e)
 {
     foreach (ServiceItem info in listView_service.Items)
     {
         info.IsSelected = ChSet5.IsVideo(info.ServiceInfo.service_type);
     }
 }
Пример #2
0
 private void button_dttv_on2_Click(object sender, RoutedEventArgs e)
 {
     foreach (ServiceItem info in listView_service.Items)
     {
         if (ChSet5.IsDttv(info.ServiceInfo.ONID) == true && ChSet5.IsVideo(info.ServiceInfo.service_type) == true)
         {
             info.IsSelected = true;
         }
     }
 }
Пример #3
0
 private void button_cs_on_Click(object sender, RoutedEventArgs e)
 {
     foreach (ServiceItem info in listView_service.Items)
     {
         if (ChSet5.IsCS(info.ServiceInfo.ONID) &&
             ChSet5.IsCS3(info.ServiceInfo.ONID) == false &&
             ChSet5.IsVideo(info.ServiceInfo.service_type))
         {
             info.IsSelected = true;
         }
     }
 }
Пример #4
0
        /// <summary>
        /// 映像のみ全追加
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_service_addVideo_Click(object sender, RoutedEventArgs e)
        {
            ListBox target = tabItem_bs.IsSelected ? listBox_serviceBS :
                             tabItem_cs.IsSelected ? listBox_serviceCS :
                             tabItem_cs3.IsSelected ? listBox_serviceCS3 :
                             tabItem_tere.IsSelected ? listBox_serviceTere :
                             tabItem_other.IsSelected ? listBox_serviceOther : null;

            if (target != null)
            {
                foreach (ChSet5Item info in target.Items)
                {
                    if (ChSet5.IsVideo(info.ServiceType) && listBox_serviceView.Items.Cast <ChSet5Item>().All(info2 => info2.Key != info.Key))
                    {
                        listBox_serviceView.Items.Add(info);
                    }
                }
            }
        }
Пример #5
0
        /// <summary>
        /// 映像のみ全追加
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_service_addVideo_Click(object sender, RoutedEventArgs e)
        {
            ListBox target = tabItem_bs.IsSelected ? listBox_serviceBS :
                             tabItem_cs.IsSelected ? listBox_serviceCS :
                             tabItem_cs3.IsSelected ? listBox_serviceCS3 :
                             tabItem_tere.IsSelected ? listBox_serviceTere :
                             tabItem_other.IsSelected ? listBox_serviceOther : null;

            if (target != null)
            {
                foreach (var info in target.Items.Cast <Tuple <string, ulong> >().Skip(1))
                {
                    if (ChSet5.Instance.ChList.ContainsKey(info.Item2) &&
                        ChSet5.IsVideo(ChSet5.Instance.ChList[info.Item2].ServiceType) &&
                        listBox_serviceView.Items.Cast <Tuple <string, ulong> >().All(info2 => info2.Item2 != info.Item2))
                    {
                        listBox_serviceView.Items.Add(info);
                    }
                }
            }
        }