public virtual bool Start()
 {
     if (m_status != ModStatus.RUNNING)
     {
         try {
             m_thread.Start();
         } catch (Exception ex) {
             m_status   = ModStatus.STOPPED;
             m_errorSrc = ex;
             m_parent.WriteLog(LogLevel.ERROR, String.Format("{0} {1}: {2}",
                                                             m_name, m_status, m_errorSrc.ToString()));
             return(false);
         }
         m_status = ModStatus.RUNNING;
     }
     return(true);
 }
        public MEETModule(string theName, MEETContainer theContainer)
        {
            m_name = theName;
            if (!theContainer.AddModule(this))
            {
                // leave m_parent as null
                return;
            }

            m_parent = theContainer;
            m_status = ModStatus.NEW;

            try {
                m_thread      = new Thread(new ThreadStart(run));
                m_thread.Name = m_name;
            }
            catch (Exception ex) {
                m_status   = ModStatus.STOPPED;
                m_errorSrc = ex;
                m_parent.WriteLog(LogLevel.ERROR, String.Format("{0} {1}: {2}",
                                                                m_name, m_status, m_errorSrc.ToString()));
                return;
            }
        }