Beispiel #1
0
        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;
            }
        }
Beispiel #2
0
 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;
     }
 }