hi. i am facing problem from many days. I have a thread listening for notificaitons from other system. whenever i receive a notification over socket i want to display it in Alert window using Infragistics's UltraDesktopAlert control. there is no winform in this class library.
please tell me how to display it using a thread. a sample is here
void tcpServerListenter_OnCommReceive(object sender, CommEventArgs e)
{
string xmlString = Encoding.UTF8.GetString((byte[])e.data);
try
{
XDocument xmlDoc = XDocument.Parse(xmlString);
var res = (from msg in xmlDoc.Descendants("consoleNotification")
select msg.Element("value").Value).FirstOrDefault();
this.notificationMsg = res;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
// here Alert window is not displaying.
ultraDesktopAlert1.Show("Notification", this.notificationMsg);
}
but this code is not displaying alert window.
i checked the following link also http://stackoverflow.com/questions/661561/how-to-update-gui-from-another-thread-in-c
but problem is that i have no Winform in my class library. what i wants to display alert window whenever i receive notification on socket.