private void DtoToView() { var tag = GetIdFromIdentitySourceType(IdentityProviderDto.Type); RdoIdentitySource.SelectCellWithTag(tag); RdoIdentitySource.Enabled = false; TxtDomainName.Enabled = false; TxtDomainAlias.StringValue = string.IsNullOrEmpty(IdentityProviderDto.Alias) ? string.Empty : IdentityProviderDto.Alias; TxtFriendlyName.StringValue = string.IsNullOrEmpty(IdentityProviderDto.FriendlyName) ? string.Empty : IdentityProviderDto.FriendlyName; TxtDomainName.StringValue = string.IsNullOrEmpty(IdentityProviderDto.Name) ? string.Empty : IdentityProviderDto.Name; TxtBaseDnUser.StringValue = string.IsNullOrEmpty(IdentityProviderDto.UserBaseDN) ? string.Empty : IdentityProviderDto.UserBaseDN; TxtBaseDnGroups.StringValue = string.IsNullOrEmpty(IdentityProviderDto.GroupBaseDN) ? string.Empty : IdentityProviderDto.GroupBaseDN; if (tag == 2 && IdentityProviderDto.SiteAffinityEnabled) { RdoDomainController.SelectCellWithTag(1); ChkProtect.StringValue = "1"; EnableDisableConnectionString(false); } else { EnableDisableConnectionString(true); ChkProtect.Enabled = false; RdoDomainController.SelectCellWithTag(2); if (IdentityProviderDto.ConnectionStrings.Count > 0) { TxtPrimaryConnection.StringValue = IdentityProviderDto.ConnectionStrings [0]; } if (IdentityProviderDto.ConnectionStrings.Count > 1) { TxtSecondaryConnection.StringValue = IdentityProviderDto.ConnectionStrings [1]; } } _certificates = IdentityProviderDto.Certificates == null ? new List <CertificateDto>() : IdentityProviderDto.Certificates; ReloadCertificates(); var machineAccount = IdentityProviderDto.UserMachineAccount ? 1 : 2; RdoSpn.SelectCellWithTag(machineAccount); TxtSpn.StringValue = string.IsNullOrEmpty(IdentityProviderDto.ServicePrincipalName) ? string.Empty : IdentityProviderDto.ServicePrincipalName; TxtUpn.StringValue = string.IsNullOrEmpty(IdentityProviderDto.Username) ? string.Empty : IdentityProviderDto.Username; }
void ReleaseDesignerOutlets() { if (TxtFriendlyName != null) { TxtFriendlyName.Dispose(); TxtFriendlyName = null; } if (BtnAddCertificate != null) { BtnAddCertificate.Dispose(); BtnAddCertificate = null; } if (BtnAdvanced != null) { BtnAdvanced.Dispose(); BtnAdvanced = null; } if (BtnBack != null) { BtnBack.Dispose(); BtnBack = null; } if (BtnHelpADWindowsIntegrated != null) { BtnHelpADWindowsIntegrated.Dispose(); BtnHelpADWindowsIntegrated = null; } if (BtnHelpCredentials != null) { BtnHelpCredentials.Dispose(); BtnHelpCredentials = null; } if (BtnHelpDomainName != null) { BtnHelpDomainName.Dispose(); BtnHelpDomainName = null; } if (BtnNext != null) { BtnNext.Dispose(); BtnNext = null; } if (BtnPrimaryImport != null) { BtnPrimaryImport.Dispose(); BtnPrimaryImport = null; } if (BtnRemoveCertificate != null) { BtnRemoveCertificate.Dispose(); BtnRemoveCertificate = null; } if (BtnSecondaryImport != null) { BtnSecondaryImport.Dispose(); BtnSecondaryImport = null; } if (BtnTestConnection != null) { BtnTestConnection.Dispose(); BtnTestConnection = null; } if (ChkProtect != null) { ChkProtect.Dispose(); ChkProtect = null; } if (LblPassword != null) { LblPassword.Dispose(); LblPassword = null; } if (LblSpn != null) { LblSpn.Dispose(); LblSpn = null; } if (LblUsername != null) { LblUsername.Dispose(); LblUsername = null; } if (LstCertificates != null) { LstCertificates.Dispose(); LstCertificates = null; } if (PnlProtect != null) { PnlProtect.Dispose(); PnlProtect = null; } if (PnlSpecificDomainController != null) { PnlSpecificDomainController.Dispose(); PnlSpecificDomainController = null; } if (PnlStep1 != null) { PnlStep1.Dispose(); PnlStep1 = null; } if (PnlStep2 != null) { PnlStep2.Dispose(); PnlStep2 = null; } if (PnlStep3 != null) { PnlStep3.Dispose(); PnlStep3 = null; } if (PnlStep4 != null) { PnlStep4.Dispose(); PnlStep4 = null; } if (RdoDomainController != null) { RdoDomainController.Dispose(); RdoDomainController = null; } if (RdoIdentitySource != null) { RdoIdentitySource.Dispose(); RdoIdentitySource = null; } if (RdoSpn != null) { RdoSpn.Dispose(); RdoSpn = null; } if (StepIndicator != null) { StepIndicator.Dispose(); StepIndicator = null; } if (TxtBaseDnGroups != null) { TxtBaseDnGroups.Dispose(); TxtBaseDnGroups = null; } if (TxtBaseDnUser != null) { TxtBaseDnUser.Dispose(); TxtBaseDnUser = null; } if (TxtDomainAlias != null) { TxtDomainAlias.Dispose(); TxtDomainAlias = null; } if (TxtDomainName != null) { TxtDomainName.Dispose(); TxtDomainName = null; } if (TxtGroupbaseDN != null) { TxtGroupbaseDN.Dispose(); TxtGroupbaseDN = null; } if (TxtLdapConnection != null) { TxtLdapConnection.Dispose(); TxtLdapConnection = null; } if (TxtPassword != null) { TxtPassword.Dispose(); TxtPassword = null; } if (TxtPrimaryConnection != null) { TxtPrimaryConnection.Dispose(); TxtPrimaryConnection = null; } if (TxtPrimaryUrl != null) { TxtPrimaryUrl.Dispose(); TxtPrimaryUrl = null; } if (TxtSecondaryConnection != null) { TxtSecondaryConnection.Dispose(); TxtSecondaryConnection = null; } if (TxtSpn != null) { TxtSpn.Dispose(); TxtSpn = null; } if (TxtUpn != null) { TxtUpn.Dispose(); TxtUpn = null; } }