Esempio n. 1
0
        private void DeviceNoConnection(object sender, CaptureHelper.DeviceArgs e)
        {
            //Decouple CaptureDevice
            if (e.CaptureDevice.HasOwnership)
            {
                return;
            }
            _device = null;

            HardwareNoConnection?.Invoke(this, e);
        }
Esempio n. 2
0
        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);
            }
        }