public void LetUserRestartDeviceByReconnectingUsbConnector() { if (Device.IsHidDeviceConnected) { ExpectedUserAction = EgsDeviceFirmwareUpdateUserActions.DisconnectDevice; } while (Device.IsHidDeviceConnected) { DoEvents(); System.Threading.Thread.Sleep(500); if (IsCanceled) { throw new OperationCanceledException(); } } LetUserConnectDevice(); }
public void LetUserConnectDevice() { if (Device.IsHidDeviceConnected == false) { ExpectedUserAction = EgsDeviceFirmwareUpdateUserActions.ConnectDevice; } while (Device.IsHidDeviceConnected == false) { DoEvents(); System.Threading.Thread.Sleep(500); if (IsCanceled) { throw new OperationCanceledException(); } } ExpectedUserAction = EgsDeviceFirmwareUpdateUserActions.DoNotDisconnectDevice; }