private async Task EndUpgrade()
        {
            this.ProgressBar.Value = 1.75;

            if (_vmUpgrader != null)
            {
                await _vmUpgrader.PrepareForDisposalAsync();

                VMUpgrade toDispose = _vmUpgrader;
                _vmUpgrader = null;
                toDispose.Dispose();
            }

            // close the popup
            this.FirmwareUpdatePopup.IsOpen = false;
        }
        private async Task StartUpgrade()
        {
            // open the popup
            this.FirmwareUpdatePopup.IsOpen = true;

            // create the update object
            _vmUpgrader = new VMUpgrade(_loggerService,
                                        _btDeviceId,
                                        _fileBytes,
                                        new VMHidTransport(_loggerService, _hidRequestManager),
                                        this);

            _isUpdateCompleted = false;

            // call the update method
            await _vmUpgrader.BeginUpdateAsync();
        }