Esempio n. 1
0
        public SetAppCancelWindow()
        {
            InitializeComponent();

            button_process_del.IsEnabled = IniFileHandler.CanUpdateInifile;
            label2.IsEnabled = IniFileHandler.CanUpdateInifile;
            textBox_process.IsEnabled = IniFileHandler.CanUpdateInifile;
            button_process_add.IsEnabled = IniFileHandler.CanUpdateInifile;
            button_process_open.IsEnabled = IniFileHandler.CanUpdateInifile;
            label3.IsEnabled = IniFileHandler.CanUpdateInifile;
            textBox_ng_min.IsEnabled = IniFileHandler.CanUpdateInifile;
            label4.IsEnabled = IniFileHandler.CanUpdateInifile;
            checkBox_ng_fileStreaming.IsEnabled = IniFileHandler.CanUpdateInifile;
            checkBox_ng_shareFile.IsEnabled = IniFileHandler.CanUpdateInifile;
            textBox_ng_usePC_min.IsEnabled = IniFileHandler.CanUpdateInifile;
            label7.IsEnabled = IniFileHandler.CanUpdateInifile;
            checkBox_ng_usePC.IsEnabled = IniFileHandler.CanUpdateInifile;
            button_OK.IsEnabled = IniFileHandler.CanUpdateInifile;

            var bx = new BoxExchangeEditor(null, listBox_process, true);
            listBox_process.SelectionChanged += ViewUtil.ListBox_TextBoxSyncSelectionChanged(listBox_process, textBox_process);
            if (CommonManager.Instance.NWMode == false)
            {
                bx.AllowKeyAction();
                bx.AllowDragDrop();
                button_process_del.Click += new RoutedEventHandler(bx.button_Delete_Click);
                button_process_add.Click += ViewUtil.ListBox_TextCheckAdd(listBox_process, textBox_process);
            }
        }
        public SetContextMenuWindow()
        {
            InitializeComponent();
            try
            {
                //個別設定画面用の設定
                this.comboBoxViewSelect.DisplayMemberPath = CommonUtil.GetMemberName(() => new ComboItem().Value);
                this.comboBoxViewSelect.SelectedValuePath = CommonUtil.GetMemberName(() => new ComboItem().Key);
                var bx = new BoxExchangeEditor(this.listBox_Default, this.listBox_Setting, true, true, true, true);
                bx.AllowDuplication(StringItem.Items(EpgCmdsEx.SeparatorString), StringItem.Cloner, StringItem.Comparator);
                button_reset.Click += new RoutedEventHandler(bx.button_Reset_Click);
                button_add.Click += new RoutedEventHandler(bx.button_Add_Click);
                button_ins.Click += new RoutedEventHandler(bx.button_Insert_Click);
                button_del.Click += new RoutedEventHandler(bx.button_Delete_Click);
                button_delAll.Click += new RoutedEventHandler(bx.button_DeleteAll_Click);
                button_top.Click += new RoutedEventHandler(bx.button_Top_Click);
                button_up.Click += new RoutedEventHandler(bx.button_Up_Click);
                button_down.Click += new RoutedEventHandler(bx.button_Down_Click);
                button_bottom.Click += new RoutedEventHandler(bx.button_Bottom_Click);

                //その他画面用の設定
                foreach (var item in MenuCodeToTitle.Where(i => i.Key != CtxmCode.EditChgMenu))
                {
                    var chkbox = new CheckBox();
                    chkbox.Tag = item.Key;
                    chkbox.Content = item.Value;
                    chkbox.Checked += new RoutedEventHandler(checkBox_IsManualMenuCode_Checked);
                    chkbox.Unchecked += new RoutedEventHandler(checkBox_IsManualMenuCode_Checked);
                    wrapPanel_IsManualMenu.Children.Add(chkbox);
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
        }
Esempio n. 3
0
        private void listBox_Button_Set()
        {
            bxs = new BoxExchangeEditor(null, this.listBox_serviceView, true, true, true, true);

            //サービス選択関係はソースの ListBox が複数あるので、全ての ListBoxItem にイベントを追加する。
            foreach (TabItem tab in tab_ServiceList.Items)
            {
                if (tab.Content is ListBox)
                {
                    ListBox box = tab.Content as ListBox;
                    bxs.sourceBoxAllowCancelAction(box);
                    bxs.sourceBoxAllowDragDrop(box);
                    bxs.sourceBoxAllowKeyAction(box);
                    bxs.sourceBoxAllowDoubleClick(box);
                }
            }
            //ソースのリストボックスは複数あるので、リストボックスが選択されたときに SourceBox の登録を行う
            tab_ServiceList.SelectionChanged += (sender, e) =>
            {
                try { bxs.SourceBox = ((sender as TabControl).SelectedItem as TabItem).Content as ListBox; }
                catch { bxs.SourceBox = null; }
            };
            button_service_addAll.Click += new RoutedEventHandler(bxs.button_AddAll_Click);
            button_service_add.Click += new RoutedEventHandler(bxs.button_Add_Click);
            button_service_ins.Click += new RoutedEventHandler(bxs.button_Insert_Click);
            button_service_del.Click += new RoutedEventHandler(bxs.button_Delete_Click);
            button_service_delAll.Click += new RoutedEventHandler(bxs.button_DeleteAll_Click);
            button_service_top.Click += new RoutedEventHandler(bxs.button_Top_Click);
            button_service_up.Click += new RoutedEventHandler(bxs.button_Up_Click);
            button_service_down.Click += new RoutedEventHandler(bxs.button_Down_Click);
            button_service_bottom.Click += new RoutedEventHandler(bxs.button_Bottom_Click);

            //ジャンル選択関係
            var bxj = new BoxExchangeEditor(this.listBox_jyanru, this.listBox_jyanruView, true, true, true, true);
            button_jyanru_addAll.Click += new RoutedEventHandler(bxj.button_AddAll_Click);
            button_jyanru_add.Click += new RoutedEventHandler(bxj.button_Add_Click);
            button_jyanru_ins.Click += new RoutedEventHandler(bxj.button_Insert_Click);
            button_jyanru_del.Click += new RoutedEventHandler(bxj.button_Delete_Click);
            button_jyanru_delAll.Click += new RoutedEventHandler(bxj.button_DeleteAll_Click);
        }