コード例 #1
0
        private void button_OK_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (comboBoxViewSelect.SelectedValue != null)
                {
                    var code = (CtxmCode)this.comboBoxViewSelect.SelectedValue;
                    editMenu.FindData(code).Items = this.listBox_Setting.Items.Cast <StringItem>().ValueList();
                }

                for (int i = 0; i < SettingTable.Count; i++)
                {
                    SettingTable[i].ForEach(icmd =>
                    {
                        MenuSettingData.CmdSaveData trg = info.EasyMenuItems.Find(item => item.GetCommand() == icmd);
                        trg.IsMenuEnabled    = stackItems_menu[i].IsChecked == true;
                        trg.IsGestureEnabled = stackItems_ges1[i].IsChecked == true;
                        trg.IsGesNeedMenu    = stackItems_ges2[i].IsChecked == false;
                    });
                }

                info.IsManualAssign  = IsManualChkBox.Where(c => c.IsChecked == true).Select(c => (CtxmCode)c.Tag).ToList();
                info.ManualMenuItems = editMenu.DeepClone();

                DialogResult = true;
                return;
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
            DialogResult = false;
        }
コード例 #2
0
        private void button_OK_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (comboBoxViewSelect.SelectedValue != null)
                {
                    var code = (CtxmCode)this.comboBoxViewSelect.SelectedValue;
                    editMenu.FindData(code).Items = this.listBox_Setting.Items.Cast <StringItem>().ValueList();
                }

                for (int i = 0; i < SettingTable.Count; i++)
                {
                    SettingTable[i].ForEach(icmd =>
                    {
                        MenuSettingData.CmdSaveData trg = info.EasyMenuItems.Find(item => item.GetCommand() == icmd);
                        trg.IsMenuEnabled    = stackItems_menu[i].IsChecked == true;
                        trg.IsGestureEnabled = stackItems_ges1[i].IsChecked == true;
                        trg.IsGesNeedMenu    = stackItems_ges2[i].IsChecked == false;
                    });
                }

                info.IsManualAssign       = IsManualChkBox.Where(c => c.IsChecked == true).Select(c => (CtxmCode)c.Tag).ToList();
                info.NoMessageKeyGesture  = (checkBox_NoMessageKeyGesture.IsChecked == true);
                info.NoMessageDeleteAll   = (checkBox_NoMessageDeleteAll.IsChecked == true);
                info.NoMessageDelete2     = (checkBox_NoMessageDelete2.IsChecked == true);
                info.NoMessageAdjustRes   = (checkBox_NoMessageAdjustRes.IsChecked == true);
                info.CancelAutoAddOff     = (checkBox_CancelAutoAddOff.IsChecked == true);
                info.AutoAddFazySerach    = (checkBox_AutoAddFazySerach.IsChecked == true);
                info.AutoAddSerachToolTip = (checkBox_AutoAddSerachToolTip.IsChecked == true);
                info.ManualMenuItems      = editMenu.Clone();
                info.Keyword_Trim         = (checkBox_EpgKeyword_Trim.IsChecked == true);
                info.CopyTitle_Trim       = (checkBox_CopyTitle_Trim.IsChecked == true);
                info.CopyContentBasic     = (checkBox_CopyContentBasic.IsChecked == true);
                info.SearchTitle_Trim     = (checkBox_SearchTtile_Trim.IsChecked == true);
                info.SearchURI            = textBox_SearchURI.Text;
                info.NoMessageNotKEY      = (checkBox_NoMessageNotKEY.IsChecked == true);
                info.OpenParentFolder     = (checkBox_OpenParentFolder.IsChecked == true);

                DialogResult = true;
                return;
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
            DialogResult = false;
        }