Exemplo n.º 1
0
        private void ChangeInputButton_Click(object sender, EventArgs e)
        {
            InputDeviceDialog dialog = new InputDeviceDialog();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                hUIKeyboardHandler = new HUIKeyboardHandler(this, dialog.InputDeviceID);
            }
            else
            {
                MessageBox.Show("No new input device is selected");
            }
        }
 public void Disconnect()
 {
     if (this.inDevice != null)
     {
         this.inDevice.Close();
     }
     if (this.outDevice != null)
     {
         this.outDevice.Close();
     }
     this.inpdev  = null;
     this.outpdev = null;
 }