Exemple #1
0
 public void SetSelectedItemDoubleClick(MouseButtonEventHandler hdlr)
 {
     if (hdlr == null)
     {
         return;
     }
     bx.targetBoxAllowDoubleClick(listView, hdlr);
 }
        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); }
        }