Beispiel #1
0
        private void form_TransfEvent(object holder, HNStruct.HNEkey value)
        {
            int index = 1;

            if (holder == this.btnAbove)
            {
                index = 2;
            }
            Fixer4TabletPen.savePenButtonValue(index, value);
            if (index == 2)
            {
                this.btnAbove.Text = value.ToString();
            }
            else
            {
                if (index != 1)
                {
                    return;
                }
                this.btnBelow.Text = value.ToString();
            }
        }
Beispiel #2
0
        private void form_TransfEvent(object holder, HNStruct.HNEkey value)
        {
            HuionKeyLayout huionKeyLayout = (HuionKeyLayout)holder;

            if (huionKeyLayout.KeyType == HuionKeyType.HARDKEY)
            {
                this.clickBtn.Text = value.ToString();
                huionKeyLayout.Key = value;
                HNStruct.globalInfo.hbtns[huionKeyLayout.KeyIndex] = value;
                TabletConfigUtils.config.ctxEkeys[0].hbtns[huionKeyLayout.KeyIndex] =
                    HNStruct.globalInfo.hbtns[huionKeyLayout.KeyIndex];
            }
            else if (huionKeyLayout.KeyType == HuionKeyType.SOFTKEY)
            {
                this.clickBtn.Text = value.ToString();
                huionKeyLayout.Key = value;
                HNStruct.globalInfo.sbtns[huionKeyLayout.KeyIndex] = value;
                TabletConfigUtils.config.ctxEkeys[0].sbtns[huionKeyLayout.KeyIndex] =
                    HNStruct.globalInfo.sbtns[huionKeyLayout.KeyIndex];
            }
            else
            {
                if (huionKeyLayout.KeyType != HuionKeyType.MULTIKEY)
                {
                    return;
                }
                int meIndex = this.getMeIndex();
                huionKeyLayout.MutliKeys[meIndex]  = value;
                HNStruct.globalInfo.mbtns[meIndex] = value;
                this.SetTouchSinger(this.mTouchIndex);
                for (int index = 0; index < (int)TabletConfigUtils.config.ctxEkeys[0].ctxMek[0].eks[0].num; ++index)
                {
                    TabletConfigUtils.config.ctxEkeys[0].ctxMek[0].eks[0].eks[index] = HNStruct.globalInfo.mbtns[index];
                }
                Console.WriteLine("shezhi");
            }
        }