Exemplo n.º 1
0
 private void DoDispose()
 {
     if (m_pfwEngine != null)
     {
         m_pfwEngine.Dispose();                //TODO Should inherit fom IDispose.
         m_pfwEngine = null;
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Set things in motion so your service can do its work.
        /// </summary>
        protected override void OnStart(string[] args)
        {
            try
            {
                if (m_pfwEngine == null)
                {
                    m_pfwEngine = new PFWEngine();
                }

                m_pfwEngine.Start();

                base.OnStart(args);
            }
            catch (Exception e)
            {
                string strMessage = string.Format("Unexpected error.\n    {0}\n", e.Message);
                if (m_utils != null)
                {
                    m_utils.WriteEventLogEntry(strMessage, EventLogEntryType.Error, Utils.EVENT_LOG_SOURCE);
                }
            }
        }
Exemplo n.º 3
0
 private void buttonStart_Click(object sender, System.EventArgs e)
 {
     pfwEngine = new PFWEngine();
     pfwEngine.Start();
 }