private void DeviceNoConnection(object sender, CaptureHelper.DeviceArgs e) { //Decouple CaptureDevice if (e.CaptureDevice.HasOwnership) { return; } _device = null; HardwareNoConnection?.Invoke(this, e); }
internal async void Handshake() { int tries = 0; while (await RegisterTask() == SktErrors.ESKT_UNABLEOPENDEVICE) { tries++; if (tries >= 50) { //Throw hook HardwareNoConnection and die HardwareNoConnection?.Invoke(this, null); break; } await Task.Delay(500); } }