public int SetSelected(out int pbAutoLogon) { Log.LogMethodCall(); #if AUTOLOGIN if (!shouldAutoLogin) { timerOnDemandLogon = new TimerOnDemandLogon( testWindowsCredentialProvider.CredentialProviderEvents, credentialProviderCredentialEvents, this, CredentialProviderFieldDescriptorList[0].dwFieldID, testWindowsCredentialProvider.CredentialProviderEventsAdviseContext); timerOnDemandLogon.TimerEnded += TimerOnDemandLogon_TimerEnded; pbAutoLogon = 0; } else { // We got the info from the async timer pbAutoLogon = 1; } #else pbAutoLogon = 0; // Auto-logon when the tile is selected #endif return(HResultValues.S_OK); }
public int SetDeselected() { Log.LogMethodCall(); timerOnDemandLogon?.Dispose(); timerOnDemandLogon = null; return(HResultValues.E_NOTIMPL); }