Exemplo n.º 1
0
 public PresetEditor()
 {
     comboBox_preSet.SelectionChanged += comboBox_preSet_SelectionChanged;
     comboBox_preSet.KeyDown          += ViewUtil.KeyDown_Enter(button_reload);
     button_add.Click    += (sender, e) => button_Click(PresetEdit.Add, sender, e);
     button_chg.Click    += (sender, e) => button_Click(PresetEdit.Change, sender, e);
     button_del.Click    += (sender, e) => button_Click(PresetEdit.Delete, sender, e);
     button_reload.Click += (sender, e) => comboBox_preSet_SelectionChanged(null, null);
     button_set.Click    += button_set_Click;
 }
Exemplo n.º 2
0
        public ConnectWindow()
        {
            InitializeComponent();

            var nowSet = new NWPresetItem(DefPresetStr, Settings.Instance.NWServerIP, Settings.Instance.NWServerPort, Settings.Instance.NWWaitPort, Settings.Instance.NWMacAdd);

            cmb_preset.Items.Add(nowSet);
            Settings.Instance.NWPreset.ForEach(item => cmb_preset.Items.Add(item.DeepClone()));
            cmb_preset.SelectedIndex = FindCmbPresetItem(nowSet, true);
            this.KeyDown            += ViewUtil.KeyDown_Escape_Close;
            cmb_preset.KeyDown      += ViewUtil.KeyDown_Enter(btn_reload);
            button_connect.Focus();//スペースキーも効く
        }
Exemplo n.º 3
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); }
        }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
0
        public NotifyLogWindow()
        {
            InitializeComponent();

            try
            {
                base.SetParam(false, checkBox_windowPinned);

                this.KeyDown             += ViewUtil.KeyDown_Escape_Close;
                this.KeyDown             += ViewUtil.KeyDown_Enter(this.button_reload);
                this.textBox_logMax.Text  = Settings.Instance.NotifyLogMax.ToString();
                this.button_reload.Click += (sender, e) => ReloadInfoData();

                //リストビュー関連の設定
                lstCtrl = new ListViewController <NotifySrvInfoItem>(this);
                lstCtrl.SetInitialSortKey(CommonUtil.NameOf(() => (new NotifySrvInfoItem()).TimeView), ListSortDirection.Descending);
                lstCtrl.SetViewSetting(listView_log, gridView_log, false, true);

                //データ読込
                ReloadInfoData();
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
        }
Exemplo n.º 6
0
        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;
        }