private void Device_TestDeviceWlanCompleteEvent(object sender, FallibleEventArgs args) { HRESULT hr = args.HR; bool flag = HRESULT._NS_E_MTPZ_WLAN_TEST_FAIL_CANCELLED == hr; this.SetResult(hr); if (this.IsWirelessTestFailure(hr)) { this._wlanTestResult = this._detailedError; this._wlanTestResultCode = this._hr; hr = HRESULT._S_OK; this.ClearResult(); } if (hr.IsSuccess && this._attemptingProfile != null) { this.StepComplete(WirelessStateResults.Success); } else if (flag) { this.StepComplete(WirelessStateResults.Canceled); } else { this.StepComplete(WirelessStateResults.Error); } }
private void Device_GetWlanProfilesCompleteEvent(object sender, FallibleEventArgs args) { HRESULT hr = args.HR; this.SetResult(hr); if (hr.IsSuccess) this._device.GetWiFiProfileList(ref this._computerNetworks); this.StepComplete(WirelessStateResults.Success); }
private void Device_AssociateWlanDeviceCompleteEvent(object sender, FallibleEventArgs args) { this.SetResult(args.HR); if (args.HR.IsSuccess) { this.StepComplete(WirelessStateResults.Success); } else { this.StepComplete(WirelessStateResults.Error); } }
private void Device_SetDeviceWlanProfilesCompleteEvent(object sender, FallibleEventArgs args) { if (args.HR.IsSuccess || this._fIgnoreErrors) { this.StepComplete(WirelessStateResults.Success); } else { this.SetResult(args.HR); this.StepComplete(WirelessStateResults.Error); } }
private void Device_SetDeviceWlanProfilesCompleteEvent(object sender, FallibleEventArgs args) { this.SetResult(args.HR); if (args.HR.IsSuccess && this._attemptingProfile != null) { this._fProfileSaved = true; this.StepComplete(WirelessStateResults.Success); } else { this.StepComplete(WirelessStateResults.Error); } }
private void FormatCompleted(object sender, FallibleEventArgs args) { if (this._device.IsConnectedToClient) { this._device.EnumeratedEvent -= new FallibleEventHandler(this.EnumerationCompleted); this._device.EnumeratedEvent += new FallibleEventHandler(this.EnumerationCompleted); this._device.Enumerate(); } else { this.FinishFormat(HRESULT._S_OK); } }
private void Device_GetDeviceWlanProfilesCompleteEvent(object sender, FallibleEventArgs args) { HRESULT hr = args.HR; this.SetResult(hr); if (hr.IsSuccess) { WlanProfileList list = new WlanProfileList(); hr = this._device.GetWiFiProfileList(ref list); this._deviceProfile = list.Count <= 0 ? null : list[0]; } if (hr.IsSuccess) { this.StepComplete(WirelessStateResults.Success); } else { this.StepComplete(WirelessStateResults.Error); } }
private void Device_RestoreDeviceWlanProfilesCompleteEvent( object sender, FallibleEventArgs args) { this._restore.Set(); }
private void EnumerationCompleted(object sender, FallibleEventArgs args) => this.FinishFormat(args.HR);