示例#1
0
        /// <summary>
        /// the function that runs when the service stops
        /// </summary>
        protected override void OnStop()
        {
            // write to the log
            logger.Log("In onStop", MessageTypeEnum.INFO);
            LogHistory logHistory = LogHistory.CreateLogHistory();

            // close the image server
            server.Stop();
            // close the tcp server
            //tcpServer.Stop();
            // close the application server
            tcpApplicationServer.Stop();
            logger.MessageRecieved -= ImageServiceMessage;
            //logger.NotifyClients -= tcpServer.NotifyClients;
            logger.MessageRecieved -= logHistory.UpdateLog;
            logger.MessageRecieved -= history.UpdateLog;
            //logger.MessageRecieved += tcpServer.NewLog;
            //server.NotifyClients -= tcpServer.NotifyClients;
            logHistory.ResetLog();
            logger.Log("In onStop", MessageTypeEnum.INFO);
        }
示例#2
0
 protected override void OnStop()
 {
     ImageServer.Stop();
     Status.dwCurrentState = ServiceState.SERVICE_STOPPED;
     LogStatus();
 }
示例#3
0
 protected override void OnStop()
 {
     eventLog1.WriteEntry("Stoping Image Service");
     m_imageServer.Stop();           // Stoping The Service
 }
示例#4
0
 protected override void OnStop()
 {
     m_Server.Stop();
     m_ImageServer.Stop();
     m_Logger.Log("Service stopped.", MessageTypeEnum.INFO);
 }