private void button1_Click_1(object sender, EventArgs e) { try { if (_engine == null) { _engine = new ProcessManagerEngine(evtlog); } if (_engine != null) { _engine.StartEngine(); _engine.DumpEngine(); } } catch (Exception ex) { evtlog.WriteEntry(ex.ToString(), EventLogEntryType.Error); } }
protected override void OnStart(string[] args) { try { if (_engine == null) { _engine = new ProcessManagerEngine(this.EventLog); _engine.UsePolicyConfig = _defaultSettings; } if (_engine != null) { _engine.StartEngine(); _engine.DumpEngine(); } } catch (Exception ex) { this.EventLog.WriteEntry(ex.ToString(), EventLogEntryType.Error); } }