示例#1
0
        // ------------------------ IOPCShutdown --------------- COMMON CALLBACK
        void IOPCShutdown.ShutdownRequest(string shutdownReason)
        {
            ShutdownRequestEventArgs e = new ShutdownRequestEventArgs(shutdownReason);

            if (ShutdownRequested != null)
            {
                ShutdownRequested(this, e);
            }
        }
 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);
 }
 // ------------------------ IOPCShutdown --------------- COMMON CALLBACK
 void IOPCShutdown.ShutdownRequest( string shutdownReason )
 {
     ShutdownRequestEventArgs	e = new ShutdownRequestEventArgs( shutdownReason );
     if( ShutdownRequested != null )
     ShutdownRequested( this, e );
 }
 private void ShutdownRequested(object sender, ShutdownRequestEventArgs e)
 {
     InstantLogger.log(string.Format("OPC server shuts down because:" + e.shutdownReason), "OPC");
 }