public FormEKey(object holder, HNStruct.HNEkey value) { this.mHolder = holder; this.m_Ekey = value; this.InitializeComponent(); MiddleModule.eventPost += new Post(this.MiddleModule_eventSend); }
public FormEKey_New(object holder, HNStruct.HNEkey value) { this.mHolder = holder; this.m_Ekey = value; this.InitializeComponent(); this.ControlBox = true; this.ShowSettingsIcon = false; MiddleModule.eventPost += new Post(this.MiddleModule_eventSend); }
public static void savePenButtonValue(int index, HNStruct.HNEkey value) { HNStruct.globalInfo.pbtns[index] = value; for (int index1 = 0; index1 < (int)HNStruct.globalInfo.tabletInfo.pbtnNum; ++index1) { if (index1 == index) { HNStruct.globalInfo.pbtns[index1] = value; TabletConfigUtils.config.ctxEkeys[0].pbtns[index1] = HNStruct.globalInfo.pbtns[index1]; } else { TabletConfigUtils.config.ctxEkeys[0].pbtns[index1] = HNStruct.globalInfo.pbtns[index1]; } } }
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(); } }
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"); } }
private void buttonOk_Click(object sender, EventArgs e) { HNStruct.HNEkey hnEkey = new HNStruct.HNEkey(); hnEkey.cmdPath = new char[260]; hnEkey.kbtn.kbKeys = new byte[16]; if (this.checkBoxFunKb.Checked) { hnEkey.kbtn.bCtrl = this.CheckCtrl.Checked ? (byte)1 : (byte)0; hnEkey.kbtn.bAlt = this.checkAlt.Checked ? (byte)1 : (byte)0; hnEkey.kbtn.bShift = this.checkShift.Checked ? (byte)1 : (byte)0; hnEkey.kbtn.bWin = this.checkWindows.Checked ? (byte)1 : (byte)0; List <HuionKeyEventArgs> keyEvents = this.huionTextView1.KeyEvents; for (int index = 0; index < keyEvents.Count; ++index) { hnEkey.kbtn.kbKeys[index] = KBTable.getKBTable8Keys(keyEvents[index].KeyCode).keyCode; } if (hnEkey.kbtn.bCtrl == (byte)1 || hnEkey.kbtn.bAlt == (byte)1 || (hnEkey.kbtn.bShift == (byte)1 || hnEkey.kbtn.bWin == (byte)1) || hnEkey.kbtn.kbKeys.Length != 0) { hnEkey.funcBit |= 4U; } } if (this.checkBoxFunMouse.Checked) { if (this.radioMouseLeft.Checked) { hnEkey.funcBit |= 16U; } else if (this.radioMouseRight.Checked) { hnEkey.funcBit |= 64U; } else if (this.radioMouseMid.Checked) { hnEkey.funcBit |= 32U; } else if (this.radioMouseWheelForward.Checked) { hnEkey.funcBit |= 128U; } else if (this.radioMouseWheelBackWard.Checked) { hnEkey.funcBit |= 256U; } } if (this.checkBoxFunSwitch.Checked) { if (this.radioSwitchScreen.Checked) { hnEkey.funcBit |= 1U; } else if (this.radioSwithBrush.Checked) { hnEkey.funcBit |= 2U; } } if (this.checkBoxFunRun.Checked && !string.IsNullOrEmpty(this.labelPath.Text.Trim())) { hnEkey.funcBit |= 8U; this.labelPath.Text.ToCharArray().CopyTo((Array)hnEkey.cmdPath, 0); } // ISSUE: reference to a compiler-generated field this.callback(this.mHolder, hnEkey); this.Close(); }
private void buttonOk_Click(object sender, EventArgs e) { HNStruct.HNEkey hnEkey = new HNStruct.HNEkey(); hnEkey.cmdPath = new char[260]; hnEkey.kbtn.kbKeys = new byte[16]; if (this.checkBoxFunKb.Checked) { if (this.CheckCtrl.Checked) { hnEkey.kbtn.bCtrl = (byte)1; } if (this.checkAlt.Checked) { hnEkey.kbtn.bAlt = (byte)1; } if (this.checkShift.Checked) { hnEkey.kbtn.bShift = (byte)1; } if (this.checkWindows.Checked) { hnEkey.kbtn.bWin = (byte)1; } if (this.radioChar.Checked && this.comboBoxStr.SelectedIndex != -1) { KBTable selectedItem = (KBTable)this.comboBoxStr.SelectedItem; hnEkey.kbtn.kbKeys[0] = selectedItem.keyCode; } else if (this.radioStr.Checked && !string.IsNullOrEmpty(this.labelStr.Text.Trim())) { string[] strArray = this.labelStr.Text.Trim().Split(' '); for (int index = 0; index < strArray.Length; ++index) { hnEkey.kbtn.kbKeys[index] = KBTable.getKey8Name(strArray[index]).keyCode; } } if (hnEkey.kbtn.bCtrl == (byte)1 || hnEkey.kbtn.bAlt == (byte)1 || (hnEkey.kbtn.bShift == (byte)1 || hnEkey.kbtn.bWin == (byte)1) || hnEkey.kbtn.kbKeys.Length != 0) { hnEkey.funcBit |= 4U; } } if (this.checkBoxFunMouse.Checked) { if (this.radioMouseLeft.Checked) { hnEkey.funcBit |= 16U; } else if (this.radioMouseRight.Checked) { hnEkey.funcBit |= 64U; } else if (this.radioMouseMid.Checked) { hnEkey.funcBit |= 32U; } else if (this.radioMouseWheelForward.Checked) { hnEkey.funcBit |= 128U; } else if (this.radioMouseWheelBackWard.Checked) { hnEkey.funcBit |= 256U; } } if (this.checkBoxFunSwitch.Checked) { if (this.radioSwitchScreen.Checked) { hnEkey.funcBit |= 1U; } else if (this.radioSwithBrush.Checked) { hnEkey.funcBit |= 2U; } } if (this.checkBoxFunRun.Checked && !string.IsNullOrEmpty(this.labelPath.Text.Trim())) { hnEkey.funcBit |= 8U; this.labelPath.Text.ToCharArray().CopyTo((Array)hnEkey.cmdPath, 0); } // ISSUE: reference to a compiler-generated field this.callback(this.mHolder, hnEkey); this.Close(); }