示例#1
0
        private void GotVCard(object sender, jabber.protocol.client.IQ iq, object data)
        {
            jabber.protocol.iq.VCard vcard = (jabber.protocol.iq.VCard)iq.Query;

            if (iq.Type != jabber.protocol.client.IQType.result)
            {
                return;
            }

            PopulateName(vcard);
            PopulateAddresses(vcard);
            PopulateTelephones(vcard);

            EmailLink.Text      = vcard.Email;
            CommentTextBox.Text = vcard.Description;

            if (vcard.Url != null)
            {
                WebLink.Text = vcard.Url.ToString();
            }

            PhotoPictureBox.Image = XmppImages.DefaultAvatar;

            if (vcard.Photo != null)
            {
                if (vcard.Photo["BINVAL"] != null)
                {
                    PhotoPictureBox.Image = ImageManipulation.Base64ToImage(vcard.Photo["BINVAL"].InnerText);
                }
            }

            Spinner.Visible = false;
        }