Example #1
0
 private void OnDocTitleChanged(DependencyObject sender, DependencyProperty dp)
 {
     if (EnableNotification.IsOn)
     {
         if (web.DocumentTitle.Trim().Length > 0)
         {
             int conversationCountFromTitle = UtilityClass.ConvertToInt(web.DocumentTitle);
             if (_NewConversationCount != conversationCountFromTitle)
             {
                 System.Diagnostics.Debug.WriteLine("New conversation count: " + web.DocumentTitle);
                 if (_NewConversationCount == 0)
                 {
                     UtilityClass.Notify("You have new messages from WhatsApp.", "whatsapp.png", "WhatsApp");
                 }
                 _NewConversationCount = conversationCountFromTitle;
             }
         }
     }
 }