/// <summary>
 /// Scans all service nodes of the visual tree and updated any state variable values that
 /// may have been updated by an incoming event.
 /// </summary>
 /// <param name="dNode"></param>
 /// <param name="s"></param>
 private void ScanDeviceNode(TreeNode dNode, UPnPService s)
 {
     TreeNode pNode = dNode.FirstNode;
     TreeNode vNode;
     while (pNode != null)
     {
         if (pNode.Tag.GetType() == typeof(OpenSource.UPnP.UPnPDevice))
         {
             ScanDeviceNode(pNode, s);
         }
         else
         {
             if (pNode.Tag.GetHashCode() == s.GetHashCode())
             {
                 // This Service
                 vNode = pNode.FirstNode.FirstNode;
                 while (vNode != null)
                 {
                     if (((UPnPStateVariable)vNode.Tag).SendEvent == true)
                     {
                         string stringValue = UPnPService.SerializeObjectInstance(((UPnPStateVariable)vNode.Tag).Value);
                         if (stringValue.Length > 10) stringValue = stringValue.Substring(0, 10) + "...";
                         if (stringValue.Length > 0) stringValue = " [" + stringValue + "]";
                         vNode.Text = ((UPnPStateVariable)vNode.Tag).Name + stringValue;
                     }
                     vNode = vNode.NextNode;
                 }
                 break;
             }
         }
         pNode = pNode.NextNode;
     }
 }