Beispiel #1
0
        private void updateHNConfigToView()
        {
            if (((int)this.m_Ekey.funcBit & 4) == 4)
            {
                this.checkAlt.Checked      = this.m_Ekey.kbtn.bAlt > (byte)0;
                this.checkWindows.Checked  = this.m_Ekey.kbtn.bWin > (byte)0;
                this.CheckCtrl.Checked     = this.m_Ekey.kbtn.bCtrl > (byte)0;
                this.checkShift.Checked    = this.m_Ekey.kbtn.bShift > (byte)0;
                this.checkBoxFunKb.Checked = this.CheckCtrl.Checked || this.checkAlt.Checked ||
                                             (this.checkWindows.Checked || this.checkShift.Checked) ||
                                             (this.radioChar.Checked || this.radioStr.Checked);
                if (Convert.ToBoolean(Convert.ToInt32(this.m_Ekey.kbtn.kbKeys[1])))
                {
                    this.checkBoxFunKb.Checked = true;
                    this.radioStr.Checked      = true;
                    for (int index = 0; index < 16 && Convert.ToBoolean(this.m_Ekey.kbtn.kbKeys[index]); ++index)
                    {
                        Label labelStr = this.labelStr;
                        labelStr.Text = labelStr.Text + (object)KBTable.getKey8Code(this.m_Ekey.kbtn.kbKeys[index]) +
                                        " ";
                    }
                }
                else
                {
                    this.radioChar.Checked     = true;
                    this.checkBoxFunKb.Checked = true;
                    this.comboBoxStr.Text     += (string)(object)KBTable.getKey8Code(this.m_Ekey.kbtn.kbKeys[0]);
                }
            }

            if (Convert.ToBoolean(this.m_Ekey.funcBit & 16U))
            {
                this.checkBoxFunMouse.Checked = true;
                this.radioMouseLeft.Checked   = true;
            }

            if (Convert.ToBoolean(this.m_Ekey.funcBit & 32U))
            {
                this.checkBoxFunMouse.Checked = true;
                this.radioMouseMid.Checked    = true;
            }

            if (Convert.ToBoolean(this.m_Ekey.funcBit & 64U))
            {
                this.checkBoxFunMouse.Checked = true;
                this.radioMouseRight.Checked  = true;
            }

            if (Convert.ToBoolean(this.m_Ekey.funcBit & 128U))
            {
                this.checkBoxFunMouse.Checked       = true;
                this.radioMouseWheelForward.Checked = true;
            }

            if (Convert.ToBoolean(this.m_Ekey.funcBit & 256U))
            {
                this.checkBoxFunMouse.Checked        = true;
                this.radioMouseWheelBackWard.Checked = true;
            }

            if (Convert.ToBoolean(this.m_Ekey.funcBit & 2U))
            {
                this.checkBoxFunSwitch.Checked = true;
                this.radioSwithBrush.Checked   = true;
            }

            if (Convert.ToBoolean(this.m_Ekey.funcBit & 1U))
            {
                this.checkBoxFunSwitch.Checked = true;
                this.radioSwitchScreen.Checked = true;
            }

            if (!Convert.ToBoolean(this.m_Ekey.funcBit & 8U))
            {
                return;
            }
            this.checkBoxFunRun.Checked = true;
        }
Beispiel #2
0
            public override string ToString()
            {
                if (this.funcBit == 0U)
                {
                    return(ResourceCulture.GetString("FormEkey_btUndefinedText"));
                }
                string str = (string)null;

                if (Convert.ToBoolean(this.funcBit & 4U))
                {
                    if (this.kbtn.bCtrl != (byte)0)
                    {
                        str += "Ctrl+";
                    }
                    if (this.kbtn.bAlt != (byte)0)
                    {
                        str += "Alt+";
                    }
                    if (this.kbtn.bShift != (byte)0)
                    {
                        str += "Shift+";
                    }
                    if (this.kbtn.bWin != (byte)0)
                    {
                        str += "Win+";
                    }
                    for (int index = 0; index < 16 && this.kbtn.kbKeys[index] != (byte)0; ++index)
                    {
                        str += KBTable.getKey8Code(this.kbtn.kbKeys[index]).ToString();
                    }
                }

                if (Convert.ToBoolean(this.funcBit & 16U))
                {
                    if (!string.IsNullOrEmpty(str))
                    {
                        str += ";";
                    }
                    str += ResourceCulture.GetString("FormEkey_rdMouseLeftText");
                }

                if (Convert.ToBoolean(this.funcBit & 32U))
                {
                    if (!string.IsNullOrEmpty(str))
                    {
                        str += ";";
                    }
                    str += ResourceCulture.GetString("FormEkey_rdMouseMidText");
                }

                if (Convert.ToBoolean(this.funcBit & 64U))
                {
                    if (!string.IsNullOrEmpty(str))
                    {
                        str += ";";
                    }
                    str += ResourceCulture.GetString("FormEkey_rdMouseRightText");
                }

                if (Convert.ToBoolean(this.funcBit & 128U))
                {
                    if (!string.IsNullOrEmpty(str))
                    {
                        str += ";";
                    }
                    str += ResourceCulture.GetString("FormEkey_rdMouseWheelForwardText");
                }

                if (Convert.ToBoolean(this.funcBit & 256U))
                {
                    if (!string.IsNullOrEmpty(str))
                    {
                        str += ";";
                    }
                    str += ResourceCulture.GetString("FormEkey_rdMouseWheelBackwardText");
                }

                if (Convert.ToBoolean(this.funcBit & 1U))
                {
                    if (!string.IsNullOrEmpty(str))
                    {
                        str += ";";
                    }
                    str += ResourceCulture.GetString("FormEkey_rdSwitchScreenText");
                }

                if (Convert.ToBoolean(this.funcBit & 2U))
                {
                    if (!string.IsNullOrEmpty(str))
                    {
                        str += ";";
                    }
                    str += ResourceCulture.GetString("FormEkey_rdSwitchBrushText");
                }

                if (Convert.ToBoolean(this.funcBit & 8U))
                {
                    if (!string.IsNullOrEmpty(str))
                    {
                        str += ";";
                    }
                    str += new string(this.cmdPath).Trim(new char[1]);
                }

                return(str ?? ResourceCulture.GetString("FormEkey_btUndefinedText"));
            }