コード例 #1
0
        public KeyboardSimulated AddKeyboard()
        {
            var keyboard = new KeyboardSimulated(this);

            keyboards.Add(keyboard);
            RegisterDevice(keyboard);
            return(keyboard);
        }
コード例 #2
0
 public void RemoveKeyboard(KeyboardSimulated keyboard)
 {
     if (!keyboards.Contains(keyboard))
     {
         throw new InvalidOperationException("Simulated Keyboard does not exist");
     }
     UnregisterDevice(keyboard);
     keyboards.Remove(keyboard);
 }