Exemple #1
0
        /// <summary>
        /// Updates the data in the control from its item.
        /// </summary>
        protected override void UpdateData()
        {
            StringBuilder lsbInfo = new StringBuilder();

            if (miItem != null)
            {
                UPnPServiceTreeItem      ldiItem         = (UPnPServiceTreeItem)miItem;
                Service                  lsService       = ((Service)(miItem.LinkedObject));
                RootDescription          lrdRoot         = lsService.Device.RootDeviceDescription();
                ServiceDescription       lsdDescription  = lsService.Description();
                DeviceServiceDescription ldsdDescription = lsService.DeviceServiceDescription();

                lsbInfo.AppendLine("Service URLs");
                AddLine(lsbInfo, ldsdDescription.GetSCPDURL(lrdRoot), "SCPD Url");
                AddLine(lsbInfo, ldsdDescription.GetControlURL(lrdRoot), "Control Url");
                AddLine(lsbInfo, ldsdDescription.GetEventSubURL(lrdRoot), "Event Sub Url");
                lsbInfo.AppendLine();
                lsbInfo.AppendLine(lsdDescription.ToString());

                AddDescriptionProperties(csService, lsdDescription);
                AddDescriptionProperties(csDeviceService, ldsdDescription);
            }

            rtbInfo.Text = lsbInfo.ToString();
        }