public void SendStompImage(string uri, string username, string password, string topic, string url, string text, string link) { if (!topic.EndsWith("/")) topic = topic + "/"; var newThread = new Thread(SendToStompThread); var param = new StompParameters() { Uri = uri, Topic = topic + "image", Text = text, Link = link, Showparam = "SHOW " + url, Username = username, Password = password }; newThread.Start(param); if (!string.IsNullOrEmpty(text)) { // Send Text Message as well if any text var newThread2 = new Thread(SendToStompThread); var param2 = new StompParameters() { Uri = uri, Topic = topic + "text", Text = text, Link = link, Showparam = "TEXT " + text, Username = username, Password = password }; newThread2.Start(param2); } }
public void SendStompImage(string uri, string username, string password, string topic, string url, string text, string link) { if (!topic.EndsWith("/")) { topic = topic + "/"; } var newThread = new Thread(SendToStompThread); var param = new StompParameters() { Uri = uri, Topic = topic + "image", Text = text, Link = link, Showparam = "SHOW " + url, Username = username, Password = password }; newThread.Start(param); if (!string.IsNullOrEmpty(text)) { // Send Text Message as well if any text var newThread2 = new Thread(SendToStompThread); var param2 = new StompParameters() { Uri = uri, Topic = topic + "text", Text = text, Link = link, Showparam = "TEXT " + text, Username = username, Password = password }; newThread2.Start(param2); } }
private void SendToStompThread(object s) { StompParameters stomp = (StompParameters)s; sendToStomp(stomp.Uri, stomp.Topic, stomp.Text, stomp.Link, stomp.Showparam, stomp.Username, stomp.Password); }