void sms_MessageReceived(object sender, MessageeInterceptorEventArgs e) { Handlers.AppointmentHandler appHandler = new Handlers.AppointmentHandler(); Business.AppointmentVO appVO = (Business.AppointmentVO)appHandler.getCurrentAppointment(); if (appVO._Id == null) { //no current app } else { notification = new Microsoft.WindowsCE.Forms.Notification(); Microsoft.WindowsMobile.PocketOutlook.SmsMessage msg = (Microsoft.WindowsMobile.PocketOutlook.SmsMessage)e.Message; msg.Read = true; StringBuilder stb = new StringBuilder(); stb.Append(msg.Body + "<br>"); stb.Append(msg.Received.ToString() + "<br>"); stb.Append(msg.From + "<br>"); notification.BalloonChanged += new BalloonChangedEventHandler(notification_BalloonChanged); notification.Text = stb.ToString(); notification.InitialDuration = 10; if (appVO._Sensitivity.ToLower().Trim() == "private") { notification.Caption = "BlockedSmSMessage"; notificationStatus = true; } else { notification.Caption = "IncommingSMSMessage"; notification.Visible = true; } } }
void sms_MessageReceived(object sender, MessageeInterceptorEventArgs e) { Handlers.AppointmentHandler appHandler = new Handlers.AppointmentHandler (); Business.AppointmentVO appVO = (Business.AppointmentVO)appHandler.getCurrentAppointment (); if (appVO._Id == null) { //no current app } else { notification = new Microsoft.WindowsCE.Forms.Notification (); Microsoft.WindowsMobile.PocketOutlook.SmsMessage msg = (Microsoft.WindowsMobile.PocketOutlook.SmsMessage)e.Message; msg.Read = true; StringBuilder stb = new StringBuilder (); stb.Append (msg.Body + "<br>"); stb.Append (msg.Received.ToString () + "<br>"); stb.Append (msg.From + "<br>"); notification.BalloonChanged += new BalloonChangedEventHandler (notification_BalloonChanged); notification.Text = stb.ToString (); notification.InitialDuration = 10; if (appVO._Sensitivity.ToLower ().Trim () == "private") { notification.Caption = "BlockedSmSMessage"; notificationStatus = true; } else { notification.Caption = "IncommingSMSMessage"; notification.Visible = true; } } }