Пример #1
0
        public static ShutdownRequestEventArgs CreateShutdownRequestEventArgs01()
        {
            string shutdownReasonp = string.Empty;
            ShutdownRequestEventArgs shutdownRequestEventArgs = new ShutdownRequestEventArgs(shutdownReasonp);

            return(shutdownRequestEventArgs);
        }
Пример #2
0
        /// <summary>
        /// This is server shutdown Event Handler function.
        /// This method is responsible for notifying the event to its observers.
        /// </summary>
        /// <param name="sender">opc server</param>
        /// <param name="e">Shutdown event</param>
        protected void OPCSrv_ServerShutDown(object sender, ShutdownRequestEventArgs e)
        {
            string Function_Name = "opcSrv_ServerShutDown";

            LogHelper.Trace(CLASS_NAME, Function_Name, "OPC server shuts down because:" + e.shutdownReason);
            lock (m_opcDataDicObj)
            {
                if (m_opcSrvConnectFlag)
                {
                    m_opcSrvConnectFlag = false;
                    m_ShutdownEventTime = DateTime.Now;
                    LogHelper.Info(CLASS_NAME, Function_Name, string.Format("Shutdown Event Occured at time = {0}", m_ShutdownEventTime.ToString()));
                    NotifyShutDownToObservers();
                }
            }
            LogHelper.Trace(CLASS_NAME, Function_Name, "Function_Exited");
        }
Пример #3
0
 protected void theSrv_ServerShutDown(object sender, ShutdownRequestEventArgs e)
 {                                               // event: the OPC server shuts down
     MessageBox.Show(this, "OPC server shuts down because:" + e.shutdownReason, "ServerShutDown", MessageBoxButtons.OK, MessageBoxIcon.Warning);
 }
Пример #4
0
        private void Server_ShutdownRequest(object p_Sender, ShutdownRequestEventArgs p_EvArgs)
        {
            Disconnect();

            // TODO Display message and close server tab
        }
Пример #5
0
 void reader_OnClose(object sender, ShutdownRequestEventArgs e)
 {
     App.AddErrorLog(new Exception((e.shutdownReason)));
     //AddErrorLog(new Exception(e.shutdownReason));
 }
Пример #6
0
        public void TestCreateShutdownRequestEventArgs01()
        {
            ShutdownRequestEventArgs shutdownRequestEventArgs = CreateShutdownRequestEventArgs01();

            Assert.IsNotNull(shutdownRequestEventArgs);
        }
Пример #7
0
 void opcServer_ShutdownRequested(object sender, ShutdownRequestEventArgs e)
 {
 }