//---------------------------------------------------------------------------- // // Copyright © 2009-2010, Intel Corporation. All rights reserved. // // File: CertErrorDetails.cs // //---------------------------------------------------------------------------- using System; using UCT.Utils; using System.Windows.Forms; using System.Security.Cryptography.X509Certificates; namespace UCT.Controls { /// /// A control that display the certificate issue and the certificate (if available) /// public partial class CertErrorDetails : UserControl { #region - Members - public string Header { set; get; } public string Details { set; get; } public X509Certificate Certificate { set; get; } #endregion #region - Constructors - public CertErrorDetails() { InitializeComponent(); } #endregion #region - Event Handler - /// /// Hide the control - when clicking the 'x' /// /// /// private void HideControl(object sender, EventArgs e) { this.Hide(); } /// /// Display the problematic certificate /// /// /// private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { X509Certificate2UI.DisplayCertificate(Configuration.CertificateSettings.GetInstance().ServerCertificate, this.Handle); } /// /// Display the message indicates the exact problem /// public void PrintDetails() { lblHeader.Text = CertificateUtils.header; ; lblDescription.Text = CertificateUtils.description; } #endregion } }