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); } }
public SearchKeyView() { InitializeComponent(); Settings.Instance.AndKeyList.ForEach(s => comboBox_andKey.Items.Add(s)); Settings.Instance.NotKeyList.ForEach(s => comboBox_notKey.Items.Add(s)); Button_clearAndKey.Click += (sender, e) => ClearSerchLog(comboBox_andKey, Settings.Instance.AndKeyList); Button_clearNotKey.Click += (sender, e) => ClearSerchLog(comboBox_notKey, Settings.Instance.NotKeyList); comboBox_content.ItemsSource = CommonManager.ContentKindList; comboBox_content.SelectedIndex = 0; comboBox_content.KeyUp += ViewUtil.KeyDown_Enter(button_content_add); comboBox_time_sw.ItemsSource = CommonManager.DayOfWeekArray; comboBox_time_sw.SelectedIndex = 0; comboBox_time_sh.ItemsSource = Enumerable.Range(0, 24); comboBox_time_sh.SelectedIndex = 0; comboBox_time_sm.ItemsSource = Enumerable.Range(0, 60); comboBox_time_sm.SelectedIndex = 0; comboBox_time_ew.ItemsSource = CommonManager.DayOfWeekArray; comboBox_time_ew.SelectedIndex = 6; comboBox_time_eh.ItemsSource = Enumerable.Range(0, 24); comboBox_time_eh.SelectedIndex = 23; comboBox_time_em.ItemsSource = Enumerable.Range(0, 60); comboBox_time_em.SelectedIndex = 59; comboBox_week_sh.ItemsSource = CommonManager.CustomHourList; comboBox_week_sh.SelectedIndex = 0; comboBox_week_sm.ItemsSource = Enumerable.Range(0, 60); comboBox_week_sm.SelectedIndex = 0; comboBox_week_eh.ItemsSource = CommonManager.CustomHourList; comboBox_week_eh.SelectedIndex = 23; comboBox_week_em.ItemsSource = Enumerable.Range(0, 60); comboBox_week_em.SelectedIndex = 59; ViewUtil.Set_ComboBox_LostFocus_SelectItemUInt(comboBox_time_sh, comboBox_time_sm, comboBox_time_eh, comboBox_time_em); ViewUtil.Set_ComboBox_LostFocus_SelectItemUInt(panel_data_week_times); new BoxExchangeEdit.BoxExchangeEditor(null, listView_service, true); SelectableItem.Set_CheckBox_PreviewChanged(listView_service); serviceList = ChSet5.ChListSelected.Select(info => new ServiceViewItem(info)).ToList(); listView_service.ItemsSource = serviceList; listView_service.FitColumnWidth();//他は勝手にフィットするのに‥なぜこれだけ? var bxc = new BoxExchangeEdit.BoxExchangeEditor(null, listBox_content, true, true); button_content_clear.Click += (sender, e) => { bxc.button_DeleteAll_Click(sender, e); CheckListBox(listBox_content); }; button_content_del.Click += (sender, e) => { bxc.button_Delete_Click(sender, e); CheckListBox(listBox_content); }; button_content_add.Click += button_content_add_Click; bxc.targetBoxAllowKeyAction(listBox_content, (sender, e) => button_content_del.RaiseEvent(new RoutedEventArgs(Button.ClickEvent))); listBox_content.Tag = new { ListBoxView = "(全ジャンル)" }; CheckListBox(listBox_content); var bxd = new BoxExchangeEdit.BoxExchangeEditor(null, listBox_date, true, true); button_date_clear.Click += (sender, e) => { bxd.button_DeleteAll_Click(sender, e); CheckListBox(listBox_date); }; button_date_del.Click += (sender, e) => { bxd.button_Delete_Click(sender, e); CheckListBox(listBox_date); }; button_date_add.Click += button_date_add_Click; bxd.targetBoxAllowKeyAction(listBox_date, (sender, e) => button_date_del.RaiseEvent(new RoutedEventArgs(Button.ClickEvent))); listBox_date.Tag = "(全期間)"; CheckListBox(listBox_date); byte idx = 0; chbxWeekList = CommonManager.DayOfWeekArray.Select(wd => new CheckBox { Content = wd, Margin = new Thickness(0, 0, 5, 0), Tag = idx++ }).ToList(); chbxWeekList.ForEach(chbx => stack_data_week.Children.Add(chbx)); grid_PresetEdit.Children.Clear(); grid_PresetEdit.Children.Add(preEdit); comboBox_preSet = preEdit.comboBox_preSet; preEdit.Set(this, (item, msg) => UpdateView(item), (list, mode) => { Settings.Instance.SearchPresetList = list; Settings.SaveToXmlFile(); SettingWindow.UpdatesInfo("検索プリセット変更"); if (comboBox_preSet.SelectedItem == null) { preEdit.ChangeSelect(preEdit.FindPreset(PresetItem.CustomID), null, true); } }, "検索プリセット", SetSearchPresetWindow.SettingWithDialog); if (Settings.Instance.UseLastSearchKey == true) { comboBox_preSet.Items.Add(new SearchPresetItem("前回検索条件", SearchPresetItem.LastID, null)); } checkBox_setWithoutSearchKeyWord.IsChecked = Settings.Instance.SetWithoutSearchKeyWord; }