/// <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); } } }
private void buttonStart_Click(object sender, System.EventArgs e) { pfwEngine = new PFWEngine(); pfwEngine.Start(); }