示例#1
0
        private void m_KeyPressed(object sender, InputDevice.KeyControlEventArgs e)
        {
            lbHandle.Text      = e.Keyboard.deviceHandle.ToString();
            lbType.Text        = e.Keyboard.deviceType;
            lbName.Text        = e.Keyboard.deviceName.Replace("&", "&&");
            lbDescription.Text = e.Keyboard.Name;
            //lbKey.Text = e.Keyboard.key.ToString();
            lbNumKeyboards.Text = NumberOfKeyboards.ToString();
            //lbVKey.Text = e.Keyboard.vKey;


            //#1.바코드리더기1번
            if (e.Keyboard.deviceName == "\\\\?\\HID#VID_AC90&PID_3002#6&341fd876&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}")
            {
                textBox1.Focus();
            }
            //#2.바코드리더기2번
            else if (e.Keyboard.deviceName == "\\\\?\\HID#VID_AC90&PID_3002#7&2e8a8ed7&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}")
            {
                textBox2.Focus();
            }
            else
            {
                textBox4.Focus();
            }
        }
示例#2
0
 private void m_KeyPressed(object sender, InputDevice.KeyControlEventArgs e)
 {
     //#1.바코드리더기1번
     if (e.Keyboard.deviceName == "\\\\?\\HID#VID_AC90&PID_3002#7&2b1cd6bf&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}")
     {
         tb_barcode1.Focus();
     }
     //#2.바코드리더기2번
     else if (e.Keyboard.deviceName == "\\\\?\\HID#VID_AC90&PID_3002#6&341fd876&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}")
     {
         tb_barcode2.Focus();
     }
     //#3.바코드리더기3번
     else if (e.Keyboard.deviceName == "\\\\?\\HID#VID_AC90&PID_3002#7&341fd876&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}")
     {
         tb_barcode3.Focus();
     }
     //#4.바코드리더기4번
     else if (e.Keyboard.deviceName == "\\\\?\\HID#VID_AC90&PID_3002#7&1863261a&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}")
     {
         tb_barcode4.Focus();
     }
     else
     {
         textBox5.Focus();
     }
 }