public static ShutdownRequestEventArgs CreateShutdownRequestEventArgs01() { string shutdownReasonp = string.Empty; ShutdownRequestEventArgs shutdownRequestEventArgs = new ShutdownRequestEventArgs(shutdownReasonp); return(shutdownRequestEventArgs); }
/// <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"); }
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); }
private void Server_ShutdownRequest(object p_Sender, ShutdownRequestEventArgs p_EvArgs) { Disconnect(); // TODO Display message and close server tab }
void reader_OnClose(object sender, ShutdownRequestEventArgs e) { App.AddErrorLog(new Exception((e.shutdownReason))); //AddErrorLog(new Exception(e.shutdownReason)); }
public void TestCreateShutdownRequestEventArgs01() { ShutdownRequestEventArgs shutdownRequestEventArgs = CreateShutdownRequestEventArgs01(); Assert.IsNotNull(shutdownRequestEventArgs); }
void opcServer_ShutdownRequested(object sender, ShutdownRequestEventArgs e) { }