private void ManualDevice_InputCalled(ManualDevice manualDevice, byte[] data) { if (manualDevice != this.ActiveDevice) { return; } this.device.Input(data); }
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); }
private void ManualDevice_DisposeCalled(ManualDevice manualDevice) { lock (this.manualDevices) { this.manualDevices.Remove(manualDevice); } }