/// <summary> /// BuildKeysControl method implementation /// </summary> private void BuildKeysControl() { try { List <WebAuthNCredentialInformation> credlist = MMCService.GetUserStoredCredentials(_upn); this.WebAuthN.Controls.Clear(); int i = 1; foreach (WebAuthNCredentialInformation cred in credlist) { CheckBox rdio = new CheckBox { Tag = cred.CredentialID, Top = (i * 25), Left = 25, Width = 125 }; Font fnt = rdio.Font; rdio.Font = new Font(fnt.FontFamily, fnt.Size, FontStyle.Bold, fnt.Unit, fnt.GdiCharSet); rdio.Text = cred.CredType; this.WebAuthN.Controls.Add(rdio); rdio.CheckedChanged += Rdio_CheckedChanged; Label lblName = new Label { Top = (i * 25) + 6, Left = 160, Width = 150, Text = cred.NickName, }; Font xfnt = lblName.Font; lblName.Font = new Font(fnt.FontFamily, fnt.Size, FontStyle.Bold, fnt.Unit, fnt.GdiCharSet); this.WebAuthN.Controls.Add(lblName); Label lbl = new Label { Top = (i * 25) + 6, Left = 315, Width = 65, Text = cred.RegDate.ToShortDateString() }; this.WebAuthN.Controls.Add(lbl); Label cnt = new Label(); Font fntcnt = cnt.Font; cnt.Font = new Font(fntcnt.FontFamily, fntcnt.Size, FontStyle.Bold, fntcnt.Unit, fntcnt.GdiCharSet); cnt.Top = (i * 25) + 6; cnt.Left = 385; cnt.Width = 45; cnt.Text = "(" + cred.SignatureCounter.ToString() + ")"; this.WebAuthN.Controls.Add(cnt); i++; } } catch (Exception) { this.WebAuthN.Controls.Clear(); } }