Exemplo n.º 1
0
        public SetOtherAppView()
        {
            InitializeComponent();

            button_exe.Click     += ViewUtil.OpenFileNameDialog(textBox_exe, false, "", ".exe");
            button_playExe.Click += ViewUtil.OpenFileNameDialog(textBox_playExe, false, "", ".exe");

            //エスケープキャンセルだけは常に有効にする。
            var bx = new BoxExchangeEdit.BoxExchangeEditor(null, this.listBox_bon, true);

            if (CommonManager.Instance.NWMode == false)
            {
                bx.AllowDragDrop();
                bx.AllowKeyAction();
                button_up.Click   += bx.button_Up_Click;
                button_down.Click += bx.button_Down_Click;
                button_del.Click  += bx.button_Delete_Click;
                button_add.Click  += (sender, e) => ViewUtil.ListBox_TextCheckAdd(listBox_bon, comboBox_bon.Text);
            }
            else
            {
                label3.IsEnabled           = false;
                panel_bonButtons.IsEnabled = false;
                button_add.IsEnabled       = false;
            }
        }
Exemplo n.º 2
0
        private void listBox_Button_Set()
        {
            //エスケープキャンセルだけは常に有効にする。
            var bxr = new BoxExchangeEdit.BoxExchangeEditor(null, this.listBox_recFolder, true);
            var bxb = new BoxExchangeEdit.BoxExchangeEditor(null, this.listBox_bon, true);
            var bxt = new BoxExchangeEdit.BoxExchangeEditor(null, this.ListView_time, true);

            listBox_recFolder.SelectionChanged += ViewUtil.ListBox_TextBoxSyncSelectionChanged(listBox_recFolder, textBox_recFolder);

            if (CommonManager.Instance.NWMode == false)
            {
                //録画設定関係
                bxr.AllowDragDrop();
                bxr.AllowKeyAction();
                bxr.targetBoxAllowDoubleClick(bxr.TargetBox, (sender, e) => button_rec_open.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)));
                button_rec_up.Click   += new RoutedEventHandler(bxr.button_Up_Click);
                button_rec_down.Click += new RoutedEventHandler(bxr.button_Down_Click);
                button_rec_del.Click  += new RoutedEventHandler(bxr.button_Delete_Click);
                button_rec_add.Click  += ViewUtil.ListBox_TextCheckAdd(listBox_recFolder, textBox_recFolder);

                //チューナ関係関係
                bxb.AllowDragDrop();
                button_bon_up.Click   += new RoutedEventHandler(bxb.button_Up_Click);
                button_bon_down.Click += new RoutedEventHandler(bxb.button_Down_Click);

                //EPG取得関係
                bxt.TargetItemsSource = timeList;
                bxt.AllowDragDrop();
                bxt.AllowKeyAction();
                button_delTime.Click += new RoutedEventHandler(bxt.button_Delete_Click);

                new BoxExchangeEdit.BoxExchangeEditor(null, this.listView_service, true);
            }
        }
Exemplo n.º 3
0
        private void listBox_Button_Set()
        {
            //エスケープキャンセルだけは常に有効にする。
            var bxr = new BoxExchangeEdit.BoxExchangeEditor(null, this.listBox_recFolder, true);
            var bxb = new BoxExchangeEdit.BoxExchangeEditor(null, this.listBox_bon, true);
            var bxt = new BoxExchangeEdit.BoxExchangeEditor(null, this.ListView_time, true);

            listBox_recFolder.SelectionChanged += ViewUtil.ListBox_TextBoxSyncSelectionChanged(listBox_recFolder, textBox_recFolder);

            if (CommonManager.Instance.NWMode == false)
            {
                //録画設定関係
                bxr.AllowDragDrop();
                bxr.AllowKeyAction();
                bxr.targetBoxAllowDoubleClick(bxr.TargetBox, (sender, e) => button_rec_open.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)));
                button_rec_up.Click += new RoutedEventHandler(bxr.button_Up_Click);
                button_rec_down.Click += new RoutedEventHandler(bxr.button_Down_Click);
                button_rec_del.Click += new RoutedEventHandler(bxr.button_Delete_Click);
                button_rec_add.Click += ViewUtil.ListBox_TextCheckAdd(listBox_recFolder, textBox_recFolder);

                //チューナ関係関係
                bxb.AllowDragDrop();
                button_bon_up.Click += new RoutedEventHandler(bxb.button_Up_Click);
                button_bon_down.Click += new RoutedEventHandler(bxb.button_Down_Click);

                //EPG取得関係
                bxt.TargetItemsSource = timeList;
                bxt.AllowDragDrop();
                bxt.AllowKeyAction();
                button_delTime.Click += new RoutedEventHandler(bxt.button_Delete_Click);

                new BoxExchangeEdit.BoxExchangeEditor(null, this.listView_service, true);
            }
        }
Exemplo n.º 4
0
        public SetOtherAppView()
        {
            InitializeComponent();

            //エスケープキャンセルだけは常に有効にする。
            var bx = new BoxExchangeEdit.BoxExchangeEditor(null, this.listBox_bon, true);
            if (CommonManager.Instance.NWMode == false)
            {
                bx.AllowDragDrop();
                bx.AllowKeyAction();
                button_del.Click += new RoutedEventHandler(bx.button_Delete_Click);
            }

            try
            {
                // tabItem_tvtest - TVTest連携
                label3.IsEnabled = IniFileHandler.CanUpdateInifile; // 視聴に使用するBonDriver
                listBox_bon.IsEnabled = IniFileHandler.CanUpdateInifile;
                button_del.IsEnabled = IniFileHandler.CanUpdateInifile; // 削除
                button_add.IsEnabled = IniFileHandler.CanUpdateInifile; // 追加

                textBox_exe.Text = Settings.Instance.TvTestExe;
                textBox_cmd.Text = Settings.Instance.TvTestCmd;

                comboBox_bon.ItemsSource = CommonManager.Instance.GetBonFileList();
                if (comboBox_bon.Items.Count > 0)
                {
                    comboBox_bon.SelectedIndex = 0;
                }
                else
                {
                    comboBox_bon.IsEnabled = false;
                }

                if (IniFileHandler.CanReadInifile)
                {
                    int num = IniFileHandler.GetPrivateProfileInt("TVTEST", "Num", 0, SettingPath.TimerSrvIniPath);
                    for (uint i = 0; i < num; i++)
                    {
                        string item = IniFileHandler.GetPrivateProfileString("TVTEST", i.ToString(), "", SettingPath.TimerSrvIniPath);
                        if (item.Length > 0)
                        {
                            listBox_bon.Items.Add(item);
                        }
                    }
                }
                checkBox_nwTvMode.IsChecked = Settings.Instance.NwTvMode;
                checkBox_nwUDP.IsChecked = Settings.Instance.NwTvModeUDP;
                checkBox_nwTCP.IsChecked = Settings.Instance.NwTvModeTCP;
                textBox_TvTestOpenWait.Text = Settings.Instance.TvTestOpenWait.ToString();
                textBox_TvTestChgBonWait.Text = Settings.Instance.TvTestChgBonWait.ToString();

                // tabItem_play - ファイル再生
                textBox_playExe.Text = Settings.Instance.FilePlayExe;
                textBox_playCmd.Text = Settings.Instance.FilePlayCmd;
                checkBox_playOnAirWithExe.IsChecked = Settings.Instance.FilePlayOnAirWithExe;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
        }
Exemplo n.º 5
0
        public SetOtherAppView()
        {
            InitializeComponent();

            //エスケープキャンセルだけは常に有効にする。
            var bx = new BoxExchangeEdit.BoxExchangeEditor(null, this.listBox_bon, true);

            if (CommonManager.Instance.NWMode == false)
            {
                bx.AllowDragDrop();
                bx.AllowKeyAction();
                button_del.Click += new RoutedEventHandler(bx.button_Delete_Click);
            }

            try
            {
                // tabItem_tvtest - TVTest連携
                label3.IsEnabled      = IniFileHandler.CanUpdateInifile; // 視聴に使用するBonDriver
                listBox_bon.IsEnabled = IniFileHandler.CanUpdateInifile;
                button_del.IsEnabled  = IniFileHandler.CanUpdateInifile; // 削除
                button_add.IsEnabled  = IniFileHandler.CanUpdateInifile; // 追加

                textBox_exe.Text = Settings.Instance.TvTestExe;
                textBox_cmd.Text = Settings.Instance.TvTestCmd;

                comboBox_bon.ItemsSource = CommonManager.Instance.GetBonFileList();
                if (comboBox_bon.Items.Count > 0)
                {
                    comboBox_bon.SelectedIndex = 0;
                }
                else
                {
                    comboBox_bon.IsEnabled = false;
                }

                if (IniFileHandler.CanReadInifile)
                {
                    int num = IniFileHandler.GetPrivateProfileInt("TVTEST", "Num", 0, SettingPath.TimerSrvIniPath);
                    for (uint i = 0; i < num; i++)
                    {
                        string item = IniFileHandler.GetPrivateProfileString("TVTEST", i.ToString(), "", SettingPath.TimerSrvIniPath);
                        if (item.Length > 0)
                        {
                            listBox_bon.Items.Add(item);
                        }
                    }
                }
                checkBox_nwTvMode.IsChecked   = Settings.Instance.NwTvMode;
                checkBox_nwUDP.IsChecked      = Settings.Instance.NwTvModeUDP;
                checkBox_nwTCP.IsChecked      = Settings.Instance.NwTvModeTCP;
                textBox_TvTestOpenWait.Text   = Settings.Instance.TvTestOpenWait.ToString();
                textBox_TvTestChgBonWait.Text = Settings.Instance.TvTestChgBonWait.ToString();

                // tabItem_play - ファイル再生
                textBox_playExe.Text = Settings.Instance.FilePlayExe;
                textBox_playCmd.Text = Settings.Instance.FilePlayCmd;
                checkBox_playOnAirWithExe.IsChecked = Settings.Instance.FilePlayOnAirWithExe;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
        }