/// <summary> /// /// </summary> public SIMAuthDaemonForm() { DaemonInstance = this; InitializeComponent(); m_aCardResourceManager = new SCardResourceManager(); // Customize the standard CardExpressForm by setting its properties to our desire. m_aCardForm.FooterBackColor = Color.FromArgb(0xF0, 0xF6, 0xFD); // First of all we must establish the Smart Card Resource Manager context. Once // this is done we must ensure that the context is ultimately released again. m_aCardResourceManager.EstablishContext(SCardContextScope.User); LogMessage += (string msg) => { BeginInvoke(new Action(() => { txtLog.AppendText(msg + Environment.NewLine); })); }; }
/// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose(bool disposing) { if (disposing) { if (components != null) { components.Dispose(); } if (m_aCardResourceManager != null) { m_aCardResourceManager.Dispose(); m_aCardResourceManager = null; } if (m_aCardForm != null) { m_aCardForm.Dispose(); m_aCardForm = null; } } base.Dispose(disposing); }