/// <summary> /// Default constructor. Instantiates TcAdsClient and logging arguments and status update arguments /// </summary> public TcIO() { TcClient = new TcAdsClient(); LogArgs = new TCSMessageEventArgs(); LogArgs.Recipient = Recipient.TwinCatTextBox; LogArgs.Sender = this; StatusArgs = new TCSStatusUpdateEventArgs(); StatusArgs.Recipient = Recipient.TwinCatTextBox; StatusArgs.Sender = this; }
public HttpServer(ref TcIO tcIoClient) { URL = ""; Port = -1; Running = false; LogArgs = new TCSMessageEventArgs(); LogArgs.Sender = this; LogArgs.Recipient = Recipient.HttpServerTextBox; StatusArgs = new TCSStatusUpdateEventArgs(); StatusArgs.Recipient = Recipient.HttpServerTextBox; StatusArgs.Sender = this; TcIOClient = tcIoClient; }
/// <summary> /// Invokes the log message event and passes its content /// </summary> /// <param name="e"></param> public static void SendMessage(TCSMessageEventArgs e) { EventHandler <TCSMessageEventArgs> handler = LogMessage; handler?.Invoke(e.Sender, e); }