Beispiel #1
0
        private void CreateAuthenticatorButtons()
        {
            var af  = new AuthenticatorFactory();
            var aus = af.CreateInteractiveAuthenticators();

            for (int i = 0; i < aus.Length; i++)
            {
                var b = new ImageButton()
                {
                    CausesValidation = false,
                    AlternateText    = aus[i].DisplayName,
                    ToolTip          = String.Format("Log on using {0}.", aus[i].DisplayName),
                    CommandArgument  = String.Format("{0}|{1}", aus[i].Protocol, aus[i].AuthorityUri)
                };

                b.Click += new ImageClickEventHandler(AuthenticatorButton_Click);

                Authenticators.Controls.Add(b);
            }

            // Focus on the 'sign in' button
            Ok.Focus();
        }