public SearchKeyDescView() { InitializeComponent(); try { foreach (ChSet5Item info in ChSet5.ChList.Values) { ServiceItem item = new ServiceItem(); item.ServiceInfo = CommonManager.ConvertChSet5To(info); serviceList.Add(item); serviceDict.Add((Int64)item.ID, item); } listView_service.ItemsSource = serviceList; comboBox_content.DataContext = CommonManager.Instance.ContentKindList; comboBox_content.SelectedIndex = 0; comboBox_time_sw.DataContext = CommonManager.Instance.DayOfWeekDictionary.Values; comboBox_time_sw.SelectedIndex = 0; comboBox_time_sh.DataContext = CommonManager.Instance.HourDictionary.Values; comboBox_time_sh.SelectedIndex = 0; comboBox_time_sm.DataContext = CommonManager.Instance.MinDictionary.Values; comboBox_time_sm.SelectedIndex = 0; comboBox_time_ew.DataContext = CommonManager.Instance.DayOfWeekDictionary.Values; comboBox_time_ew.SelectedIndex = 6; comboBox_time_eh.DataContext = CommonManager.Instance.HourDictionary.Values; comboBox_time_eh.SelectedIndex = 23; comboBox_time_em.DataContext = CommonManager.Instance.MinDictionary.Values; comboBox_time_em.SelectedIndex = 59; comboBox_week_sh.DataContext = CommonManager.Instance.HourDictionarySelect.Values; comboBox_week_sh.SelectedIndex = 0; comboBox_week_sm.DataContext = CommonManager.Instance.MinDictionary.Values; comboBox_week_sm.SelectedIndex = 0; comboBox_week_eh.DataContext = CommonManager.Instance.HourDictionarySelect.Values; comboBox_week_eh.SelectedIndex = 23; comboBox_week_em.DataContext = CommonManager.Instance.MinDictionary.Values; comboBox_week_em.SelectedIndex = 59; var bxc = new BoxExchangeEdit.BoxExchangeEditor(null, listBox_content, true, true, true); button_content_clear.Click += new RoutedEventHandler(bxc.button_DeleteAll_Click); button_content_del.Click += new RoutedEventHandler(bxc.button_Delete_Click); var bxd = new BoxExchangeEdit.BoxExchangeEditor(null, listBox_date, true, true, true); button_date_clear.Click += new RoutedEventHandler(bxd.button_DeleteAll_Click); button_date_del.Click += new RoutedEventHandler(bxd.button_Delete_Click); new BoxExchangeEdit.BoxExchangeEditor(null, listView_service, true); } catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); } }
public RecSettingView() { InitializeComponent(); try { recSetting = Settings.Instance.RecPresetList[0].RecPresetData.Clone(); comboBox_recMode.DataContext = CommonManager.Instance.RecModeDictionary.Values; comboBox_tuijyu.DataContext = CommonManager.Instance.YesNoDictionary.Values; comboBox_pittari.DataContext = CommonManager.Instance.YesNoDictionary.Values; comboBox_priority.DataContext = CommonManager.Instance.PriorityDictionary.Values; 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; Settings.Instance.RecPresetList.ForEach(info => info.LoadRecPresetData()); //iniファイルから録画設定をロード Settings.Instance.RecPresetList.ForEach(info => comboBox_preSet.Items.Add(info.Clone())); //現在の処理ならClone()無くても大丈夫 comboBox_preSet.SelectedIndex = 0; var bx = new BoxExchangeEdit.BoxExchangeEditor(null, listView_recFolder, true, true, true); bx.targetBoxAllowDoubleClick(bx.TargetBox, (sender, e) => button_recFolderChg.RaiseEvent(new RoutedEventArgs(Button.ClickEvent))); button_recFolderDel.Click += new RoutedEventHandler(bx.button_Delete_Click); if (IniFileHandler.CanUpdateInifile == false) { button_bat.IsEnabled = false; } } catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); } }
public RecSettingView() { InitializeComponent(); try { recSetting = Settings.Instance.RecPresetList[0].RecPresetData.Clone(); comboBox_recMode.DataContext = CommonManager.Instance.RecModeDictionary.Values; comboBox_tuijyu.DataContext = CommonManager.Instance.YesNoDictionary.Values; comboBox_pittari.DataContext = CommonManager.Instance.YesNoDictionary.Values; comboBox_priority.DataContext = CommonManager.Instance.PriorityDictionary.Values; 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; Settings.Instance.RecPresetList.ForEach(info => info.LoadRecPresetData());//iniファイルから録画設定をロード Settings.Instance.RecPresetList.ForEach(info => comboBox_preSet.Items.Add(info.Clone()));//現在の処理ならClone()無くても大丈夫 comboBox_preSet.SelectedIndex = 0; var bx = new BoxExchangeEdit.BoxExchangeEditor(null, listView_recFolder, true, true, true); bx.targetBoxAllowDoubleClick(bx.TargetBox, (sender, e) => button_recFolderChg.RaiseEvent(new RoutedEventArgs(Button.ClickEvent))); button_recFolderDel.Click += new RoutedEventHandler(bx.button_Delete_Click); if (IniFileHandler.CanUpdateInifile == false) { button_bat.IsEnabled = false; } } catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); } }