in wwauth/Google.Solutions.WWAuth/View/AdfsConfigurationSheet.cs [37:160]
public AdfsConfigurationSheet(
CredentialConfigurationFile file)
{
InitializeComponent();
this.viewModel = new AdfsConfigurationViewModel(
file,
new ShellAdapter(),
this.certificateStoreAdapter);
this.adfsIssuerUriText.BindProperty(
c => c.Text,
this.viewModel,
m => m.IssuerUrl,
this.Container);
this.protocolComboBox.Items.AddRange(this.viewModel.AvailableProtocols);
this.protocolComboBox.BindProperty(
c => c.SelectedIndex,
this.viewModel,
m => m.ProtocolIndex,
this.Container);
this.rpIdTextBox.BindProperty(
c => c.Text,
this.viewModel,
m => m.RelyingPartyId,
this.Container);
this.rpIdTextBox.BindReadonlyProperty(
c => c.ReadOnly,
this.viewModel,
m => m.IsRelyingPartyIdTextBoxReadonly,
this.Container);
this.clientIdLabel.BindReadonlyProperty(
c => c.Visible,
this.viewModel,
m => m.IsClientIdTextBoxVisible,
this.Container);
this.clientIdTextBox.BindReadonlyProperty(
c => c.Visible,
this.viewModel,
m => m.IsClientIdTextBoxVisible,
this.Container);
this.clientIdTextBox.BindProperty(
c => c.Text,
this.viewModel,
m => m.ClientId,
this.Container);
this.acsUrlLabel.BindReadonlyProperty(
c => c.Visible,
this.viewModel,
m => m.IsAcsUrlTextBoxVisible,
this.Container);
this.acsUrlTextBox.BindReadonlyProperty(
c => c.Visible,
this.viewModel,
m => m.IsAcsUrlTextBoxVisible,
this.Container);
this.acsUrlTextBox.BindProperty(
c => c.Text,
this.viewModel,
m => m.AcsUrl,
this.Container);
this.signRequestCheckBox.BindReadonlyProperty(
c => c.Visible,
this.viewModel,
m => m.IsSignRequestControlVisible,
this.Container);
this.signRequestCheckBox.BindProperty(
c => c.Checked,
this.viewModel,
m => m.IsSignRequestControlEnabled,
this.Container);
this.signingCertificateTextBox.BindReadonlyProperty(
c => c.Visible,
this.viewModel,
m => m.IsSignRequestControlVisible,
this.Container);
this.signingCertificateTextBox.BindReadonlyProperty(
c => c.Enabled,
this.viewModel,
m => m.IsSignRequestControlEnabled,
this.Container);
this.signingCertificateTextBox.BindReadonlyProperty(
c => c.Text,
this.viewModel,
m => m.SigningCertificateSubject,
this.Container);
this.browseCertificateButton.BindReadonlyProperty(
c => c.Visible,
this.viewModel,
m => m.IsSignRequestControlVisible,
this.Container);
this.browseCertificateButton.BindReadonlyProperty(
c => c.Enabled,
this.viewModel,
m => m.IsSignRequestControlEnabled,
this.Container);
this.viewCertificateMenuItem.BindReadonlyProperty(
c => c.Enabled,
this.viewModel,
m => m.IsViewCertificateMenuItemEnabled,
this.Container);
this.Load += (s, e) =>
{
if (!File.Exists(viewModel.Executable) &&
MessageBox.Show(
this,
"The credential configuration contains points to a copy of WWAuth " +
"that does not exist anymore. Do you want to update the configuration " +
"to use the current path instead?",
"Executable path",
MessageBoxButtons.YesNoCancel,
MessageBoxIcon.Warning) == DialogResult.Yes)
{
viewModel.ResetExecutable();
}
};
}