Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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);
            }
        }