public void InitializeCredentials() { if (!string.IsNullOrWhiteSpace(EncryptedUsername)) { Username = CredentialManager.DecryptData(EncryptedUsername); } if (!string.IsNullOrWhiteSpace(EncryptedPassword)) { Password = CredentialManager.DecryptData(EncryptedPassword); } }