public TlbTreeView() { InitializeComponent(); // Try to init TypeInteropManager. DaemonForm daemonForm = new DaemonForm(); m_daemon = new FormDaemon(daemonForm); if (TypeLibResourceManager.InitTypeLibResourceManager(m_daemon)) { // Init successfully, and start daemon thread. Thread daemonThread = new Thread(delegate() { daemonForm.ShowDialog(); }); daemonThread.Start(); } else { if (!(TypeLibResourceManager.GetDaemon() is FormDaemon)) { throw new NotFormDaemonException(); } m_daemon = null; } }
protected override void Dispose(bool disposing) { if (m_daemon != null) { // Close DaemonForm DaemonForm form = m_daemon.DaemonForm; m_daemon.DaemonForm = null; form.Close(); } base.Dispose(disposing); }
public FormDaemon(DaemonForm form) { m_form = form; }