예제 #1
0
        public EpgDataViewSetting()
        {
            InitializeComponent();

            DataContext = new CustomEpgTabInfo();
            try
            {
                comboBox_timeH_week.ItemsSource = Enumerable.Range(0, 24);
                info.StartTimeWeek = 4;

                servieceList = ChSet5.ChList.Values.Select(item => new ServiceViewItem(item)).ToDictionary(item => item.Key, item => item);
                var selectedList = ChSet5.ChListSelected.Select(item => servieceList[item.Key]).ToList();
                listBox_serviceDttv.ItemsSource  = selectedList.Where(item => item.ServiceInfo.IsDttv == true);
                listBox_serviceBS.ItemsSource    = selectedList.Where(item => item.ServiceInfo.IsBS == true);
                listBox_serviceCS.ItemsSource    = selectedList.Where(item => item.ServiceInfo.IsCS == true);
                listBox_serviceSP.ItemsSource    = selectedList.Where(item => item.ServiceInfo.IsSPHD == true);
                listBox_serviceOther.ItemsSource = selectedList.Where(item => item.ServiceInfo.IsOther == true);
                listBox_serviceAll.ItemsSource   = selectedList;

                foreach (TabItem tab in tab_ServiceList.Items)
                {
                    tab.Visibility = ((ListView)tab.Content).Items.Count == 0 ? Visibility.Collapsed : Visibility.Visible;
                }

                listBox_jyanru.ItemsSource = CommonManager.ContentKindList;

                viewModeRadioBtns = new RadioBtnSelect(PanelDisplaySet);

                listBox_Button_Set();
                listBox_serviceView_ContextMenu_Set();
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
        }
예제 #2
0
        public RecSettingView()
        {
            InitializeComponent();

            try
            {
                if (CommonManager.Instance.NWMode == true)
                {
                    preEdit.button_add.IsEnabled = false;
                    preEdit.button_chg.IsEnabled = false;
                    preEdit.button_del.IsEnabled = false;
                    preEdit.button_add.ToolTip   = "EpgTimerNWからは変更出来ません";
                    preEdit.button_chg.ToolTip   = preEdit.button_add.ToolTip;
                    preEdit.button_del.ToolTip   = preEdit.button_add.ToolTip;
                }

                recSetting = Settings.Instance.RecPresetList[0].Data.DeepClone();

                comboBox_recMode.ItemsSource  = CommonManager.RecModeList;
                comboBox_tuijyu.ItemsSource   = CommonManager.YesNoList;
                comboBox_pittari.ItemsSource  = CommonManager.YesNoList;
                comboBox_priority.ItemsSource = CommonManager.PriorityList;

                recEndModeRadioBtns = new RadioBtnSelect(radioButton_non, radioButton_standby, radioButton_suspend, radioButton_shutdown);

                tunerList.Add(new TunerSelectInfo("自動", 0));
                foreach (TunerReserveInfo info in CommonManager.Instance.DB.TunerReserveList.Values)
                {
                    if (info.tunerID != 0xFFFFFFFF)
                    {
                        tunerList.Add(new TunerSelectInfo(info.tunerName, info.tunerID));
                    }
                }
                comboBox_tuner.ItemsSource   = tunerList;
                comboBox_tuner.SelectedIndex = 0;

                stackPanel_PresetEdit.Children.Clear();
                stackPanel_PresetEdit.Children.Add(preEdit);
                preEdit.Set(this, PresetSelectChanged, PresetEdited, "録画プリセット", SetRecPresetWindow.SettingWithDialog);
                comboBox_preSet = preEdit.comboBox_preSet;

                var bx = new BoxExchangeEdit.BoxExchangeEditor(null, listView_recFolder, true, true, true);
                bx.TargetBox.KeyDown += ViewUtil.KeyDown_Enter(button_recFolderChg);
                bx.targetBoxAllowDoubleClick(bx.TargetBox, (sender, e) => button_recFolderChg.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)));
                button_recFolderDel.Click += new RoutedEventHandler(bx.button_Delete_Click);

                button_bat.Click += ViewUtil.OpenFileNameDialog(textBox_bat, false, "", ".bat", true);
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
        }
예제 #3
0
        public RecSettingView()
        {
            PresetResCompare = false;

            InitializeComponent();

            if (CommonManager.Instance.NWMode == true)
            {
                preEdit.button_add.IsEnabled = false;
                preEdit.button_chg.IsEnabled = false;
                preEdit.button_del.IsEnabled = false;
                preEdit.button_add.ToolTip   = "EpgTimerNWからは変更出来ません";
                preEdit.button_chg.ToolTip   = preEdit.button_add.ToolTip;
                preEdit.button_del.ToolTip   = preEdit.button_add.ToolTip;
            }

            recSetting = Settings.Instance.RecPresetList[0].Data.DeepClone();

            comboBox_recMode.ItemsSource  = CommonManager.RecModeList;
            comboBox_priority.ItemsSource = CommonManager.PriorityList;

            recEndModeRadioBtns = new RadioBtnSelect(radioButton_non, radioButton_standby, radioButton_suspend, radioButton_shutdown);

            comboBox_tuner.ItemsSource = new List <TunerSelectInfo> {
                new TunerSelectInfo("自動", 0)
            }
            .Concat(CommonManager.Instance.DB.TunerReserveList.Values
                    .Where(info => info.tunerID != 0xFFFFFFFF)
                    .Select(info => new TunerSelectInfo(info.tunerName, info.tunerID)));
            comboBox_tuner.SelectedIndex = 0;

            grid_PresetEdit.Children.Clear();
            grid_PresetEdit.Children.Add(preEdit);
            preEdit.Set(this, PresetSelectChanged, PresetEdited, "録画プリセット", SetRecPresetWindow.SettingWithDialog);
            comboBox_preSet = preEdit.comboBox_preSet;
            checkBox_setWithoutRecTag.IsChecked = Settings.Instance.SetWithoutRecTag;

            var bx = new BoxExchangeEditor(null, listView_recFolder, true, true, true);

            bx.TargetBox.KeyDown += ViewUtil.KeyDown_Enter(button_recFolderChg);
            bx.targetBoxAllowDoubleClick(bx.TargetBox, (sender, e) => button_recFolderChg.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)));
            button_recFolderDel.Click += new RoutedEventHandler(bx.button_Delete_Click);

            button_bat.Click += ViewUtil.OpenFileNameDialog(textBox_bat, false, "", ".bat", true);
        }