public MonitWindowsAgentService()
        {
            // init the service
            ServiceName = "MonitWindowsAgent";

            CanHandlePowerEvent         = true;
            CanHandleSessionChangeEvent = true;
            CanPauseAndContinue         = true;
            CanShutdown = true;
            CanStop     = true;

            // and create the watcher
            m_watcher = new MonitWindowsAgent();

            // to delete
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

            InitializeComponent();
        }
Ejemplo n.º 2
0
        public MonitWindowsAgent(EventLog log)
        {
            Instance = this;

            // save the service log
            m_log = log;

            // LoadConfig();
            InitConfig();
            Logger.Init();
            InitTimer();

            m_serviceMonitoring = new ServiceMonitoring();
            m_serviceMonitoring.Start(log);

            m_mMonitClient = new MMonitClient();
            m_mMonitClient.Start();

            m_monitServer = new MonitServer();
            m_monitServer.Start();
        }