예제 #1
0
        private void ManualDevice_InputCalled(ManualDevice manualDevice, byte[] data)
        {
            if (manualDevice != this.ActiveDevice)
            {
                return;
            }

            this.device.Input(data);
        }
예제 #2
0
        public IDevice GetNextDevice()
        {
            var manualDevice = new ManualDevice();

            manualDevice.DisposeCalled += this.ManualDevice_DisposeCalled;
            manualDevice.InputCalled   += this.ManualDevice_InputCalled;
            lock (this.manualDevices) { this.manualDevices.Add(manualDevice); }
            return(manualDevice);
        }
예제 #3
0
 private void ManualDevice_DisposeCalled(ManualDevice manualDevice)
 {
     lock (this.manualDevices) { this.manualDevices.Remove(manualDevice); }
 }