For all of you who have the same problem here are my suggestions:
to 1) Always use <html><body> your text, links here </body></html>
to 2) cmd:2, cmd:3 ... won't work, also keep in mind to use cmd:0 first. If you have two links you can use cmd:0 and cmd:1
to 3) Uppercase for commands won't work. Always use cmd:0 or cmd:1
to 4) You can use links by specifing "href=cmd:0" or buttons by setting "name=cmd:0". Just don't forget to write an correct <form>-Tag when using buttons (<form><input type=button ...></form>)
to 5) don't forget to register your eventlisters myNotificationEngine.NotificationSelect (*.NotificationDismiss, *.NotificationShow)
Example:
For your Notification.HTML Property you can use:
A whole Example will look like this
- Use HTML Tags correctly
- only use cmd:0 and cmd:1
- don't use uppercase CMD:0
- href=cmd:0 or name=cmd:0
- register your eventlisteners
to 1) Always use <html><body> your text, links here </body></html>
to 2) cmd:2, cmd:3 ... won't work, also keep in mind to use cmd:0 first. If you have two links you can use cmd:0 and cmd:1
to 3) Uppercase for commands won't work. Always use cmd:0 or cmd:1
to 4) You can use links by specifing "href=cmd:0" or buttons by setting "name=cmd:0". Just don't forget to write an correct <form>-Tag when using buttons (<form><input type=button ...></form>)
to 5) don't forget to register your eventlisters myNotificationEngine.NotificationSelect (*.NotificationDismiss, *.NotificationShow)
Example:
For your Notification.HTML Property you can use:
myNotification.HTML="<html><body><a href=cmd:0>yes</a> <a href=cmd:1>no</a></body></html>";
A whole Example will look like this
<somewhere> myNotification = new Notification(); myNotification.Duration=10; myNotification.Title="hallo"; myNotification.Flags=NotificationFlags.ForceMessage; myNotification.HTML="<html><body><a href=cmd:0>yes</a> <a href=cmd:1>no</a></body></html>"; myNotification.Priority=Priority.Inform; engine = new NotificationEngine(new System.Guid("your guid here")); engine.NotificationSelect+=new NotificationEventHandler(engine_NotificationSelect); engine.Add(myNotification); <listener> private void engine_NotificationSelect(object sender, NotificationEventArgs e) { System.Windows.Forms.MessageBox.Show(e.Link.ToString()); }
FROM: http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=2827