OpenNETCF.Notification can not get return value..

  • Thread starter Thread starter Andrew Martin
  • Start date Start date
A

Andrew Martin

Having looked through all the posts here and on OpenNETCF forums, I
seem to have similar issues to many of the posters. This is how I
setup the call:

This is how I set up the notEngine:
OpenNETCF.GuidEx guidEx = OpenNETCF.GuidEx.NewGuid();
notEngine = new NotificationEngine(new Guid(guidEx.ToByteArray()));

This is the html string I use for the notification:
// DEBUG QUICKWATCH
// htmlText
// " <a CMD=1 href=\"CMD:1\">Downloading updated CAB from server </a>"
// string

This is how I add my notification:
Notification not = new Notification();
not.Duration = duration; // 10
not.Flags = notFlags; // ForceMessage
not.HTML = html; // see above
not.ID = Convert.ToInt32(notID); // 1
not.Title = "Mobile Collections Update"; // ...
not.Priority = Priority.Inform; // Inform
notEngine.Add(not);

These are my issues:

1. I register for both events of these events, but only
notEngine_NotificationDismiss is fired:
this.notEngine.NotificationSelect += new
NotificationEventHandler(notEngine_NotificationSelect);
this.notEngine.NotificationDismiss += new
NotificationEventHandler(notEngine_NotificationDismiss);

2. In notEngine_NotificationDismiss, the ID value is 0, not
private void notEngine_NotificationDismiss(object sender,
NotificationEventArgs args)
{
int test = args.ID;
{

If you like, I can email my code. I'd love to get a good C# example
out there when I get this resolved.

Thanks for any ideas.
-a
 
// DEBUG QUICKWATCH
// htmlText
// " <a CMD=1 href=\"CMD:1\">Downloading updated CAB from server </a>"
// string


Looking at this thread seems to indicate that this is an open issue:

http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=389&SearchTerms=notification,html

All Forums
OpenNETCF Namespaces
OpenNETCF.Notification
Get return values from Notification control

Is the valid HTML format documented anywhere? The ID I setup in the
Add Notification logic is 1, but does not seem to get passed in the
event arguments regardless of how I setup the HTML.

Thanks for any help,
-a
 
A lot of people is having a problem with the returned value of a
OpenNETCF.Notification.Notification. I've finally figured it out...

The value returned works like a counter. The first time you set a
notification, it will return 0, the second time, it will return 1, and
so forth. It doesn't matter what value you set.

Is this a bug, or a feature? If it's a feature, the Notification class
should not have an ID property...

I wonder what will happen when the counter overflows???

Antao
____________________________
Antao Almada
http://www.ydreams.com/
 
Back
Top