Example #1
0
        //────────────────────────────────────────
        #endregion



        #region アクション
        //────────────────────────────────────────

        public void Open(int nPlayer, KeyconfigPadImpl keycnfPad, out string sErrorMsg)
        {
            TextBox pctxt;

            switch (nPlayer)
            {
            case 2:
                pctxt = this.textBox2;
                break;

            case 3:
                pctxt = this.textBox3;
                break;

            case 4:
                pctxt = this.textBox4;
                break;

            default:
                pctxt = this.textBox1;
                break;
            }

            // 1~12
            for (int nNum = 1; nNum < 13; nNum++)
            {
                EnumGamepadkeyIx  enumGa = Utility_KeyconfigArray.IntTo(nNum);
                EnumGamepadkeyBit enumGp = keycnfPad.KeyconfigArray[(int)enumGa];

                switch (enumGp)
                {
                case EnumGamepadkeyBit.Up:
                    // [↑]
                    pctxt.Text += Utility_KeyconfigArray.ToString_Display(enumGa);
                    break;

                case EnumGamepadkeyBit.Right:
                    // [→]
                    pctxt.Text += Utility_KeyconfigArray.ToString_Display(enumGa);
                    break;

                case EnumGamepadkeyBit.Down:
                    // [↓]
                    pctxt.Text += Utility_KeyconfigArray.ToString_Display(enumGa);
                    break;

                case EnumGamepadkeyBit.Left:
                    // [←]
                    pctxt.Text += Utility_KeyconfigArray.ToString_Display(enumGa);
                    break;

                case EnumGamepadkeyBit.A:
                    // [A]
                    pctxt.Text += Utility_KeyconfigArray.ToString_Display(enumGa);
                    break;

                case EnumGamepadkeyBit.B:
                    // [B]
                    pctxt.Text += Utility_KeyconfigArray.ToString_Display(enumGa);
                    break;

                case EnumGamepadkeyBit.X:
                    // [X]
                    pctxt.Text += Utility_KeyconfigArray.ToString_Display(enumGa);
                    break;

                case EnumGamepadkeyBit.Y:
                    // [Y]
                    pctxt.Text += Utility_KeyconfigArray.ToString_Display(enumGa);
                    break;

                case EnumGamepadkeyBit.L:
                    // [L]
                    pctxt.Text += Utility_KeyconfigArray.ToString_Display(enumGa);
                    break;

                case EnumGamepadkeyBit.R:
                    // [R]
                    pctxt.Text += Utility_KeyconfigArray.ToString_Display(enumGa);
                    break;

                case EnumGamepadkeyBit.Start:
                    // [Start]
                    pctxt.Text += Utility_KeyconfigArray.ToString_Display(enumGa);
                    break;

                case EnumGamepadkeyBit.Select:
                    // [Select]
                    pctxt.Text += Utility_KeyconfigArray.ToString_Display(enumGa);
                    break;

                default:
                    break;
                }
            }


            sErrorMsg = "";
            return;
        }
Example #2
0
        //────────────────────────────────────────
        #endregion



        #region アクション
        //────────────────────────────────────────

        public void Open(int nPlayer, KeyconfigPadImpl keycnfPad, out string sErrorMsg)
        {
            Usercontrol_VwdKeycnf ucGmctrlOneCnf = this.usercontrol_VwdKeycnfArray[nPlayer];

            // 1~12
            for (int nNum = 1; nNum < 13; nNum++)
            {
                EnumGamepadkeyIx  gaEnum = Utility_KeyconfigArray.IntTo(nNum);
                EnumGamepadkeyBit gpEnum = keycnfPad.KeyconfigArray[(int)gaEnum];

                switch (gpEnum)
                {
                case EnumGamepadkeyBit.Up:
                    // [↑]
                    ucGmctrlOneCnf.PctxtUp.Text = Utility_KeyconfigArray.ToString_Display(gaEnum);
                    break;

                case EnumGamepadkeyBit.Right:
                    // [→]
                    ucGmctrlOneCnf.PctxtRight.Text = Utility_KeyconfigArray.ToString_Display(gaEnum);
                    break;

                case EnumGamepadkeyBit.Down:
                    // [↓]
                    ucGmctrlOneCnf.PctxtDown.Text = Utility_KeyconfigArray.ToString_Display(gaEnum);
                    break;

                case EnumGamepadkeyBit.Left:
                    // [←]
                    ucGmctrlOneCnf.PctxtLeft.Text = Utility_KeyconfigArray.ToString_Display(gaEnum);
                    break;

                case EnumGamepadkeyBit.A:
                    // [A]
                    ucGmctrlOneCnf.PctxtA.Text = Utility_KeyconfigArray.ToString_Display(gaEnum);
                    break;

                case EnumGamepadkeyBit.B:
                    // [B]
                    ucGmctrlOneCnf.PctxtB.Text = Utility_KeyconfigArray.ToString_Display(gaEnum);
                    break;

                case EnumGamepadkeyBit.X:
                    // [X]
                    ucGmctrlOneCnf.PctxtX.Text = Utility_KeyconfigArray.ToString_Display(gaEnum);
                    break;

                case EnumGamepadkeyBit.Y:
                    // [Y]
                    ucGmctrlOneCnf.PctxtY.Text = Utility_KeyconfigArray.ToString_Display(gaEnum);
                    break;

                case EnumGamepadkeyBit.L:
                    // [L]
                    ucGmctrlOneCnf.PctxtL.Text = Utility_KeyconfigArray.ToString_Display(gaEnum);
                    break;

                case EnumGamepadkeyBit.R:
                    // [R]
                    ucGmctrlOneCnf.PctxtR.Text = Utility_KeyconfigArray.ToString_Display(gaEnum);
                    break;

                case EnumGamepadkeyBit.Start:
                    // [Start]
                    ucGmctrlOneCnf.PctxtStart.Text = Utility_KeyconfigArray.ToString_Display(gaEnum);
                    break;

                case EnumGamepadkeyBit.Select:
                    // [Select]
                    ucGmctrlOneCnf.PctxtSelect.Text = Utility_KeyconfigArray.ToString_Display(gaEnum);
                    break;

                default:
                    break;
                }
            }

            sErrorMsg = "";
            return;
        }