Exemple #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;
            }
        }
Exemple #2
0
        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);
        }
Exemple #3
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;
     }
 }
Exemple #4
0
 public FormDaemon(DaemonForm form)
 {
     m_form = form;
 }
Exemple #5
0
 public FormDaemon(DaemonForm form)
 {
     m_form = form;
 }